Bug 911450: sndio webrtc audio backend, build integration bits r=jesup

This commit is contained in:
Landry Breuil 2015-04-10 21:36:54 +02:00
Родитель e3f316eace
Коммит 4acbe13c9a
4 изменённых файлов: 46 добавлений и 2 удалений

Просмотреть файл

@ -173,7 +173,12 @@
}, {
'include_alsa_audio%': 0,
}],
['OS=="solaris" or os_bsd==1', {
['OS=="openbsd"', {
'include_sndio_audio%': 1,
}, {
'include_sndio_audio%': 0,
}],
['OS=="solaris" or (OS!="openbsd" and os_bsd==1)', {
'include_pulse_audio%': 1,
}, {
'include_pulse_audio%': 0,
@ -325,6 +330,11 @@
'WEBRTC_CLOCK_TYPE_REALTIME',
],
}],
['OS=="openbsd"', {
'defines' : [
'WEBRTC_AUDIO_SNDIO',
],
}],
# Mozilla: if we support Mozilla on MIPS, we'll need to mod the cflags entries here
['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
'defines': [

Просмотреть файл

@ -59,6 +59,11 @@
'WEBRTC_HARDWARE_AEC_NS',
],
}],
['include_sndio_audio==1', {
'include_dirs': [
'sndio',
],
}], # include_sndio_audio==1
['OS=="linux" or include_alsa_audio==1 or include_pulse_audio==1', {
'include_dirs': [
'linux',
@ -198,6 +203,19 @@
],
},
}],
['include_sndio_audio==1', {
'link_settings': {
'libraries': [
'-lsndio',
],
},
'sources': [
'sndio/audio_device_sndio.cc',
'sndio/audio_device_sndio.h',
'sndio/audio_device_utility_sndio.cc',
'sndio/audio_device_utility_sndio.h',
],
}],
['include_alsa_audio==1', {
'cflags_mozilla': [
'$(MOZ_ALSA_CFLAGS)',

Просмотреть файл

@ -37,6 +37,9 @@
#endif
#include "webrtc/modules/audio_device/android/opensles_input.h"
#include "webrtc/modules/audio_device/android/opensles_output.h"
#elif defined(WEBRTC_AUDIO_SNDIO)
#include "audio_device_utility_sndio.h"
#include "audio_device_sndio.h"
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
#include "audio_device_utility_linux.h"
#if defined(LINUX_ALSA)
@ -172,6 +175,9 @@ int32_t AudioDeviceModuleImpl::CheckPlatform()
#elif defined(WEBRTC_ANDROID)
platform = kPlatformAndroid;
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is ANDROID");
#elif defined(WEBRTC_AUDIO_SNDIO)
platform = kPlatformSndio;
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is POSIX using SNDIO");
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
platform = kPlatformLinux;
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "current platform is LINUX");
@ -320,6 +326,15 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects()
}
// END #if defined(WEBRTC_ANDROID_OPENSLES)
#elif defined(WEBRTC_AUDIO_SNDIO)
ptrAudioDevice = new AudioDeviceSndio(Id());
if (ptrAudioDevice != NULL)
{
WEBRTC_TRACE(kTraceInfo, kTraceAudioDevice, _id, "attempting to use the Sndio audio API...");
// Create the sndio implementation of the Device Utility.
ptrAudioDeviceUtility = new AudioDeviceUtilitySndio(Id());
}
// Create the *Linux* implementation of the Audio Device
//
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)

Просмотреть файл

@ -32,7 +32,8 @@ public:
kPlatformLinux = 3,
kPlatformMac = 4,
kPlatformAndroid = 5,
kPlatformIOS = 6
kPlatformIOS = 6,
kPlatformSndio = 7
};
int32_t CheckPlatform();