Commit e0cf802a authored by Ghislain MARY's avatar Ghislain MARY

Add WebRTC echo canceller.

parent f8281c85
......@@ -36,7 +36,9 @@ MEDIASTREAMER2_INCLUDES := \
$(LOCAL_PATH)/../../../externals/ffmpeg \
$(LOCAL_PATH)/../../../externals/ \
$(LOCAL_PATH)/../../../externals/build/ffmpeg \
$(LOCAL_PATH)/../../../externals/libvpx/
$(LOCAL_PATH)/../../../externals/libvpx/ \
$(LOCAL_PATH)/../../../externals/webrtc/ \
$(LOCAL_PATH)/../../../externals/webrtc/modules/audio_processing/aecm/include
LOCAL_MODULE := libmediastreamer2
......@@ -89,6 +91,11 @@ LOCAL_SRC_FILES = \
android/AudioSystem.cpp \
android/String8.cpp
ifneq ($(TARGET_ARCH_ABI), x86)
LOCAL_SRC_FILES += \
webrtc_aec.c
endif
##if BUILD_ALSA
ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
LOCAL_SRC_FILES += alsa.c
......@@ -173,6 +180,19 @@ LOCAL_STATIC_LIBRARIES := \
libspeex \
libspeexdsp
ifneq ($(TARGET_ARCH_ABI), x86)
LOCAL_STATIC_LIBRARIES += \
libwebrtc_aecm \
libwebrtc_apm_utility \
libwebrtc_spl \
libwebrtc_system_wrappers
ifeq ($(TARGET_ARCH_ABI), armeabi-v7a)
LOCAL_STATIC_LIBRARIES += \
libwebrtc_aecm_neon \
libwebrtc_spl_neon
endif
endif
ifeq ($(strip $(BOARD_USES_ALSA_AUDIO)),true)
LOCAL_SHARED_LIBRARIES += libasound
......
......@@ -37,6 +37,9 @@ extern MSFilterDesc ms_g722_enc_desc;
extern MSFilterDesc ms_l16_enc_desc;
extern MSFilterDesc ms_l16_dec_desc;
extern MSFilterDesc ms_jpeg_writer_desc;
#ifdef __arm__
extern MSFilterDesc ms_webrtc_aec_desc;
#endif
MSFilterDesc * ms_voip_filter_descs[]={
......@@ -76,6 +79,9 @@ MSFilterDesc * ms_voip_filter_descs[]={
&ms_vp8_dec_desc,
&ms_jpeg_writer_desc,
#endif
#ifdef __arm__
&ms_webrtc_aec_desc,
#endif
NULL
};
......@@ -133,7 +133,8 @@ typedef enum MSFilterId{
MS_L16_DEC_ID,
MS_OSX_GL_DISPLAY_ID,
MS_GLXVIDEO_ID,
MS_GENERIC_PLC_ID
MS_GENERIC_PLC_ID,
MS_WEBRTC_AEC_ID
} MSFilterId;
......
......@@ -725,7 +725,11 @@ AudioStream *audio_stream_new(int loc_rtp_port, int loc_rtcp_port, bool_t ipv6){
if (ec_desc!=NULL)
stream->ec=ms_filter_new_from_desc(ec_desc);
else
#if defined(ANDROID) && defined __arm__
stream->ec=ms_filter_new(MS_WEBRTC_AEC_ID);
#else
stream->ec=ms_filter_new(MS_SPEEX_EC_ID);
#endif
stream->evq=ortp_ev_queue_new();
rtp_session_register_event_queue(stream->session,stream->evq);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment