From f312ff5164b55ce2c847881674d4505f64d23093 Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Tue, 12 Mar 2013 10:41:23 -0500 Subject: Build srtp dir when autoconf not used. --- third_party/build/os-darwinos.mak | 1 + third_party/build/os-linux.mak | 1 + third_party/build/os-win32.mak | 1 + 3 files changed, 3 insertions(+) diff --git a/third_party/build/os-darwinos.mak b/third_party/build/os-darwinos.mak index a9c740f..7c94029 100644 --- a/third_party/build/os-darwinos.mak +++ b/third_party/build/os-darwinos.mak @@ -3,5 +3,6 @@ DIRS += ilbc DIRS += speex DIRS += portaudio DIRS += g7221 +DIRS += srtp diff --git a/third_party/build/os-linux.mak b/third_party/build/os-linux.mak index a9c740f..7c94029 100644 --- a/third_party/build/os-linux.mak +++ b/third_party/build/os-linux.mak @@ -3,5 +3,6 @@ DIRS += ilbc DIRS += speex DIRS += portaudio DIRS += g7221 +DIRS += srtp diff --git a/third_party/build/os-win32.mak b/third_party/build/os-win32.mak index a9c740f..7c94029 100644 --- a/third_party/build/os-win32.mak +++ b/third_party/build/os-win32.mak @@ -3,5 +3,6 @@ DIRS += ilbc DIRS += speex DIRS += portaudio DIRS += g7221 +DIRS += srtp -- cgit v1.2.3 From 3ebc56ad37b5254faadec0ca4eeae9559338815b Mon Sep 17 00:00:00 2001 From: Jason Parker Date: Tue, 12 Mar 2013 10:45:25 -0500 Subject: Allow disabling resample support, via configure script. --- aconfigure | 38 +++++++++++++++++++++++++++----------- aconfigure.ac | 16 ++++++++++++++-- build.mak.in | 2 ++ pjmedia/build/Makefile | 2 +- pjmedia/build/os-auto.mak.in | 22 ++++++++++++++++++++++ pjmedia/build/os-darwinos.mak | 21 +++++++++++++++++++++ pjmedia/build/os-linux.mak | 21 +++++++++++++++++++++ pjmedia/build/os-rtems.mak | 1 + pjmedia/build/os-win32.mak | 21 +++++++++++++++++++++ third_party/build/Makefile | 2 +- third_party/build/os-auto.mak.in | 4 ++++ third_party/build/os-darwinos.mak | 1 + third_party/build/os-linux.mak | 1 + third_party/build/os-win32.mak | 1 + 14 files changed, 138 insertions(+), 15 deletions(-) diff --git a/aconfigure b/aconfigure index 78d7291..d3a089b 100755 --- a/aconfigure +++ b/aconfigure @@ -641,6 +641,7 @@ ac_pa_use_alsa ac_pa_cflags ac_external_pa ac_pjmedia_snd +ac_pjmedia_resample ac_external_srtp ac_external_gsm ac_external_speex @@ -733,6 +734,7 @@ enable_shared with_external_speex with_external_gsm with_external_srtp +enable_resample enable_sound with_external_pa enable_oss @@ -1400,6 +1402,7 @@ Optional Features: Disable floating point where possible --enable-epoll Use /dev/epoll ioqueue on Linux (experimental) --enable-shared Build shared libraries + --disable-resample Disable resampling implementations --disable-sound Exclude sound (i.e. use null sound) --disable-oss Disable OSS audio (default: not disabled) --disable-video Disable video feature @@ -1414,8 +1417,7 @@ Optional Features: --disable-g7221-codec Exclude G.7221 codec in the build --disable-speex-codec Exclude Speex codecs in the build --disable-ilbc-codec Exclude iLBC codec in the build - --enable-libsamplerate Link with libsamplerate when available. Note that - PJMEDIA_RESAMPLE_IMP must also be configured + --enable-libsamplerate Link with libsamplerate when available. --enable-resample-dll Build libresample as shared library --disable-sdl Disable SDL (default: not disabled) --disable-ffmpeg Disable ffmpeg (default: not disabled) @@ -5631,6 +5633,19 @@ fi +ac_pjmedia_resample=libresample + +# Check whether --enable-resample was given. +if test "${enable_resample+set}" = set; then : + enableval=$enable_resample; if test "$enable_resample" = "no"; then + ac_pjmedia_resample=none + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking if resampling is disabled...yes" >&5 +$as_echo "Checking if resampling is disabled...yes" >&6; } + fi + +fi + + # Check whether --enable-sound was given. if test "${enable_sound+set}" = set; then : @@ -6088,6 +6103,7 @@ _ACEOF fi + ac_pjmedia_resample=libsamplerate else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Skipping libsamplerate detection" >&5 $as_echo "Skipping libsamplerate detection" >&6; } @@ -7285,20 +7301,20 @@ $as_echo "OpenCORE AMR-NB library found, AMR-NB support enabled" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "vo-amrwbenc/enc_if.h" "ac_cv_header_vo_amrwbenc_enc_if_h" "$ac_includes_default" -if test "x$ac_cv_header_vo_amrwbenc_enc_if_h" = xyes; then : +if test "x$ac_cv_header_vo_amrwbenc_enc_if_h" = x""yes; then : opencore_amrwb_enc_h_present=1 fi ac_fn_c_check_header_mongrel "$LINENO" "opencore-amrwb/dec_if.h" "ac_cv_header_opencore_amrwb_dec_if_h" "$ac_includes_default" -if test "x$ac_cv_header_opencore_amrwb_dec_if_h" = xyes; then : +if test "x$ac_cv_header_opencore_amrwb_dec_if_h" = x""yes; then : opencore_amrwb_dec_h_present=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D_IF_init in -lopencore-amrwb" >&5 $as_echo_n "checking for D_IF_init in -lopencore-amrwb... " >&6; } -if ${ac_cv_lib_opencore_amrwb_D_IF_init+:} false; then : +if test "${ac_cv_lib_opencore_amrwb_D_IF_init+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7332,13 +7348,13 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_opencore_amrwb_D_IF_init" >&5 $as_echo "$ac_cv_lib_opencore_amrwb_D_IF_init" >&6; } -if test "x$ac_cv_lib_opencore_amrwb_D_IF_init" = xyes; then : +if test "x$ac_cv_lib_opencore_amrwb_D_IF_init" = x""yes; then : opencore_amrwb_dec_present=1 && LIBS="$LIBS -lopencore-amrwb" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for E_IF_init in -lvo-amrwbenc" >&5 $as_echo_n "checking for E_IF_init in -lvo-amrwbenc... " >&6; } -if ${ac_cv_lib_vo_amrwbenc_E_IF_init+:} false; then : +if test "${ac_cv_lib_vo_amrwbenc_E_IF_init+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7372,7 +7388,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vo_amrwbenc_E_IF_init" >&5 $as_echo "$ac_cv_lib_vo_amrwbenc_E_IF_init" >&6; } -if test "x$ac_cv_lib_vo_amrwbenc_E_IF_init" = xyes; then : +if test "x$ac_cv_lib_vo_amrwbenc_E_IF_init" = x""yes; then : opencore_amrwb_enc_present=1 && LIBS="$LIBS -lvo-amrwbenc" fi @@ -7431,14 +7447,14 @@ $as_echo "Using SILK prefix... $with_silk" >&6; } ac_fn_c_check_header_mongrel "$LINENO" "SKP_Silk_SDK_API.h" "ac_cv_header_SKP_Silk_SDK_API_h" "$ac_includes_default" -if test "x$ac_cv_header_SKP_Silk_SDK_API_h" = xyes; then : +if test "x$ac_cv_header_SKP_Silk_SDK_API_h" = x""yes; then : silk_h_present=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK" >&5 $as_echo_n "checking for SKP_Silk_SDK_get_version in -lSKP_SILK_SDK... " >&6; } -if ${ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version+:} false; then : +if test "${ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -7472,7 +7488,7 @@ LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" >&5 $as_echo "$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" >&6; } -if test "x$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" = xyes; then : +if test "x$ac_cv_lib_SKP_SILK_SDK_SKP_Silk_SDK_get_version" = x""yes; then : silk_present=1 && LIBS="$LIBS -lSKP_SILK_SDK" fi diff --git a/aconfigure.ac b/aconfigure.ac index 9662820..58f1c1a 100644 --- a/aconfigure.ac +++ b/aconfigure.ac @@ -552,6 +552,17 @@ AC_ARG_WITH(external-srtp, ) +dnl # Resample implementation +AC_SUBST(ac_pjmedia_resample,libresample) +AC_ARG_ENABLE(resample, + AC_HELP_STRING([--disable-resample], + [Disable resampling implementations]), + [if test "$enable_resample" = "no"; then + [ac_pjmedia_resample=none] + AC_MSG_RESULT([Checking if resampling is disabled...yes]) + fi] + ) + dnl # Sound device backend selection AC_SUBST(ac_pjmedia_snd) AC_ARG_ENABLE(sound, @@ -844,8 +855,9 @@ AC_ARG_ENABLE(ilbc-codec, dnl # Include libsamplerate AC_ARG_ENABLE(libsamplerate, AC_HELP_STRING([--enable-libsamplerate], - [Link with libsamplerate when available. Note that PJMEDIA_RESAMPLE_IMP must also be configured]), - [ AC_CHECK_LIB(samplerate,src_new) ], + [Link with libsamplerate when available.]), + [ AC_CHECK_LIB(samplerate,src_new) ] + [ac_pjmedia_resample=libsamplerate], AC_MSG_RESULT([Skipping libsamplerate detection]) ) diff --git a/build.mak.in b/build.mak.in index e436667..476c23d 100644 --- a/build.mak.in +++ b/build.mak.in @@ -44,6 +44,7 @@ APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libsrtp.$(SHLIB_SUFFIX).$ endif endif +ifeq (@ac_pjmedia_resample@,libresample) APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample-$(LIB_SUFFIX) ifeq ($(PJ_SHARED_LIBRARIES),) ifeq (@ac_resample_dll@,1) @@ -57,6 +58,7 @@ else APP_THIRD_PARTY_LIBS += -lresample APP_THIRD_PARTY_LIB_FILES += $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX).$(PJ_VERSION_MAJOR) $(PJ_DIR)/third_party/lib/libresample.$(SHLIB_SUFFIX) endif +endif ifneq (@ac_no_gsm_codec@,1) ifeq (@ac_external_gsm@,1) diff --git a/pjmedia/build/Makefile b/pjmedia/build/Makefile index ca8e588..e1fcc6c 100644 --- a/pjmedia/build/Makefile +++ b/pjmedia/build/Makefile @@ -66,7 +66,7 @@ export PJMEDIA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ event.o format.o ffmpeg_util.o \ g711.o jbuf.o master_port.o mem_capture.o mem_player.o \ null_port.o plc_common.o port.o splitcomb.o \ - resample_resample.o resample_libsamplerate.o \ + resample_resample.o resample_libsamplerate.o resample_speex.o \ resample_port.o rtcp.o rtcp_xr.o rtp.o \ sdp.o sdp_cmp.o sdp_neg.o session.o silencedet.o \ sound_legacy.o sound_port.o stereo_port.o stream_common.o \ diff --git a/pjmedia/build/os-auto.mak.in b/pjmedia/build/os-auto.mak.in index e71cde1..a55fad2 100644 --- a/pjmedia/build/os-auto.mak.in +++ b/pjmedia/build/os-auto.mak.in @@ -140,6 +140,28 @@ export CFLAGS += -I$(THIRD_PARTY)/build/srtp \ endif +# +# Resample +# +AC_PJMEDIA_RESAMPLE=@ac_pjmedia_resample@ + +ifeq ($(AC_PJMEDIA_RESAMPLE),none) +# No resample support +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),speex) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX +endif + # # PortAudio # diff --git a/pjmedia/build/os-darwinos.mak b/pjmedia/build/os-darwinos.mak index 82fdfbf..3548c8e 100644 --- a/pjmedia/build/os-darwinos.mak +++ b/pjmedia/build/os-darwinos.mak @@ -78,6 +78,27 @@ export CODEC_OBJS += g7221.o export G7221_CFLAGS += -I$(THIRD_PARTY) endif +# +# Resample +# +AC_PJMEDIA_RESAMPLE=libresample + +ifeq ($(AC_PJMEDIA_RESAMPLE),none) +# No resample support +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),speex) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX +endif # # SRTP diff --git a/pjmedia/build/os-linux.mak b/pjmedia/build/os-linux.mak index a6d2dd3..eb05091 100644 --- a/pjmedia/build/os-linux.mak +++ b/pjmedia/build/os-linux.mak @@ -72,6 +72,27 @@ export CODEC_OBJS += g7221.o export G7221_CFLAGS += -I$(THIRD_PARTY) endif +# +# Resample +# +AC_PJMEDIA_RESAMPLE=libresample + +ifeq ($(AC_PJMEDIA_RESAMPLE),none) +# No resample support +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),speex) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX +endif # # SRTP diff --git a/pjmedia/build/os-rtems.mak b/pjmedia/build/os-rtems.mak index bbcfad4..cf7440f 100644 --- a/pjmedia/build/os-rtems.mak +++ b/pjmedia/build/os-rtems.mak @@ -6,3 +6,4 @@ export CFLAGS += -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_NULL_SOUND export PJMEDIA_OBJS += nullsound.o export SOUND_OBJS = $(NULLSOUND_OBJS) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE diff --git a/pjmedia/build/os-win32.mak b/pjmedia/build/os-win32.mak index 0df71a5..b85183a 100644 --- a/pjmedia/build/os-win32.mak +++ b/pjmedia/build/os-win32.mak @@ -74,6 +74,27 @@ export CODEC_OBJS += g7221.o export G7221_CFLAGS += -I$(THIRD_PARTY) endif +# +# Resample +# +AC_PJMEDIA_RESAMPLE=libresample + +ifeq ($(AC_PJMEDIA_RESAMPLE),none) +# No resample support +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_NONE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libresample) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBRESAMPLE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),libsamplerate) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_LIBSAMPLERATE +endif + +ifeq ($(AC_PJMEDIA_RESAMPLE),speex) +export CFLAGS += -DPJMEDIA_RESAMPLE_IMP=PJMEDIA_RESAMPLE_SPEEX +endif # # SRTP diff --git a/third_party/build/Makefile b/third_party/build/Makefile index 8cfe9cf..e1cb0da 100644 --- a/third_party/build/Makefile +++ b/third_party/build/Makefile @@ -1,4 +1,4 @@ -DIRS = resample milenage +DIRS = milenage include ../../build.mak include $(PJDIR)/build/common.mak diff --git a/third_party/build/os-auto.mak.in b/third_party/build/os-auto.mak.in index dfc32a9..8be9597 100644 --- a/third_party/build/os-auto.mak.in +++ b/third_party/build/os-auto.mak.in @@ -36,3 +36,7 @@ ifeq (@ac_external_srtp@,1) else DIRS += srtp endif + +ifeq (@ac_pjmedia_resample@,libresample) +DIRS += resample +endif diff --git a/third_party/build/os-darwinos.mak b/third_party/build/os-darwinos.mak index 7c94029..6a53b71 100644 --- a/third_party/build/os-darwinos.mak +++ b/third_party/build/os-darwinos.mak @@ -4,5 +4,6 @@ DIRS += speex DIRS += portaudio DIRS += g7221 DIRS += srtp +DIRS += resample diff --git a/third_party/build/os-linux.mak b/third_party/build/os-linux.mak index 7c94029..6a53b71 100644 --- a/third_party/build/os-linux.mak +++ b/third_party/build/os-linux.mak @@ -4,5 +4,6 @@ DIRS += speex DIRS += portaudio DIRS += g7221 DIRS += srtp +DIRS += resample diff --git a/third_party/build/os-win32.mak b/third_party/build/os-win32.mak index 7c94029..6a53b71 100644 --- a/third_party/build/os-win32.mak +++ b/third_party/build/os-win32.mak @@ -4,5 +4,6 @@ DIRS += speex DIRS += portaudio DIRS += g7221 DIRS += srtp +DIRS += resample -- cgit v1.2.3