Changeset 4701


Ignore:
Timestamp:
Jan 3, 2014 3:44:05 AM (6 years ago)
Author:
nanang
Message:

Close #1720:

  • Added configure flags --with-external-srtp and --disable-resample.
  • Added macro setting PJMEDIA_LIBSRTP_AUTO_INIT_DEINIT to allow application to handle libsrtp init & deinit by itself.
Location:
pjproject/trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r4656 r4701  
    651651ac_external_pa 
    652652ac_pjmedia_snd 
     653ac_pjmedia_resample 
     654ac_external_srtp 
    653655ac_external_gsm 
    654656ac_external_speex 
     
    743745with_external_speex 
    744746with_external_gsm 
     747with_external_srtp 
     748enable_resample 
    745749enable_sound 
    746750with_external_pa 
     
    14101414  --enable-epoll          Use /dev/epoll ioqueue on Linux (experimental) 
    14111415  --enable-shared         Build shared libraries 
     1416  --disable-resample      Disable resampling implementations 
    14121417  --disable-sound         Exclude sound (i.e. use null sound) 
    14131418  --disable-oss           Disable OSS audio (default: not disabled) 
     
    14241429  --disable-speex-codec   Exclude Speex codecs in the build 
    14251430  --disable-ilbc-codec    Exclude iLBC codec in the build 
    1426   --enable-libsamplerate  Link with libsamplerate when available. Note that 
    1427                           PJMEDIA_RESAMPLE_IMP must also be configured 
     1431  --enable-libsamplerate  Link with libsamplerate when available. 
    14281432  --enable-resample-dll   Build libresample as shared library 
    14291433  --disable-sdl           Disable SDL (default: not disabled) 
     
    14561460                          accessible to use (hint: use CFLAGS and LDFLAGS env 
    14571461                          var to set the include/lib paths) 
     1462  --with-external-srtp    Use external SRTP development files, not the one in 
     1463                          "third_party" directory. When this option is set, 
     1464                          make sure that SRTP is accessible to use (hint: use 
     1465                          CFLAGS and LDFLAGS env var to set the include/lib 
     1466                          paths) 
    14581467  --with-external-pa      Use external PortAudio development files, not the 
    14591468                          one in "third_party" directory. When this option is 
     
    57895798 
    57905799 
     5800ac_external_srtp=0 
     5801 
     5802 
     5803# Check whether --with-external-srtp was given. 
     5804if test "${with_external_srtp+set}" = set; then : 
     5805  withval=$with_external_srtp; 
     5806        if test "x$with_external_srtp" != "xno"; then 
     5807                # Test SRTP installation 
     5808                { $as_echo "$as_me:${as_lineno-$LINENO}: checking if external SRTP devkit is installed" >&5 
     5809$as_echo_n "checking if external SRTP devkit is installed... " >&6; } 
     5810                cat confdefs.h - <<_ACEOF >conftest.$ac_ext 
     5811/* end confdefs.h.  */ 
     5812#include <srtp/srtp.h> 
     5813 
     5814int 
     5815main () 
     5816{ 
     5817srtp_init(); 
     5818  ; 
     5819  return 0; 
     5820} 
     5821_ACEOF 
     5822if ac_fn_c_try_compile "$LINENO"; then : 
     5823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes!!" >&5 
     5824$as_echo "yes!!" >&6; } 
     5825                                   ac_external_srtp="1" 
     5826 
     5827else 
     5828  as_fn_error $? "Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths" "$LINENO" 5 
     5829fi 
     5830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 
     5831        fi 
     5832 
     5833 
     5834fi 
     5835 
     5836 
     5837 
     5838ac_pjmedia_resample=libresample 
     5839 
     5840# Check whether --enable-resample was given. 
     5841if test "${enable_resample+set}" = set; then : 
     5842  enableval=$enable_resample; if test "$enable_resample" = "no"; then 
     5843                ac_pjmedia_resample=none 
     5844                { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if resampling is disabled...yes" >&5 
     5845$as_echo "Checking if resampling is disabled...yes" >&6; } 
     5846               fi 
     5847 
     5848fi 
     5849 
    57915850 
    57925851 
     
    62586317fi 
    62596318 
     6319              ac_pjmedia_resample=libsamplerate 
    62606320else 
    62616321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: Skipping libsamplerate detection" >&5 
     
    74557515 
    74567516                ac_fn_c_check_header_mongrel "$LINENO" "vo-amrwbenc/enc_if.h" "ac_cv_header_vo_amrwbenc_enc_if_h" "$ac_includes_default" 
    7457 if test "x$ac_cv_header_vo_amrwbenc_enc_if_h" = xyes; then : 
     7517if test "x$ac_cv_header_vo_amrwbenc_enc_if_h" = x""yes; then : 
    74587518  opencore_amrwb_enc_h_present=1 
    74597519fi 
     
    74617521 
    74627522                ac_fn_c_check_header_mongrel "$LINENO" "opencore-amrwb/dec_if.h" "ac_cv_header_opencore_amrwb_dec_if_h" "$ac_includes_default" 
    7463 if test "x$ac_cv_header_opencore_amrwb_dec_if_h" = xyes; then : 
     7523if test "x$ac_cv_header_opencore_amrwb_dec_if_h" = x""yes; then : 
    74647524  opencore_amrwb_dec_h_present=1 
    74657525fi 
     
    74687528                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D_IF_init in -lopencore-amrwb" >&5 
    74697529$as_echo_n "checking for D_IF_init in -lopencore-amrwb... " >&6; } 
    7470 if ${ac_cv_lib_opencore_amrwb_D_IF_init+:} false; then : 
     7530if test "${ac_cv_lib_opencore_amrwb_D_IF_init+set}" = set; then : 
    74717531  $as_echo_n "(cached) " >&6 
    74727532else 
     
    75027562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_opencore_amrwb_D_IF_init" >&5 
    75037563$as_echo "$ac_cv_lib_opencore_amrwb_D_IF_init" >&6; } 
    7504 if test "x$ac_cv_lib_opencore_amrwb_D_IF_init" = xyes; then : 
     7564if test "x$ac_cv_lib_opencore_amrwb_D_IF_init" = x""yes; then : 
    75057565  opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb" 
    75067566fi 
     
    75087568                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for E_IF_init in -lvo-amrwbenc" >&5 
    75097569$as_echo_n "checking for E_IF_init in -lvo-amrwbenc... " >&6; } 
    7510 if ${ac_cv_lib_vo_amrwbenc_E_IF_init+:} false; then : 
     7570if test "${ac_cv_lib_vo_amrwbenc_E_IF_init+set}" = set; then : 
    75117571  $as_echo_n "(cached) " >&6 
    75127572else 
     
    75427602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vo_amrwbenc_E_IF_init" >&5 
    75437603$as_echo "$ac_cv_lib_vo_amrwbenc_E_IF_init" >&6; } 
    7544 if test "x$ac_cv_lib_vo_amrwbenc_E_IF_init" = xyes; then : 
     7604if test "x$ac_cv_lib_vo_amrwbenc_E_IF_init" = x""yes; then : 
    75457605  opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc" 
    75467606fi 
     
    76017661 
    76027662                ac_fn_c_check_header_mongrel "$LINENO" "SKP_Silk_SDK_API.h" "ac_cv_header_SKP_Silk_SDK_API_h" "$ac_includes_default" 
    7603 if test "x$ac_cv_header_SKP_Silk_SDK_API_h" = xyes; then : 
     7663if test "x$ac_cv_header_SKP_Silk_SDK_API_h" = x""yes; then : 
    76047664  silk_h_present=1 
    76057665fi 
     
    76087668                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK" >&5 
    76097669$as_echo_n "checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK... " >&6; } 
    7610 if ${ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version+:} false; then : 
     7670if test "${ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version+set}" = set; then : 
    76117671  $as_echo_n "(cached) " >&6 
    76127672else 
     
    76427702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" >&5 
    76437703$as_echo "$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" >&6; } 
    7644 if test "x$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" = xyes; then : 
     7704if test "x$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" = x""yes; then : 
    76457705  silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK" 
    76467706fi 
  • pjproject/trunk/aconfigure.ac

    r4656 r4701  
    529529 
    530530 
     531dnl # Use external SRTP installation 
     532AC_SUBST(ac_external_srtp,0) 
     533AC_ARG_WITH(external-srtp, 
     534    AC_HELP_STRING([--with-external-srtp], 
     535                   [Use external SRTP development files, not the one in "third_party" directory. When this option is set, make sure that SRTP is accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]), 
     536    [ 
     537        if test "x$with_external_srtp" != "xno"; then 
     538                # Test SRTP installation 
     539                AC_MSG_CHECKING([if external SRTP devkit is installed]) 
     540                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <srtp/srtp.h> 
     541                                                     ]], 
     542                                                  [srtp_init();])], 
     543                                  [AC_MSG_RESULT(yes!!) 
     544                                   ac_external_srtp="1" 
     545                                   ], 
     546                                  [AC_MSG_ERROR([Unable to use SRTP. If SRTP development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])]) 
     547        fi 
     548    ] 
     549    ) 
     550 
     551 
     552dnl # Resample implementation 
     553AC_SUBST(ac_pjmedia_resample,libresample) 
     554AC_ARG_ENABLE(resample, 
     555              AC_HELP_STRING([--disable-resample], 
     556                             [Disable resampling implementations]), 
     557              [if test "$enable_resample" = "no"; then 
     558                [ac_pjmedia_resample=none] 
     559                AC_MSG_RESULT([Checking if resampling is disabled...yes]) 
     560               fi] 
     561              ) 
    531562 
    532563dnl # Sound device backend selection 
     
    832863AC_ARG_ENABLE(libsamplerate, 
    833864              AC_HELP_STRING([--enable-libsamplerate], 
    834                              [Link with libsamplerate when available. Note that PJMEDIA_RESAMPLE_IMP must also be configured]), 
    835               [ AC_CHECK_LIB(samplerate,src_new) ], 
     865                             [Link with libsamplerate when available.]), 
     866              [ AC_CHECK_LIB(samplerate,src_new) ] 
     867              [ac_pjmedia_resample=libsamplerate], 
    836868              AC_MSG_RESULT([Skipping libsamplerate detection]) 
    837869             ) 
  • pjproject/trunk/build.mak.in

    r4656 r4701  
    2727export APP_THIRD_PARTY_EXT := 
    2828export APP_THIRD_PARTY_LIBS := 
    29 export APP_THIRD_PARTY_LIB_FILES := $(PJ_DIR)/third_party/lib/libmilenage-$(LIB_SUFFIX) $(PJ_DIR)/third_party/lib/libsrtp-$(LIB_SUFFIX) 
    30 ifeq ($(PJ_SHARED_LIBRARIES),) 
    31 APP_THIRD_PARTY_LIBS += -lmilenage-$(TARGET_NAME) -lsrtp-$(TARGET_NAME) 
    32 else 
    33 APP_THIRD_PARTY_LIBS += -lmilenage -lsrtp 
    34 APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libmilenage.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libmilenage.$(SHLIB_SUFFIX) \ 
    35                              $(PJ_DIR)/third_party/lib/libsrtp.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libsrtp.$(SHLIB_SUFFIX) 
    36 endif 
    37  
     29export APP_THIRD_PARTY_LIB_FILES := $(PJ_DIR)/third_party/lib/libmilenage-$(LIB_SUFFIX) 
     30ifeq ($(PJ_SHARED_LIBRARIES),) 
     31APP_THIRD_PARTY_LIBS += -lmilenage-$(TARGET_NAME) 
     32else 
     33APP_THIRD_PARTY_LIBS += -lmilenage 
     34APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libmilenage.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libmilenage.$(SHLIB_SUFFIX) 
     35endif 
     36 
     37ifeq (@ac_external_srtp@,1) 
     38# External SRTP library 
     39APP_THIRD_PARTY_EXT += -lsrtp 
     40else 
     41APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libsrtp-$(LIB_SUFFIX) 
     42ifeq ($(PJ_SHARED_LIBRARIES),) 
     43APP_THIRD_PARTY_LIBS += -lsrtp-$(TARGET_NAME) 
     44else 
     45APP_THIRD_PARTY_LIBS += -lsrtp 
     46APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libsrtp.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libsrtp.$(SHLIB_SUFFIX) 
     47endif 
     48endif 
     49 
     50ifeq (@ac_pjmedia_resample@,libresample) 
    3851APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX) 
    3952ifeq ($(PJ_SHARED_LIBRARIES),) 
     
    4861APP_THIRD_PARTY_LIBS += -lresample 
    4962APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX) 
     63endif 
    5064endif 
    5165 
  • pjproject/trunk/pjmedia/build/Makefile

    r4656 r4701  
    33 
    44THIRD_PARTY:=$(PJDIR)/third_party 
    5  
    6 SRTP_INC=$(CC_INC)$(THIRD_PARTY)/build/srtp \ 
    7          $(CC_INC)$(THIRD_PARTY)/srtp/crypto/include \ 
    8          $(CC_INC)$(THIRD_PARTY)/srtp/include 
    95 
    106include $(PJDIR)/build/common.mak 
     
    4945                   $(CC_INC)../../pjmedia/include \ 
    5046                   $(CC_INC)../../pjnath/include \ 
    51                    $(CC_INC)../.. \ 
    52                    $(SRTP_INC)  
     47                   $(CC_INC)../.. 
    5348export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \ 
    5449                   $(HOST_CXXFLAGS) $(CXXFLAGS) 
     
    7267                        g711.o jbuf.o master_port.o mem_capture.o mem_player.o \ 
    7368                        null_port.o plc_common.o port.o splitcomb.o \ 
    74                         resample_resample.o resample_libsamplerate.o \ 
     69                        resample_resample.o resample_libsamplerate.o resample_speex.o \ 
    7570                        resample_port.o rtcp.o rtcp_xr.o rtp.o \ 
    7671                        sdp.o sdp_cmp.o sdp_neg.o session.o silencedet.o \ 
  • pjproject/trunk/pjmedia/build/os-auto.mak.in

    r4635 r4701  
    130130 
    131131# 
     132# SRTP 
     133# 
     134ifeq (@ac_external_srtp@,1) 
     135# External SRTP 
     136export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=1 
     137else 
     138# Our SRTP in third_party 
     139export CFLAGS += -I$(THIRD_PARTY)/build/srtp \ 
     140         -I$(THIRD_PARTY)/srtp/crypto/include \ 
     141         -I$(THIRD_PARTY)/srtp/include 
     142 
     143endif 
     144 
     145# 
     146# Resample 
     147# 
     148AC_PJMEDIA_RESAMPLE=@ac_pjmedia_resample@ 
     149 
     150ifeq ($(AC_PJMEDIA_RESAMPLE),none) 
     151# No resample support 
     152export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE 
     153endif 
     154 
     155ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) 
     156export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE 
     157endif 
     158 
     159ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) 
     160export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE 
     161endif 
     162 
     163ifeq ($(AC_PJMEDIA_RESAMPLE),speex) 
     164export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX 
     165endif 
     166 
     167# 
    132168# PortAudio 
    133169# 
  • pjproject/trunk/pjmedia/build/os-darwinos.mak

    r2601 r4701  
    7979endif 
    8080 
     81# 
     82# Resample 
     83# 
     84AC_PJMEDIA_RESAMPLE=libresample 
     85 
     86ifeq ($(AC_PJMEDIA_RESAMPLE),none) 
     87# No resample support 
     88export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE 
     89endif 
     90 
     91ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) 
     92export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE 
     93endif 
     94 
     95ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) 
     96export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE 
     97endif 
     98 
     99ifeq ($(AC_PJMEDIA_RESAMPLE),speex) 
     100export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX 
     101endif 
     102 
     103# 
     104# SRTP 
     105# 
     106#ifeq (@ac_external_srtp@,1) 
     107ifeq (0,1) 
     108# External SRTP 
     109export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=1 
     110else 
     111# Our SRTP in third_party 
     112export CFLAGS += -I$(THIRD_PARTY)/build/srtp \ 
     113         -I$(THIRD_PARTY)/srtp/crypto/include \ 
     114         -I$(THIRD_PARTY)/srtp/include 
     115 
     116endif 
    81117 
    82118# 
  • pjproject/trunk/pjmedia/build/os-linux.mak

    r2601 r4701  
    7373endif 
    7474 
     75# 
     76# Resample 
     77# 
     78AC_PJMEDIA_RESAMPLE=libresample 
     79 
     80ifeq ($(AC_PJMEDIA_RESAMPLE),none) 
     81# No resample support 
     82export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE 
     83endif 
     84 
     85ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) 
     86export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE 
     87endif 
     88 
     89ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) 
     90export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE 
     91endif 
     92 
     93ifeq ($(AC_PJMEDIA_RESAMPLE),speex) 
     94export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX 
     95endif 
     96 
     97# 
     98# SRTP 
     99# 
     100#ifeq (@ac_external_srtp@,1) 
     101ifeq (0,1) 
     102# External SRTP 
     103export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=1 
     104else 
     105# Our SRTP in third_party 
     106export CFLAGS += -I$(THIRD_PARTY)/build/srtp \ 
     107         -I$(THIRD_PARTY)/srtp/crypto/include \ 
     108         -I$(THIRD_PARTY)/srtp/include 
     109 
     110endif 
    75111 
    76112# 
  • pjproject/trunk/pjmedia/build/os-rtems.mak

    r604 r4701  
    77export SOUND_OBJS = $(NULLSOUND_OBJS) 
    88 
     9export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE 
  • pjproject/trunk/pjmedia/build/os-win32.mak

    r2601 r4701  
    7575endif 
    7676 
     77# 
     78# Resample 
     79# 
     80AC_PJMEDIA_RESAMPLE=libresample 
     81 
     82ifeq ($(AC_PJMEDIA_RESAMPLE),none) 
     83# No resample support 
     84export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE 
     85endif 
     86 
     87ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) 
     88export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE 
     89endif 
     90 
     91ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) 
     92export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE 
     93endif 
     94 
     95ifeq ($(AC_PJMEDIA_RESAMPLE),speex) 
     96export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX 
     97endif 
     98 
     99# 
     100# SRTP 
     101# 
     102#ifeq (@ac_external_srtp@,1) 
     103ifeq (0,1) 
     104# External SRTP 
     105export CFLAGS += -DPJMEDIA_EXTERNAL_SRTP=1 
     106else 
     107# Our SRTP in third_party 
     108export CFLAGS += -I$(THIRD_PARTY)/build/srtp \ 
     109         -I$(THIRD_PARTY)/srtp/crypto/include \ 
     110         -I$(THIRD_PARTY)/srtp/include 
     111 
     112endif 
    77113 
    78114# 
  • pjproject/trunk/pjmedia/include/pjmedia/config.h

    r4577 r4701  
    915915 
    916916/** 
     917 * Let the library handle libsrtp initialization and deinitialization. 
     918 * Application may want to disable this and manually perform libsrtp 
     919 * initialization and deinitialization when it needs to use libsrtp 
     920 * before the library is initialized or after the library is shutdown. 
     921 * 
     922 * By default it is enabled. 
     923 */ 
     924#ifndef PJMEDIA_LIBSRTP_AUTO_INIT_DEINIT 
     925#   define PJMEDIA_LIBSRTP_AUTO_INIT_DEINIT         1 
     926#endif 
     927 
     928 
     929/** 
    917930 * Enable support to handle codecs with inconsistent clock rate 
    918931 * between clock rate in SDP/RTP & the clock rate that is actually used. 
  • pjproject/trunk/pjmedia/src/pjmedia/transport_srtp.c

    r4613 r4701  
    3131#if defined(PJMEDIA_HAS_SRTP) && (PJMEDIA_HAS_SRTP != 0) 
    3232 
    33 #include <srtp.h> 
     33#if defined(PJMEDIA_EXTERNAL_SRTP) && (PJMEDIA_EXTERNAL_SRTP != 0) 
     34#  include <srtp/srtp.h> 
     35#else 
     36#  include <srtp.h> 
     37#endif 
    3438 
    3539#define THIS_FILE   "transport_srtp.c" 
     
    277281PJ_DEF(pj_status_t) pjmedia_srtp_init_lib(pjmedia_endpt *endpt) 
    278282{ 
     283#if PJMEDIA_LIBSRTP_AUTO_INIT_DEINIT 
    279284    if (libsrtp_initialized == PJ_FALSE) { 
    280285        err_status_t err; 
     
    299304        libsrtp_initialized = PJ_TRUE; 
    300305    } 
     306#else 
     307    PJ_UNUSED_ARG(endpt); 
     308#endif 
    301309     
    302310    return PJ_SUCCESS; 
  • pjproject/trunk/third_party/build/Makefile

    r2037 r4701  
    1 DIRS = resample milenage srtp 
     1DIRS = milenage 
    22 
    33include ../../build.mak 
  • pjproject/trunk/third_party/build/os-auto.mak.in

    r3295 r4701  
    3232endif 
    3333 
     34ifeq (@ac_external_srtp@,1) 
     35# External SRTP 
     36else 
     37DIRS += srtp 
     38endif 
     39 
     40ifeq (@ac_pjmedia_resample@,libresample) 
     41DIRS += resample 
     42endif 
  • pjproject/trunk/third_party/build/os-darwinos.mak

    r2601 r4701  
    44DIRS += portaudio 
    55DIRS += g7221 
     6DIRS += srtp 
     7DIRS += resample 
    68 
    79 
  • pjproject/trunk/third_party/build/os-linux.mak

    r2601 r4701  
    44DIRS += portaudio 
    55DIRS += g7221 
     6DIRS += srtp 
     7DIRS += resample 
    68 
    79 
  • pjproject/trunk/third_party/build/os-win32.mak

    r2601 r4701  
    44DIRS += portaudio 
    55DIRS += g7221 
     6DIRS += srtp 
     7DIRS += resample 
    68 
    79 
Note: See TracChangeset for help on using the changeset viewer.