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

Unified Diff: content/renderer/media/media_stream_audio_processor_options.h

Issue 2103483002: Add UMA stats for AEC filter divergence metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Code review fix (minyue@). Created 4 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
Index: content/renderer/media/media_stream_audio_processor_options.h
diff --git a/content/renderer/media/media_stream_audio_processor_options.h b/content/renderer/media/media_stream_audio_processor_options.h
index 2d5af1d4f41261f97fba8ace5a9072c6677499cc..de41ae34aa26716368e9f7725d05b880d6081d3b 100644
--- a/content/renderer/media/media_stream_audio_processor_options.h
+++ b/content/renderer/media/media_stream_audio_processor_options.h
@@ -103,14 +103,31 @@ class CONTENT_EXPORT EchoInformation {
EchoInformation();
virtual ~EchoInformation();
+ // Updates stats. Must be called every time AudioProcessing::ProcessStream()
+ // is called.
void UpdateAecDelayStats(webrtc::EchoCancellation* echo_cancellation);
+ void UpdateAecDivergentFilterStats(
tommi (sloooow) - chröme 2016/06/28 11:43:56 Do we need two methods?
Henrik Grunell 2016/06/29 08:47:58 No, done. Kept them internally.
+ webrtc::EchoCancellation* echo_cancellation);
+
+ // Reports AEC divergent filter stats and resets the associated data.
+ void ReportAndResetAecDivergentFilterStats();
private:
- // Counter to track 5 seconds of processed 10 ms chunks in order to query a
- // new metric from webrtc::EchoCancellation::GetEchoDelayMetrics().
- int num_chunks_;
+ // Counter to track 5 seconds of data in order to query a new metric from
+ // webrtc::EchoCancellation::GetEchoDelayMetrics().
+ int delay_stats_time_ms_;
bool echo_frames_received_;
+ // Counter to track 1 second of data in order to query a new divergent filter
+ // fraction metric from webrtc::EchoCancellation::GetMetrics().
+ int divergent_filter_stats_time_ms_;
+
+ // Total number of times we queried for the divergent filter fraction metric.
+ int num_divergent_filter_fraction_;
+
+ // Number of non-zero divergent filter fraction metrics.
+ int num_non_zero_divergent_filter_fraction_;
+
DISALLOW_COPY_AND_ASSIGN(EchoInformation);
};

Powered by Google App Engine
This is Rietveld 408576698