Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(612)

Unified Diff: talk/media/webrtc/webrtcvoiceengine.cc

Issue 1568853002: Revert changes to default option setting in https://codereview.webrtc.org/1500633002/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvoiceengine.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine.cc b/talk/media/webrtc/webrtcvoiceengine.cc
index 9742564985bca6c0437865dafbe76803608e384a..fdf10c6491b809946ef4d5b321e6d60608e3d8c0 100644
--- a/talk/media/webrtc/webrtcvoiceengine.cc
+++ b/talk/media/webrtc/webrtcvoiceengine.cc
@@ -532,6 +532,28 @@ bool WebRtcVoiceEngine::InitInternal() {
return false;
}
+ // Set default engine options.
+ {
+ AudioOptions options;
+ options.echo_cancellation = rtc::Optional<bool>(true);
+ options.auto_gain_control = rtc::Optional<bool>(true);
+ options.noise_suppression = rtc::Optional<bool>(true);
+ options.highpass_filter = rtc::Optional<bool>(true);
+ options.stereo_swapping = rtc::Optional<bool>(false);
+ options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50);
+ options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false);
+ options.typing_detection = rtc::Optional<bool>(true);
+ options.adjust_agc_delta = rtc::Optional<int>(0);
+ options.experimental_agc = rtc::Optional<bool>(false);
+ options.extended_filter_aec = rtc::Optional<bool>(false);
+ options.delay_agnostic_aec = rtc::Optional<bool>(false);
+ options.experimental_ns = rtc::Optional<bool>(false);
+ options.aec_dump = rtc::Optional<bool>(false);
+ if (!ApplyOptions(options)) {
+ return false;
+ }
+ }
+
// Print our codec list again for the call diagnostic log
LOG(LS_INFO) << "WebRtc VoiceEngine codecs:";
for (const AudioCodec& codec : codecs_) {
@@ -569,26 +591,7 @@ VoiceMediaChannel* WebRtcVoiceEngine::CreateChannel(webrtc::Call* call,
bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
RTC_DCHECK(worker_thread_checker_.CalledOnValidThread());
LOG(LS_INFO) << "ApplyOptions: " << options_in.ToString();
-
- // Default engine options.
- AudioOptions options;
- options.echo_cancellation = rtc::Optional<bool>(true);
- options.auto_gain_control = rtc::Optional<bool>(true);
- options.noise_suppression = rtc::Optional<bool>(true);
- options.highpass_filter = rtc::Optional<bool>(true);
- options.stereo_swapping = rtc::Optional<bool>(false);
- options.audio_jitter_buffer_max_packets = rtc::Optional<int>(50);
- options.audio_jitter_buffer_fast_accelerate = rtc::Optional<bool>(false);
- options.typing_detection = rtc::Optional<bool>(true);
- options.adjust_agc_delta = rtc::Optional<int>(0);
- options.experimental_agc = rtc::Optional<bool>(false);
- options.extended_filter_aec = rtc::Optional<bool>(false);
- options.delay_agnostic_aec = rtc::Optional<bool>(false);
- options.experimental_ns = rtc::Optional<bool>(false);
- options.aec_dump = rtc::Optional<bool>(false);
-
- // Apply any given options on top.
- options.SetAll(options_in);
+ AudioOptions options = options_in; // The options are modified below.
// kEcConference is AEC with high suppression.
webrtc::EcModes ec_mode = webrtc::kEcConference;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698