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

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

Issue 2749973003: Added locking when getting echo likelihood stats. (Closed)
Patch Set: Created 3 years, 9 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: 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 4c9188f7682df48404c8d70ce31e6ec2dc944ad0..1f73c5984a68af29d7dd941a64f88a834fd9e72a 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -1616,10 +1616,14 @@ AudioProcessing::AudioProcessingStatistics AudioProcessingImpl::GetStatistics()
metrics.echo_return_loss_enhancement);
stats.residual_echo_return_loss.Set(metrics.residual_echo_return_loss);
}
- stats.residual_echo_likelihood =
- private_submodules_->residual_echo_detector->echo_likelihood();
- stats.residual_echo_likelihood_recent_max =
- private_submodules_->residual_echo_detector->echo_likelihood_recent_max();
+ {
+ rtc::CritScope cs_capture(&crit_capture_);
+ stats.residual_echo_likelihood =
+ private_submodules_->residual_echo_detector->echo_likelihood();
tommi 2017/03/15 16:14:45 could we instead make sure that either these stats
ivoc 2017/03/15 17:14:15 This function is called from a Chromium thread (I
tommi 2017/03/15 17:27:59 From what I can tell, it's actually called from ou
ivoc 2017/03/15 19:30:43 Yes, that's one place this is called from. Another
+ stats.residual_echo_likelihood_recent_max =
+ private_submodules_->residual_echo_detector
+ ->echo_likelihood_recent_max();
+ }
public_submodules_->echo_cancellation->GetDelayMetrics(
&stats.delay_median, &stats.delay_standard_deviation,
&stats.fraction_poor_delays);
« 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