This commit is contained in:
Jehan Monnier 2013-09-16 11:54:16 +02:00
commit a960a10397
15 changed files with 263 additions and 4 deletions

View file

@ -7,7 +7,7 @@
<classpathentry kind="src" path="submodules/externals/axmlrpc/src/main/java"/> <classpathentry kind="src" path="submodules/externals/axmlrpc/src/main/java"/>
<classpathentry kind="src" path="submodules/linphone/coreapi/help/java"/> <classpathentry kind="src" path="submodules/linphone/coreapi/help/java"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/> <classpathentry kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry exported="true" kind="lib" path="libs/gcm.jar"/> <classpathentry exported="true" kind="lib" path="libs/gcm.jar"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/> <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>

3
.gitmodules vendored
View file

@ -73,3 +73,6 @@
[submodule "submodules/externals/polarssl"] [submodule "submodules/externals/polarssl"]
path = submodules/externals/polarssl path = submodules/externals/polarssl
url = git://git.linphone.org/polarssl.git url = git://git.linphone.org/polarssl.git
[submodule "submodules/externals/opus"]
path = submodules/externals/opus
url = git://git.opus-codec.org/opus.git

View file

@ -21,8 +21,10 @@ BUILD_AMRWB=0
BUILD_GPLV3_ZRTP=0 BUILD_GPLV3_ZRTP=0
BUILD_SILK=1 BUILD_SILK=1
BUILD_G729=0 BUILD_G729=0
BUILD_OPUS=1
BUILD_TUNNEL=0 BUILD_TUNNEL=0
BUILD_WEBRTC_AECM=1 BUILD_WEBRTC_AECM=1
BUILD_OPUS=1
BUILD_FOR_X86=1 BUILD_FOR_X86=1
USE_JAVAH=1 USE_JAVAH=1
BUILD_TLS=1 BUILD_TLS=1
@ -165,7 +167,7 @@ prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-sr
LIBLINPHONE_OPTIONS = NDK_DEBUG=$(NDK_DEBUG) LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_UPNP=$(BUILD_UPNP) BUILD_REMOTE_PROVISIONING=$(BUILD_REMOTE_PROVISIONING) BUILD_X264=$(BUILD_X264) \ LIBLINPHONE_OPTIONS = NDK_DEBUG=$(NDK_DEBUG) LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_UPNP=$(BUILD_UPNP) BUILD_REMOTE_PROVISIONING=$(BUILD_REMOTE_PROVISIONING) BUILD_X264=$(BUILD_X264) \
BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) \ BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) \
BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) BUILD_TLS=$(BUILD_TLS) BUILD_SQLITE=$(BUILD_SQLITE) \ BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) BUILD_TLS=$(BUILD_TLS) BUILD_SQLITE=$(BUILD_SQLITE) \
BELLESIP_VERSION=$(BELLESIP_VERSION) BELLESIP_VERSION=$(BELLESIP_VERSION) BUILD_OPUS=$(BUILD_OPUS)
generate-libs: prepare-sources javah generate-libs: prepare-sources javah

View file

@ -146,6 +146,10 @@ include $(linphone-root-dir)/submodules/bcg729/Android.mk
include $(linphone-root-dir)/submodules/bcg729/msbcg729/Android.mk include $(linphone-root-dir)/submodules/bcg729/msbcg729/Android.mk
endif endif
ifneq ($(BUILD_OPUS), 0)
include $(linphone-root-dir)/submodules/externals/build/opus/Android.mk
endif
ifneq ($(BUILD_WEBRTC_AECM), 0) ifneq ($(BUILD_WEBRTC_AECM), 0)
ifneq ($(TARGET_ARCH), x86) ifneq ($(TARGET_ARCH), x86)
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)

View file

@ -62,6 +62,10 @@ ifeq ($(BUILD_G729),1)
APP_MODULES +=libbcg729 libmsbcg729 APP_MODULES +=libbcg729 libmsbcg729
endif endif
ifneq ($(BUILD_OPUS), 0)
APP_MODULES += libopus
endif
ifneq ($(BUILD_WEBRTC_AECM), 0) ifneq ($(BUILD_WEBRTC_AECM), 0)
APP_MODULES += libwebrtc_system_wrappers libwebrtc_spl libwebrtc_apm_utility libwebrtc_aecm APP_MODULES += libwebrtc_system_wrappers libwebrtc_spl libwebrtc_apm_utility libwebrtc_aecm
APP_MODULES += libwebrtc_spl_neon libwebrtc_aecm_neon APP_MODULES += libwebrtc_spl_neon libwebrtc_aecm_neon

View file

@ -11,5 +11,5 @@
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target. # Project target.
target=android-17 target=android-18
android.library=false android.library=false

View file

@ -7,6 +7,7 @@
<bool name="pref_echo_canceller_default">true</bool> <bool name="pref_echo_canceller_default">true</bool>
<!-- Audio codecs --> <!-- Audio codecs -->
<bool name="pref_codec_opus_default">true</bool>
<bool name="pref_codec_speex16_default">true</bool> <bool name="pref_codec_speex16_default">true</bool>
<bool name="pref_codec_speex8_default">true</bool> <bool name="pref_codec_speex8_default">true</bool>
<bool name="pref_codec_ilbc_default">true</bool> <bool name="pref_codec_ilbc_default">true</bool>

View file

@ -89,6 +89,7 @@
<string name="pref_codec_silk12_key">pref_codec_silk12_key</string> <string name="pref_codec_silk12_key">pref_codec_silk12_key</string>
<string name="pref_codec_silk16_key">pref_codec_silk16_key</string> <string name="pref_codec_silk16_key">pref_codec_silk16_key</string>
<string name="pref_codec_silk24_key">pref_codec_silk24_key</string> <string name="pref_codec_silk24_key">pref_codec_silk24_key</string>
<string name="pref_codec_opus_key">pref_codec_opus_key</string>
<string name="pref_codecs_key">pref_codecs_key</string> <string name="pref_codecs_key">pref_codecs_key</string>
<string name="pref_stun_server_key">pref_stun_server_key</string> <string name="pref_stun_server_key">pref_stun_server_key</string>
<string name="pref_ice_enable_key">pref_ice_enable_key</string> <string name="pref_ice_enable_key">pref_ice_enable_key</string>

View file

@ -155,6 +155,7 @@
<string name="pref_codec_ilbc">ilbc</string> <string name="pref_codec_ilbc">ilbc</string>
<string name="pref_codec_speex8">speex 8 Khz</string> <string name="pref_codec_speex8">speex 8 Khz</string>
<string name="pref_codec_speex16">speex 16 Khz</string> <string name="pref_codec_speex16">speex 16 Khz</string>
<string name="pref_codec_opus">opus 48Khz</string>
<string name="pref_codec_silk8">silk 8 Khz</string> <string name="pref_codec_silk8">silk 8 Khz</string>
<string name="pref_codec_silk12">silk 12 Khz</string> <string name="pref_codec_silk12">silk 12 Khz</string>
<string name="pref_codec_silk16">silk 16 Khz</string> <string name="pref_codec_silk16">silk 16 Khz</string>

View file

@ -62,6 +62,9 @@
android:key="@string/pref_codecs_key"> android:key="@string/pref_codecs_key">
<CheckBoxPreference <CheckBoxPreference
android:key="@string/pref_codec_opus_key"
android:defaultValue="@bool/pref_codec_opus_default"
android:title="@string/pref_codec_opus"/><CheckBoxPreference
android:key="@string/pref_codec_speex16_key" android:key="@string/pref_codec_speex16_key"
android:defaultValue="@bool/pref_codec_speex16_default" android:defaultValue="@bool/pref_codec_speex16_default"
android:title="@string/pref_codec_speex16"/> android:title="@string/pref_codec_speex16"/>

View file

@ -146,6 +146,7 @@ public class PreferencesFragment extends PreferencesListFragment implements EcCa
detectAudioCodec(R.string.pref_codec_silk16_key,"SILK",16000, 1, true); detectAudioCodec(R.string.pref_codec_silk16_key,"SILK",16000, 1, true);
//detectAudioCodec(R.string.pref_codec_silk24_key,"SILK",24000, 1, true); //detectAudioCodec(R.string.pref_codec_silk24_key,"SILK",24000, 1, true);
detectAudioCodec(R.string.pref_codec_g729_key,"G729",8000, 1, true); detectAudioCodec(R.string.pref_codec_g729_key,"G729",8000, 1, true);
detectAudioCodec(R.string.pref_codec_opus_key,"OPUS",48000, 1, true);
// No video // No video
if (!Version.isVideoCapable()) { if (!Version.isVideoCapable()) {

View file

@ -0,0 +1,98 @@
LOCAL_PATH:= $(call my-dir)/../../opus
BUILD_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := libopus
LOCAL_SRC_FILES += \
celt/bands.c celt/celt.c celt/cwrs.c \
celt/entcode.c celt/entdec.c celt/entenc.c celt/kiss_fft.c \
celt/laplace.c celt/mathops.c celt/mdct.c celt/modes.c \
celt/pitch.c celt/celt_lpc.c celt/quant_bands.c celt/rate.c \
celt/vq.c silk/CNG.c silk/code_signs.c silk/init_decoder.c \
celt/celt_encoder.c celt/celt_decoder.c \
silk/decode_core.c silk/decode_frame.c \
silk/decode_parameters.c silk/decode_indices.c \
silk/decode_pulses.c silk/decoder_set_fs.c silk/dec_API.c \
silk/enc_API.c silk/encode_indices.c silk/encode_pulses.c \
silk/gain_quant.c silk/interpolate.c silk/LP_variable_cutoff.c \
silk/NLSF_decode.c silk/NSQ.c silk/NSQ_del_dec.c silk/PLC.c \
silk/shell_coder.c silk/tables_gain.c silk/tables_LTP.c \
silk/tables_NLSF_CB_NB_MB.c silk/tables_NLSF_CB_WB.c \
silk/tables_other.c silk/tables_pitch_lag.c \
silk/tables_pulses_per_block.c silk/VAD.c \
silk/control_audio_bandwidth.c silk/quant_LTP_gains.c \
silk/VQ_WMat_EC.c silk/HP_variable_cutoff.c silk/NLSF_encode.c \
silk/NLSF_VQ.c silk/NLSF_unpack.c silk/NLSF_del_dec_quant.c \
silk/process_NLSFs.c silk/stereo_LR_to_MS.c \
silk/stereo_MS_to_LR.c silk/check_control_input.c \
silk/control_SNR.c silk/init_encoder.c silk/control_codec.c \
silk/A2NLSF.c silk/ana_filt_bank_1.c silk/biquad_alt.c \
silk/bwexpander_32.c silk/bwexpander.c silk/debug.c \
silk/decode_pitch.c silk/inner_prod_aligned.c silk/lin2log.c \
silk/log2lin.c silk/LPC_analysis_filter.c \
silk/LPC_inv_pred_gain.c silk/table_LSF_cos.c silk/NLSF2A.c \
silk/NLSF_stabilize.c silk/NLSF_VQ_weights_laroia.c \
silk/pitch_est_tables.c silk/resampler.c \
silk/resampler_down2_3.c silk/resampler_down2.c \
silk/resampler_private_AR2.c silk/resampler_private_down_FIR.c \
silk/resampler_private_IIR_FIR.c \
silk/resampler_private_up2_HQ.c silk/resampler_rom.c \
silk/sigm_Q15.c silk/sort.c silk/sum_sqr_shift.c \
silk/stereo_decode_pred.c silk/stereo_encode_pred.c \
silk/stereo_find_predictor.c silk/stereo_quant_pred.c \
silk/fixed/LTP_analysis_filter_FIX.c \
silk/fixed/LTP_scale_ctrl_FIX.c silk/fixed/corrMatrix_FIX.c \
silk/fixed/encode_frame_FIX.c silk/fixed/find_LPC_FIX.c \
silk/fixed/find_LTP_FIX.c silk/fixed/find_pitch_lags_FIX.c \
silk/fixed/find_pred_coefs_FIX.c \
silk/fixed/noise_shape_analysis_FIX.c \
silk/fixed/prefilter_FIX.c silk/fixed/process_gains_FIX.c \
silk/fixed/regularize_correlations_FIX.c \
silk/fixed/residual_energy16_FIX.c \
silk/fixed/residual_energy_FIX.c silk/fixed/solve_LS_FIX.c \
silk/fixed/warped_autocorrelation_FIX.c \
silk/fixed/apply_sine_window_FIX.c silk/fixed/autocorr_FIX.c \
silk/fixed/burg_modified_FIX.c silk/fixed/k2a_FIX.c \
silk/fixed/k2a_Q16_FIX.c silk/fixed/pitch_analysis_core_FIX.c \
silk/fixed/vector_ops_FIX.c silk/fixed/schur64_FIX.c \
silk/fixed/schur_FIX.c silk/float/apply_sine_window_FLP.c \
silk/float/corrMatrix_FLP.c silk/float/encode_frame_FLP.c \
silk/float/find_LPC_FLP.c silk/float/find_LTP_FLP.c \
silk/float/find_pitch_lags_FLP.c \
silk/float/find_pred_coefs_FLP.c \
silk/float/LPC_analysis_filter_FLP.c \
silk/float/LTP_analysis_filter_FLP.c \
silk/float/LTP_scale_ctrl_FLP.c \
silk/float/noise_shape_analysis_FLP.c \
silk/float/prefilter_FLP.c silk/float/process_gains_FLP.c \
silk/float/regularize_correlations_FLP.c \
silk/float/residual_energy_FLP.c silk/float/solve_LS_FLP.c \
silk/float/warped_autocorrelation_FLP.c \
silk/float/wrappers_FLP.c silk/float/autocorrelation_FLP.c \
silk/float/burg_modified_FLP.c silk/float/bwexpander_FLP.c \
silk/float/energy_FLP.c silk/float/inner_product_FLP.c \
silk/float/k2a_FLP.c silk/float/levinsondurbin_FLP.c \
silk/float/LPC_inv_pred_gain_FLP.c \
silk/float/pitch_analysis_core_FLP.c \
silk/float/scale_copy_vector_FLP.c \
silk/float/scale_vector_FLP.c silk/float/schur_FLP.c \
silk/float/sort_FLP.c src/opus.c src/opus_decoder.c \
src/opus_encoder.c src/opus_multistream.c src/repacketizer.c \
src/analysis.c src/mlp.c src/mlp_data.c
LOCAL_C_INCLUDES += \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/celt \
$(LOCAL_PATH)/silk \
$(LOCAL_PATH)/silk/float
LOCAL_CFLAGS += -include ../build/opus/config.h
LOCAL_ARM_MODE := arm
include $(BUILD_STATIC_LIBRARY)

140
submodules/externals/build/opus/config.h vendored Normal file
View file

@ -0,0 +1,140 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Custom modes */
/* #undef CUSTOM_MODES */
/* Assertions */
/* #undef ENABLE_ASSERTIONS */
/* Debug fixed-point implementation */
/* #undef FIXED_DEBUG */
/* Compile as fixed-point (for machines without a fast enough FPU) */
/* #undef FIXED_POINT */
/* Float approximations */
/* #undef FLOAT_APPROX */
/* Fuzzing */
/* #undef FUZZING */
/* Define to 1 if you have the <alloca.h> header file. */
#define HAVE_ALLOCA_H 1
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <getopt.h> header file. */
#define HAVE_GETOPT_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if you have the `lrint' function. */
#define HAVE_LRINT 1
/* Define to 1 if you have the `lrintf' function. */
#define HAVE_LRINTF 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 if you have the `__malloc_hook' function. */
#define HAVE___MALLOC_HOOK 1
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* This is a build of OPUS */
#define OPUS_BUILD /**/
/* Opus library version string */
#define OPUS_VERSION "1.0.2-2-g48e62c5"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME ""
/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION ""
/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4
/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8
/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Make use of alloca */
/* #undef USE_ALLOCA */
/* Use C99 variable-size arrays */
#define VAR_ARRAYS /**/
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
#define restrict __restrict
/* Work around a bug in Sun C++: it does not support _Restrict or
__restrict__, even though the corresponding Sun C compiler ends up with
"#define restrict _Restrict" or "#define restrict __restrict__" in the
previous line. Perhaps some future version of Sun C++ will work with
restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
#if defined __SUNPRO_CC && !defined __RESTRICT
# define _Restrict
# define __restrict__
#endif

1
submodules/externals/opus vendored Submodule

@ -0,0 +1 @@
Subproject commit fcecd29abf32164326e568acdcdf7d8e877b33b1

@ -1 +1 @@
Subproject commit ab2b7d0e38e40c362015ed04e699f8c4286e064b Subproject commit 632f0ac005b532e3a5d1b8ba3ef550df789b10ee