Prefix ALSA and PULSE macros with WEBRTC_.

This CL renames the internal macros LINUX_ALSA and LINUX_PULSE and adds
the prefix WEBRTC_. Since these macros are internal to WebRTC, it is
better to use a prefix.

Bug: None
Change-Id: I2a07fa569a4da168006cc36f32e4dbb98a75814b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/171514
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30885}
This commit is contained in:
Mirko Bonadei 2020-03-24 12:56:47 +01:00 committed by Commit Bot
parent 71c9a18f25
commit fc9770c102
2 changed files with 9 additions and 8 deletions

View File

@ -270,7 +270,7 @@ rtc_library("audio_device_impl") {
"linux/latebindingsymboltable_linux.cc",
"linux/latebindingsymboltable_linux.h",
]
defines += [ "LINUX_ALSA" ]
defines += [ "WEBRTC_ENABLE_LINUX_ALSA" ]
libs = [ "dl" ]
if (rtc_use_x11) {
libs += [ "X11" ]
@ -285,7 +285,7 @@ rtc_library("audio_device_impl") {
"linux/pulseaudiosymboltable_linux.cc",
"linux/pulseaudiosymboltable_linux.h",
]
defines += [ "LINUX_PULSE" ]
defines += [ "WEBRTC_ENABLE_LINUX_PULSE" ]
}
}
if (is_mac) {

View File

@ -37,10 +37,10 @@
#include "modules/audio_device/android/opensles_player.h"
#include "modules/audio_device/android/opensles_recorder.h"
#elif defined(WEBRTC_LINUX)
#if defined(LINUX_ALSA)
#if defined(WEBRTC_ENABLE_LINUX_ALSA)
#include "modules/audio_device/linux/audio_device_alsa_linux.h"
#endif
#if defined(LINUX_PULSE)
#if defined(WEBRTC_ENABLE_LINUX_PULSE)
#include "modules/audio_device/linux/audio_device_pulse_linux.h"
#endif
#elif defined(WEBRTC_IOS)
@ -241,12 +241,13 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
// END #if defined(WEBRTC_ANDROID)
// Linux ADM implementation.
// Note that, LINUX_ALSA is always defined by default when WEBRTC_LINUX is
// defined. LINUX_PULSE depends on the 'rtc_include_pulse_audio' build flag.
// Note that, WEBRTC_ENABLE_LINUX_ALSA is always defined by default when
// WEBRTC_LINUX is defined. WEBRTC_ENABLE_LINUX_PULSE depends on the
// 'rtc_include_pulse_audio' build flag.
// TODO(bugs.webrtc.org/9127): improve support and make it more clear that
// PulseAudio is the default selection.
#elif defined(WEBRTC_LINUX)
#if !defined(LINUX_PULSE)
#if !defined(WEBRTC_ENABLE_LINUX_PULSE)
// Build flag 'rtc_include_pulse_audio' is set to false. In this mode:
// - kPlatformDefaultAudio => ALSA, and
// - kLinuxAlsaAudio => ALSA, and
@ -273,7 +274,7 @@ int32_t AudioDeviceModuleImpl::CreatePlatformSpecificObjects() {
audio_device_.reset(new AudioDeviceLinuxALSA());
RTC_LOG(WARNING) << "Linux ALSA APIs will be utilized.";
}
#endif // #if !defined(LINUX_PULSE)
#endif // #if !defined(WEBRTC_ENABLE_LINUX_PULSE)
#endif // #if defined(WEBRTC_LINUX)
// iOS ADM implementation.