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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 2926713006: Disabling logging of AEC metrics for AEC version 2 when AEC3 is active. (Closed)
Patch Set: Changes in response to reviewer comments Created 3 years, 6 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: content/renderer/media/media_stream_audio_processor.cc
diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc
index d5314117518c5912fa0b06fb42fd0da7ce003909..a28613f0a8da40cdc48de22709df7d1c7b8fa007 100644
--- a/content/renderer/media/media_stream_audio_processor.cc
+++ b/content/renderer/media/media_stream_audio_processor.cc
@@ -502,8 +502,13 @@ void MediaStreamAudioProcessor::OnAec3Enable(bool enable) {
apm_config.echo_canceller3.enabled = enable;
audio_processing_->ApplyConfig(apm_config);
- DCHECK(echo_information_);
- echo_information_.reset(new EchoInformation());
+ if (apm_config.echo_canceller3.enabled) {
+ // Do not log any echo information when AEC3 is active, as the echo
+ // information then will not be properly updated.
+ echo_information_.reset();
+ } else {
+ echo_information_ = base::MakeUnique<EchoInformation>();
+ }
}
void MediaStreamAudioProcessor::OnIpcClosing() {
@@ -696,12 +701,18 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
if (echo_cancellation) {
EnableEchoCancellation(audio_processing_.get());
- // Prepare for logging echo information. If there are data remaining in
- // |echo_information_| we simply discard it.
- echo_information_.reset(new EchoInformation());
-
apm_config.echo_canceller3.enabled = override_aec3_.value_or(
base::FeatureList::IsEnabled(features::kWebRtcUseEchoCanceller3));
+
+ if (!apm_config.echo_canceller3.enabled) {
+ // Prepare for logging echo information. If there are data remaining in
+ // |echo_information_| we simply discard it.
+ echo_information_ = base::MakeUnique<EchoInformation>();
+ } else {
+ // Do not log any echo information when AEC3 is active, as the echo
+ // information then will not be properly updated.
+ echo_information_.reset();
+ }
} else {
apm_config.echo_canceller3.enabled = false;
}
« 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