Stop using ANDROID macro in favour of WEBRTC_ANDROID.
Since WEBRTC_ANDROID is defined by WebRTC while ANDROID is defined by Chromium we should stop using ANDROID in WebRTC source code. Bug: webrtc:8400 Change-Id: I1d59caaabd8af2423e86476b72e0e9185e6c7a3a No-Try: True Reviewed-on: https://webrtc-review.googlesource.com/10805 Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20306}
This commit is contained in:
parent
138d4ac54d
commit
c8c71b9d76
@ -367,7 +367,7 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
|
||||
options.echo_cancellation = rtc::Optional<bool>(false);
|
||||
options.extended_filter_aec = rtc::Optional<bool>(false);
|
||||
LOG(LS_INFO) << "Always disable AEC on iOS. Use built-in instead.";
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
ec_mode = webrtc::kEcAecm;
|
||||
options.extended_filter_aec = rtc::Optional<bool>(false);
|
||||
#endif
|
||||
@ -393,7 +393,7 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
|
||||
options.typing_detection = rtc::Optional<bool>(false);
|
||||
options.experimental_ns = rtc::Optional<bool>(false);
|
||||
LOG(LS_INFO) << "Always disable NS on iOS. Use built-in instead.";
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
options.typing_detection = rtc::Optional<bool>(false);
|
||||
options.experimental_ns = rtc::Optional<bool>(false);
|
||||
#endif
|
||||
@ -404,12 +404,16 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
|
||||
options.auto_gain_control = rtc::Optional<bool>(false);
|
||||
options.experimental_agc = rtc::Optional<bool>(false);
|
||||
LOG(LS_INFO) << "Always disable AGC on iOS. Use built-in instead.";
|
||||
#elif defined(ANDROID)
|
||||
#elif defined(WEBRTC_ANDROID)
|
||||
options.experimental_agc = rtc::Optional<bool>(false);
|
||||
#endif
|
||||
|
||||
#if defined(WEBRTC_IOS) || defined(WEBRTC_ANDROID)
|
||||
// Turn off the gain control if specified by the field trial. The purpose of the field trial is to reduce the amount of resampling performed inside the audio processing module on mobile platforms by whenever possible turning off the fixed AGC mode and the high-pass filter. (https://bugs.chromium.org/p/webrtc/issues/detail?id=6181).
|
||||
// Turn off the gain control if specified by the field trial.
|
||||
// The purpose of the field trial is to reduce the amount of resampling
|
||||
// performed inside the audio processing module on mobile platforms by
|
||||
// whenever possible turning off the fixed AGC mode and the high-pass filter.
|
||||
// (https://bugs.chromium.org/p/webrtc/issues/detail?id=6181).
|
||||
if (webrtc::field_trial::IsEnabled(
|
||||
"WebRTC-Audio-MinimizeResamplingOnMobile")) {
|
||||
options.auto_gain_control = rtc::Optional<bool>(false);
|
||||
@ -450,7 +454,7 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
|
||||
}
|
||||
webrtc::apm_helpers::SetEcStatus(
|
||||
apm(), *options.echo_cancellation, ec_mode);
|
||||
#if !defined(ANDROID)
|
||||
#if !defined(WEBRTC_ANDROID)
|
||||
webrtc::apm_helpers::SetEcMetricsStatus(apm(), *options.echo_cancellation);
|
||||
#endif
|
||||
if (ec_mode == webrtc::kEcAecm) {
|
||||
|
||||
@ -74,7 +74,7 @@ class TestVideoCaptureCallback
|
||||
rtc::CritScope cs(&capture_cs_);
|
||||
int height = videoFrame.height();
|
||||
int width = videoFrame.width();
|
||||
#if defined(ANDROID) && ANDROID
|
||||
#if defined(WEBRTC_ANDROID) && WEBRTC_ANDROID
|
||||
// Android camera frames may be rotated depending on test device
|
||||
// orientation.
|
||||
EXPECT_TRUE(height == capability_.height || height == capability_.width);
|
||||
@ -282,7 +282,7 @@ TEST_F(VideoCaptureTest, MAYBE_Capabilities) {
|
||||
EXPECT_EQ(0, module->StopCapture());
|
||||
}
|
||||
|
||||
#if defined(ANDROID) && ANDROID
|
||||
#if defined(WEBRTC_ANDROID) && WEBRTC_ANDROID
|
||||
// There's no reason for this to _necessarily_ be true, but in practice all
|
||||
// Android devices this test runs on in fact do support multiple capture
|
||||
// resolutions and multiple frame-rates per captured resolution, so we assert
|
||||
@ -297,7 +297,7 @@ TEST_F(VideoCaptureTest, MAYBE_Capabilities) {
|
||||
++it) {
|
||||
EXPECT_GT(it->second.size(), 1U) << it->first;
|
||||
}
|
||||
#endif // ANDROID
|
||||
#endif // WEBRTC_ANDROID
|
||||
}
|
||||
|
||||
// NOTE: flaky, crashes sometimes.
|
||||
|
||||
@ -16,7 +16,7 @@ namespace webrtc {
|
||||
|
||||
rtc::scoped_refptr<VideoCaptureModule> VideoCaptureFactory::Create(
|
||||
const char* deviceUniqueIdUTF8) {
|
||||
#if defined(ANDROID)
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
return nullptr;
|
||||
#else
|
||||
return videocapturemodule::VideoCaptureImpl::Create(deviceUniqueIdUTF8);
|
||||
@ -29,7 +29,7 @@ rtc::scoped_refptr<VideoCaptureModule> VideoCaptureFactory::Create(
|
||||
}
|
||||
|
||||
VideoCaptureModule::DeviceInfo* VideoCaptureFactory::CreateDeviceInfo() {
|
||||
#if defined(ANDROID)
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
return nullptr;
|
||||
#else
|
||||
return videocapturemodule::VideoCaptureImpl::CreateDeviceInfo();
|
||||
|
||||
@ -580,7 +580,8 @@ int VP8EncoderImpl::InitEncode(const VideoCodec* inst,
|
||||
}
|
||||
|
||||
int VP8EncoderImpl::SetCpuSpeed(int width, int height) {
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|
||||
|| defined(WEBRTC_ANDROID)
|
||||
// On mobile platform, use a lower speed setting for lower resolutions for
|
||||
// CPUs with 4 or more cores.
|
||||
RTC_DCHECK_GT(number_of_cores_, 0);
|
||||
@ -605,7 +606,7 @@ int VP8EncoderImpl::SetCpuSpeed(int width, int height) {
|
||||
}
|
||||
|
||||
int VP8EncoderImpl::NumberOfThreads(int width, int height, int cpus) {
|
||||
#if defined(ANDROID)
|
||||
#if defined(WEBRTC_ANDROID)
|
||||
if (width * height >= 320 * 180) {
|
||||
if (cpus >= 4) {
|
||||
// 3 threads for CPUs with 4 and more cores since most of times only 4
|
||||
@ -659,7 +660,8 @@ int VP8EncoderImpl::InitAndSetControlSettings() {
|
||||
// when encoding lower resolution streams. Would it work with the
|
||||
// multi-res encoding feature?
|
||||
denoiserState denoiser_state = kDenoiserOnYOnly;
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|
||||
|| defined(WEBRTC_ANDROID)
|
||||
denoiser_state = kDenoiserOnYOnly;
|
||||
#else
|
||||
denoiser_state = kDenoiserOnAdaptive;
|
||||
@ -1056,7 +1058,8 @@ int VP8DecoderImpl::InitDecode(const VideoCodec* inst, int number_of_cores) {
|
||||
cfg.threads = 1;
|
||||
cfg.h = cfg.w = 0; // set after decode
|
||||
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|
||||
|| defined(WEBRTC_ANDROID)
|
||||
vpx_codec_flags_t flags = use_postproc_arm_ ? VPX_CODEC_USE_POSTPROC : 0;
|
||||
#else
|
||||
vpx_codec_flags_t flags = VPX_CODEC_USE_POSTPROC;
|
||||
@ -1095,7 +1098,8 @@ int VP8DecoderImpl::Decode(const EncodedImage& input_image,
|
||||
}
|
||||
|
||||
// Post process configurations.
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) || defined(ANDROID)
|
||||
#if defined(WEBRTC_ARCH_ARM) || defined(WEBRTC_ARCH_ARM64) \
|
||||
|| defined(WEBRTC_ANDROID)
|
||||
if (use_postproc_arm_) {
|
||||
vp8_postproc_cfg_t ppcfg;
|
||||
ppcfg.post_proc_flag = VP8_MFQE;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user