Remove unnecessary dependencies for voe when building with include_internal_audio_device==0.
In particular and practical terms, this avoids pulling in AudioDeviceModuleImpl and associated classes, in Chrome. BUG= R=henrika@webrtc.org Review URL: https://webrtc-codereview.appspot.com/49999004 Cr-Commit-Position: refs/heads/master@{#9229}
This commit is contained in:
parent
cb7f8ce2df
commit
931e6583b2
@ -129,7 +129,6 @@
|
||||
|
||||
# Exclude internal ADM since Chromium uses its own IO handling.
|
||||
'include_internal_audio_device%': 0,
|
||||
|
||||
}, { # Settings for the standalone (not-in-Chromium) build.
|
||||
# TODO(andrew): For now, disable the Chrome plugins, which causes a
|
||||
# flood of chromium-style warnings. Investigate enabling them:
|
||||
@ -370,6 +369,11 @@
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['include_internal_audio_device==1', {
|
||||
'defines': [
|
||||
'WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE',
|
||||
],
|
||||
}],
|
||||
], # conditions
|
||||
'direct_dependent_settings': {
|
||||
'conditions': [
|
||||
|
||||
@ -24,8 +24,6 @@ source_set("audio_device") {
|
||||
"audio_device_buffer.h",
|
||||
"audio_device_generic.cc",
|
||||
"audio_device_generic.h",
|
||||
"audio_device_impl.cc",
|
||||
"audio_device_impl.h",
|
||||
"audio_device_config.h",
|
||||
"dummy/audio_device_dummy.cc",
|
||||
"dummy/audio_device_dummy.h",
|
||||
@ -50,6 +48,7 @@ source_set("audio_device") {
|
||||
include_dirs += [ "android" ]
|
||||
}
|
||||
if (rtc_include_internal_audio_device) {
|
||||
defines += [ "WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE" ]
|
||||
sources += [
|
||||
"android/audio_device_template.h",
|
||||
"android/audio_manager.cc",
|
||||
@ -64,6 +63,8 @@ source_set("audio_device") {
|
||||
"android/opensles_common.h",
|
||||
"android/opensles_player.cc",
|
||||
"android/opensles_player.h",
|
||||
"audio_device_impl.cc",
|
||||
"audio_device_impl.h",
|
||||
"ios/audio_device_ios.h",
|
||||
"ios/audio_device_ios.mm",
|
||||
"linux/alsasymboltable_linux.cc",
|
||||
|
||||
@ -38,8 +38,6 @@
|
||||
'audio_device_buffer.h',
|
||||
'audio_device_generic.cc',
|
||||
'audio_device_generic.h',
|
||||
'audio_device_impl.cc',
|
||||
'audio_device_impl.h',
|
||||
'audio_device_config.h',
|
||||
'dummy/audio_device_dummy.cc',
|
||||
'dummy/audio_device_dummy.h',
|
||||
@ -101,6 +99,8 @@
|
||||
'android/opensles_common.h',
|
||||
'android/opensles_player.cc',
|
||||
'android/opensles_player.h',
|
||||
'audio_device_impl.cc',
|
||||
'audio_device_impl.h',
|
||||
'ios/audio_device_ios.h',
|
||||
'ios/audio_device_ios.mm',
|
||||
'linux/alsasymboltable_linux.cc',
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
#ifndef WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H
|
||||
#define WEBRTC_AUDIO_DEVICE_AUDIO_DEVICE_IMPL_H
|
||||
|
||||
#if defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
|
||||
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/modules/audio_device/audio_device_buffer.h"
|
||||
@ -194,7 +196,7 @@ public:
|
||||
|
||||
public:
|
||||
int32_t Id() {return _id;}
|
||||
#if defined(WEBRTC_ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
// Only use this acccessor for test purposes on Android.
|
||||
AudioManager* GetAndroidAudioManagerForTest() {
|
||||
return _audioManagerAndroid.get();
|
||||
@ -218,7 +220,7 @@ private:
|
||||
AudioDeviceGeneric* _ptrAudioDevice;
|
||||
|
||||
AudioDeviceBuffer _audioDeviceBuffer;
|
||||
#if defined(WEBRTC_ANDROID) && !defined(WEBRTC_CHROMIUM_BUILD)
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
rtc::scoped_ptr<AudioManager> _audioManagerAndroid;
|
||||
#endif
|
||||
int32_t _id;
|
||||
@ -231,4 +233,6 @@ private:
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
|
||||
|
||||
#endif // WEBRTC_MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_
|
||||
|
||||
@ -218,6 +218,9 @@ int VoEBaseImpl::Init(AudioDeviceModule* external_adm,
|
||||
// Create an internal ADM if the user has not added an external
|
||||
// ADM implementation as input to Init().
|
||||
if (external_adm == nullptr) {
|
||||
#if !defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
|
||||
return -1;
|
||||
#else
|
||||
// Create the internal ADM implementation.
|
||||
shared_->set_audio_device(AudioDeviceModuleImpl::Create(
|
||||
VoEId(shared_->instance_id(), -1), shared_->audio_device_layer()));
|
||||
@ -227,6 +230,7 @@ int VoEBaseImpl::Init(AudioDeviceModule* external_adm,
|
||||
"Init() failed to create the ADM");
|
||||
return -1;
|
||||
}
|
||||
#endif // WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE
|
||||
} else {
|
||||
// Use the already existing external ADM implementation.
|
||||
shared_->set_audio_device(external_adm);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user