mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 825112: Enable opensles webrtc backend on gonk r=mwu,jesup,ted
--HG-- rename : media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.cc => media/webrtc/trunk/webrtc/modules/audio_device/audio_device_opensles.cc rename : media/webrtc/trunk/webrtc/modules/audio_device/android/audio_device_opensles_android.h => media/webrtc/trunk/webrtc/modules/audio_device/audio_device_opensles.h
This commit is contained in:
parent
53ca275f89
commit
3f6b4f213a
@ -9134,7 +9134,7 @@ if test -n "$MOZ_WEBRTC"; then
|
||||
AC_MSG_RESULT("generating WebRTC Makefiles...")
|
||||
|
||||
if test "${MOZ_WIDGET_TOOLKIT}" = "gonk"; then
|
||||
EXTRA_GYP_DEFINES="${EXTRA_GYP_DEFINES} -D build_with_gonk=1 -D include_internal_audio_device=0"
|
||||
EXTRA_GYP_DEFINES="${EXTRA_GYP_DEFINES} -D build_with_gonk=1"
|
||||
fi
|
||||
|
||||
dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries
|
||||
|
@ -21,6 +21,7 @@ include $(topsrcdir)/ipc/chromium/chromium-config.mk
|
||||
|
||||
ifdef MOZ_WEBRTC
|
||||
LOCAL_INCLUDES += \
|
||||
-I$(topsrcdir)/media/webrtc/trunk \
|
||||
-I$(topsrcdir)/media/webrtc/trunk/webrtc \
|
||||
-I$(topsrcdir)/media/webrtc/signaling/src/common \
|
||||
-I$(topsrcdir)/media/webrtc/signaling/src/common/browser_logging \
|
||||
|
@ -71,6 +71,12 @@
|
||||
'android',
|
||||
],
|
||||
}], # OS==android
|
||||
['moz_widget_toolkit_gonk==1', {
|
||||
'include_dirs': [
|
||||
'$(ANDROID_SOURCE)/frameworks/wilhelm/include',
|
||||
'$(ANDROID_SOURCE)/system/media/wilhelm/include',
|
||||
],
|
||||
}], # moz_widget_toolkit_gonk==1
|
||||
['include_internal_audio_device==0', {
|
||||
'defines': [
|
||||
'WEBRTC_DUMMY_AUDIO_BUILD',
|
||||
@ -105,13 +111,16 @@
|
||||
'win/audio_mixer_manager_win.h',
|
||||
'android/audio_device_utility_android.cc',
|
||||
'android/audio_device_utility_android.h',
|
||||
'android/audio_device_opensles_android.cc',
|
||||
'android/audio_device_opensles_android.h',
|
||||
# opensles is shared with gonk, so isn't here
|
||||
'android/audio_device_jni_android.cc',
|
||||
'android/audio_device_jni_android.h',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="android"', {
|
||||
'sources': [
|
||||
'audio_device_opensles.cc',
|
||||
'audio_device_opensles.h',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'-llog',
|
||||
@ -119,6 +128,12 @@
|
||||
],
|
||||
},
|
||||
}],
|
||||
['moz_widget_toolkit_gonk==1', {
|
||||
'sources': [
|
||||
'audio_device_opensles.cc',
|
||||
'audio_device_opensles.h',
|
||||
],
|
||||
}],
|
||||
['OS=="linux"', {
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
|
@ -26,8 +26,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include "audio_device_utility_android.h"
|
||||
#include "audio_device_opensles_android.h"
|
||||
#include "audio_device_opensles.h"
|
||||
#include "audio_device_jni_android.h"
|
||||
#elif defined(WEBRTC_GONK)
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include "audio_device_utility_linux.h"
|
||||
#include "audio_device_opensles.h"
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
#include <stdlib.h>
|
||||
#include "audio_device_utility_android.h"
|
||||
@ -260,7 +265,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
||||
|
||||
// Create the *Android OpenSLES* implementation of the Audio Device
|
||||
//
|
||||
#if defined(WEBRTC_ANDROID_OPENSLES)
|
||||
#if defined(WEBRTC_ANDROID_OPENSLES) || defined(WEBRTC_GONK)
|
||||
// Check if the OpenSLES library is available before going further.
|
||||
void* opensles_lib = dlopen("libOpenSLES.so", RTLD_LAZY);
|
||||
if (opensles_lib) {
|
||||
@ -275,12 +280,15 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(WEBRTC_GONK)
|
||||
if (ptrAudioDevice != NULL)
|
||||
{
|
||||
// Create the Android implementation of the Device Utility.
|
||||
ptrAudioDeviceUtility = new AudioDeviceUtilityAndroid(Id());
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if defined(WEBRTC_ANDROID_OPENSLES) or defined(WEBRTC_ANDROID)
|
||||
// Fall back to this case if on Android 2.2/OpenSLES not available.
|
||||
if (ptrAudioDevice == NULL) {
|
||||
|
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "modules/audio_device/android/audio_device_opensles_android.h"
|
||||
#include "modules/audio_device/audio_device_opensles.h"
|
||||
|
||||
#ifdef WEBRTC_ANDROID_DEBUG
|
||||
#include <android/log.h>
|
Loading…
Reference in New Issue
Block a user