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

Unified Diff: webrtc/modules/audio_processing/audio_processing_impl.cc

Issue 2469783002: Update default values for APM stats to match old behavior. (Closed)
Patch Set: Only set stats when getting metrics is succesful. Created 4 years, 1 month 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 | webrtc/modules/audio_processing/include/audio_processing.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/audio_processing_impl.cc
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index fe4dcee4cb7f5373c90f37c8b7f9ec3d3d17ca7b..f63cb206b5c6aaf72a4bc30b47ebd0b6c7c8680b 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -1487,12 +1487,15 @@ AudioProcessing::AudioProcessingStatistics AudioProcessingImpl::GetStatistics()
const {
AudioProcessingStatistics stats;
EchoCancellation::Metrics metrics;
- public_submodules_->echo_cancellation->GetMetrics(&metrics);
- stats.a_nlp.Set(metrics.a_nlp);
- stats.divergent_filter_fraction = metrics.divergent_filter_fraction;
- stats.echo_return_loss.Set(metrics.echo_return_loss);
- stats.echo_return_loss_enhancement.Set(metrics.echo_return_loss_enhancement);
- stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss);
+ int success = public_submodules_->echo_cancellation->GetMetrics(&metrics);
+ if (success == Error::kNoError) {
+ stats.a_nlp.Set(metrics.a_nlp);
+ stats.divergent_filter_fraction = metrics.divergent_filter_fraction;
+ stats.echo_return_loss.Set(metrics.echo_return_loss);
+ stats.echo_return_loss_enhancement.Set(
+ metrics.echo_return_loss_enhancement);
+ stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss);
+ }
public_submodules_->echo_cancellation->GetDelayMetrics(
&stats.delay_median, &stats.delay_standard_deviation,
&stats.fraction_poor_delays);
« no previous file with comments | « no previous file | webrtc/modules/audio_processing/include/audio_processing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698