diff --git a/media/libvpx/Makefile.in b/media/libvpx/Makefile.in index 1731c61a8af9..3360871e5e43 100644 --- a/media/libvpx/Makefile.in +++ b/media/libvpx/Makefile.in @@ -285,11 +285,11 @@ DEFINES += -D__linux__ # For cpu-features.h LOCAL_INCLUDES += -I$(ANDROID_NDK)/sources/android/cpufeatures +ifndef MOZ_WEBRTC # For cpu-features.c VPATH += $(ANDROID_NDK)/sources/android/cpufeatures - CSRCS += cpu-features.c - +endif endif CSRCS += \ diff --git a/media/webrtc/shared_libs.mk b/media/webrtc/shared_libs.mk index f1d84ab6329f..e1281292d41a 100644 --- a/media/webrtc/shared_libs.mk +++ b/media/webrtc/shared_libs.mk @@ -46,12 +46,19 @@ WEBRTC_LIBS += \ $(NULL) endif +ifeq ($(CPU_ARCH), arm) +# extra ARM libs +WEBRTC_LIBS += \ + $(call EXPAND_LIBNAME_PATH,cpu_features_android,$(DEPTH)/media/webrtc/trunk/webrtc/system_wrappers/source/system_wrappers_cpu_features_android) \ + $(NULL) # neon for ARM ifeq ($(HAVE_ARM_NEON),1) WEBRTC_LIBS += \ - $(call EXPAND_LIBNAME_PATH,aecm_neon,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_aecm_neon) \ + $(call EXPAND_LIBNAME_PATH,signal_processing_neon,$(DEPTH)/media/webrtc/trunk/webrtc/common_audio/common_audio_signal_processing_neon) \ + $(call EXPAND_LIBNAME_PATH,audio_processing_neon,$(DEPTH)/media/webrtc/trunk/webrtc/modules/modules_audio_processing_neon) \ $(NULL) endif +endif # If you enable one of these codecs in webrtc_config.gypi, you'll need to re-add the diff --git a/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py b/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py index c2da9aae03ea..bd8135aa6810 100644 --- a/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py +++ b/media/webrtc/trunk/tools/gyp/pylib/gyp/generator/mozmake.py @@ -55,11 +55,13 @@ CFLAGS += $(CPPFLAGS_Debug) $(CFLAGS_Debug) CXXFLAGS += $(CPPFLAGS_Debug) $(CXXFLAGS_Debug) DEFINES += $(DEFINES_Debug) LOCAL_INCLUDES += $(INCLUDES_Debug) +ASFLAGS += $(ASFLAGS_Debug) else # non-MOZ_DEBUG CFLAGS += $(CPPFLAGS_Release) $(CFLAGS_Release) CXXFLAGS += $(CPPFLAGS_Release) $(CXXFLAGS_Release) DEFINES += $(DEFINES_Release) LOCAL_INCLUDES += $(INCLUDES_Release) +ASFLAGS += $(ASFLAGS_Release) endif ifeq (WINNT,$(OS_TARGET)) @@ -166,6 +168,10 @@ def striplib(name): return name[3:] return name +AS_EXTENSIONS = set([ + '.s', + '.S' +]) CPLUSPLUS_EXTENSIONS = set([ '.cc', '.cpp', @@ -320,12 +326,15 @@ class MakefileGenerator(object): cflags_mozilla = config.get('cflags_mozilla') if cflags_mozilla: data['CPPFLAGS_%s' % configname] = cflags_mozilla + asflags_mozilla = config.get('asflags_mozilla') + if asflags_mozilla: + data['ASFLAGS_%s' % configname] = asflags_mozilla sources = { 'CPPSRCS': {'exts': CPLUSPLUS_EXTENSIONS, 'files': []}, 'CSRCS': {'exts': ['.c'], 'files': []}, 'CMSRCS': {'exts': ['.m'], 'files': []}, 'CMMSRCS': {'exts': ['.mm'], 'files': []}, - 'ASFILES': {'exts': ['.s'], 'files': []}, + 'SSRCS': {'exts': AS_EXTENSIONS, 'files': []}, } copy_srcs = [] for s in spec.get('sources', []): diff --git a/media/webrtc/trunk/webrtc/build/arm_neon.gypi b/media/webrtc/trunk/webrtc/build/arm_neon.gypi index bc05c2e94763..47d16c2702f4 100644 --- a/media/webrtc/trunk/webrtc/build/arm_neon.gypi +++ b/media/webrtc/trunk/webrtc/build/arm_neon.gypi @@ -34,4 +34,19 @@ '-mfpu=neon', '-flax-vector-conversions', ], + 'asflags!': [ + '-mfpu=vfpv3-d16', + ], + 'asflags_mozilla!': [ + '-mfpu=vfpv3-d16', + ], + 'asflags': [ + '-mfpu=neon', + '-flax-vector-conversions', + ], + 'asflags_mozilla': [ + '-mfpu=neon', + '-flax-vector-conversions', + ], + } diff --git a/media/webrtc/trunk/webrtc/build/common.gypi b/media/webrtc/trunk/webrtc/build/common.gypi index 7b2db93ccfcc..2de4cf2049d6 100644 --- a/media/webrtc/trunk/webrtc/build/common.gypi +++ b/media/webrtc/trunk/webrtc/build/common.gypi @@ -202,9 +202,9 @@ 'defines': ['WEBRTC_ARCH_ARM_V7',], 'conditions': [ ['arm_neon==1', { - 'defines': ['WEBRTC_ARCH_ARM_NEON',], - }, { - 'defines': ['WEBRTC_DETECT_ARM_NEON',], + 'defines': ['WEBRTC_ARCH_ARM_NEON', + 'WEBRTC_BUILD_NEON_LIBS', + 'WEBRTC_DETECT_ARM_NEON'], }], ], }], diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.cc b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.cc index e0744d6a9395..e1f36846eb74 100644 --- a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.cc +++ b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.cc @@ -64,6 +64,7 @@ AudioDeviceAndroidOpenSLES::AudioDeviceAndroidOpenSLES(const WebRtc_Word32 id) playout_delay_(0), recording_delay_(0), agc_enabled_(false), + rec_thread_(NULL), rec_timer_(*EventWrapper::Create()), mic_sampling_rate_(N_REC_SAMPLES_PER_SEC * 1000), speaker_sampling_rate_(N_PLAY_SAMPLES_PER_SEC * 1000), @@ -1396,7 +1397,7 @@ void AudioDeviceAndroidOpenSLES::RecorderSimpleBufferQueueCallbackHandler( void AudioDeviceAndroidOpenSLES::CheckErr(SLresult res) { if (res != SL_RESULT_SUCCESS) { WEBRTC_OPENSL_TRACE(kTraceError, kTraceAudioDevice, id_, - " AudioDeviceAndroidOpenSLES::CheckErr(%d)", res); + " AudioDeviceAndroidOpenSLES::CheckErr(%lu)", res); exit(-1); } } diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.h b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.h index 2b2d7463808d..eb1603b6c0fb 100644 --- a/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.h +++ b/media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.h @@ -51,7 +51,7 @@ const WebRtc_UWord32 PLAY_MAX_TEMP_BUF_SIZE_PER_10ms = const WebRtc_UWord16 N_PLAY_QUEUE_BUFFERS = 8; // Number of buffers in recording queue // TODO(xian): Reduce the numbers of buffers to improve the latency. -const WebRtc_UWord16 N_REC_QUEUE_BUFFERS = 8; +const WebRtc_UWord16 N_REC_QUEUE_BUFFERS = 16; // Some values returned from getMinBufferSize // (Nexus S playout 72ms, recording 64ms) // (Galaxy, 167ms, 44ms) diff --git a/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing.gypi b/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing.gypi index ef130831c043..5ed8c25f1d58 100644 --- a/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing.gypi +++ b/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing.gypi @@ -177,11 +177,14 @@ 'audio_processing_offsets', ], # TODO(kma): port this block from Android into other build systems. - 'sources': [ + # + # We disable the ASM source, because our gyp->Makefile translator + # does not support the build steps to get the asm offsets. + 'sources!': [ 'aecm/aecm_core_neon.S', 'ns/nsx_core_neon.S', ], - 'sources!': [ + 'sources': [ 'aecm/aecm_core_neon.c', 'ns/nsx_core_neon.c', ], diff --git a/media/webrtc/webrtc_config.gypi b/media/webrtc/webrtc_config.gypi index 2a5d23dcc1a1..a109402bef7d 100644 --- a/media/webrtc/webrtc_config.gypi +++ b/media/webrtc/webrtc_config.gypi @@ -16,6 +16,7 @@ 'enable_protobuf': 0, 'include_pulse_audio': 0, 'include_tests': 0, + 'enable_android_opensl': 1, # use_system_lib* still seems to be in use in trunk/build 'use_system_libjpeg': 0, 'use_system_libvpx': 0,