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...")
|
AC_MSG_RESULT("generating WebRTC Makefiles...")
|
||||||
|
|
||||||
if test "${MOZ_WIDGET_TOOLKIT}" = "gonk"; then
|
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
|
fi
|
||||||
|
|
||||||
dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries
|
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
|
ifdef MOZ_WEBRTC
|
||||||
LOCAL_INCLUDES += \
|
LOCAL_INCLUDES += \
|
||||||
|
-I$(topsrcdir)/media/webrtc/trunk \
|
||||||
-I$(topsrcdir)/media/webrtc/trunk/webrtc \
|
-I$(topsrcdir)/media/webrtc/trunk/webrtc \
|
||||||
-I$(topsrcdir)/media/webrtc/signaling/src/common \
|
-I$(topsrcdir)/media/webrtc/signaling/src/common \
|
||||||
-I$(topsrcdir)/media/webrtc/signaling/src/common/browser_logging \
|
-I$(topsrcdir)/media/webrtc/signaling/src/common/browser_logging \
|
||||||
|
@ -71,6 +71,12 @@
|
|||||||
'android',
|
'android',
|
||||||
],
|
],
|
||||||
}], # OS==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', {
|
['include_internal_audio_device==0', {
|
||||||
'defines': [
|
'defines': [
|
||||||
'WEBRTC_DUMMY_AUDIO_BUILD',
|
'WEBRTC_DUMMY_AUDIO_BUILD',
|
||||||
@ -105,13 +111,16 @@
|
|||||||
'win/audio_mixer_manager_win.h',
|
'win/audio_mixer_manager_win.h',
|
||||||
'android/audio_device_utility_android.cc',
|
'android/audio_device_utility_android.cc',
|
||||||
'android/audio_device_utility_android.h',
|
'android/audio_device_utility_android.h',
|
||||||
'android/audio_device_opensles_android.cc',
|
# opensles is shared with gonk, so isn't here
|
||||||
'android/audio_device_opensles_android.h',
|
|
||||||
'android/audio_device_jni_android.cc',
|
'android/audio_device_jni_android.cc',
|
||||||
'android/audio_device_jni_android.h',
|
'android/audio_device_jni_android.h',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="android"', {
|
['OS=="android"', {
|
||||||
|
'sources': [
|
||||||
|
'audio_device_opensles.cc',
|
||||||
|
'audio_device_opensles.h',
|
||||||
|
],
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [
|
||||||
'-llog',
|
'-llog',
|
||||||
@ -119,6 +128,12 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
|
['moz_widget_toolkit_gonk==1', {
|
||||||
|
'sources': [
|
||||||
|
'audio_device_opensles.cc',
|
||||||
|
'audio_device_opensles.h',
|
||||||
|
],
|
||||||
|
}],
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [
|
||||||
|
@ -26,8 +26,13 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include "audio_device_utility_android.h"
|
#include "audio_device_utility_android.h"
|
||||||
#include "audio_device_opensles_android.h"
|
#include "audio_device_opensles.h"
|
||||||
#include "audio_device_jni_android.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)
|
#elif defined(WEBRTC_ANDROID)
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "audio_device_utility_android.h"
|
#include "audio_device_utility_android.h"
|
||||||
@ -260,7 +265,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
|||||||
|
|
||||||
// Create the *Android OpenSLES* implementation of the Audio Device
|
// 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.
|
// Check if the OpenSLES library is available before going further.
|
||||||
void* opensles_lib = dlopen("libOpenSLES.so", RTLD_LAZY);
|
void* opensles_lib = dlopen("libOpenSLES.so", RTLD_LAZY);
|
||||||
if (opensles_lib) {
|
if (opensles_lib) {
|
||||||
@ -275,12 +280,15 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(WEBRTC_GONK)
|
||||||
if (ptrAudioDevice != NULL)
|
if (ptrAudioDevice != NULL)
|
||||||
{
|
{
|
||||||
// Create the Android implementation of the Device Utility.
|
// Create the Android implementation of the Device Utility.
|
||||||
ptrAudioDeviceUtility = new AudioDeviceUtilityAndroid(Id());
|
ptrAudioDeviceUtility = new AudioDeviceUtilityAndroid(Id());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
#if defined(WEBRTC_ANDROID_OPENSLES) or defined(WEBRTC_ANDROID)
|
#if defined(WEBRTC_ANDROID_OPENSLES) or defined(WEBRTC_ANDROID)
|
||||||
// Fall back to this case if on Android 2.2/OpenSLES not available.
|
// Fall back to this case if on Android 2.2/OpenSLES not available.
|
||||||
if (ptrAudioDevice == NULL) {
|
if (ptrAudioDevice == NULL) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
* be found in the AUTHORS file in the root of the source tree.
|
* 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
|
#ifdef WEBRTC_ANDROID_DEBUG
|
||||||
#include <android/log.h>
|
#include <android/log.h>
|
Loading…
Reference in New Issue
Block a user