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

Side by Side 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: Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 }; 97 };
98 98
99 // A helper class to log echo information in general and Echo Cancellation 99 // A helper class to log echo information in general and Echo Cancellation
100 // quality in particular. 100 // quality in particular.
101 class CONTENT_EXPORT EchoInformation { 101 class CONTENT_EXPORT EchoInformation {
102 public: 102 public:
103 EchoInformation(); 103 EchoInformation();
104 virtual ~EchoInformation(); 104 virtual ~EchoInformation();
105 105
106 void UpdateAecDelayStats(webrtc::EchoCancellation* echo_cancellation); 106 void UpdateAecDelayStats(webrtc::EchoCancellation* echo_cancellation);
107 void UpdateAecDivergentFilterStats(
108 webrtc::EchoCancellation* echo_cancellation);
109 void ReportAndResetAecDivergentFilterStats();
107 110
108 private: 111 private:
109 // Counter to track 5 seconds of processed 10 ms chunks in order to query a 112 // Counter to track 5 seconds of processed 10 ms chunks in order to query a
110 // new metric from webrtc::EchoCancellation::GetEchoDelayMetrics(). 113 // new metric from webrtc::EchoCancellation::GetEchoDelayMetrics().
111 int num_chunks_; 114 int chunks_for_delay_stats_;
minyue 2016/06/28 08:18:41 maybe better to count in time, e.g., time_for_del
Henrik Grunell 2016/06/28 09:33:10 Yes, that's better. Done.
112 bool echo_frames_received_; 115 bool echo_frames_received_;
113 116
117 // Counter to track 1 second of processed 10 ms chunks in order to query a new
118 // divergent filter fraction metric from
119 // webrtc::EchoCancellation::GetMetrics().
120 int chunks_for_divergent_filter_stats_;
minyue 2016/06/28 08:18:41 maybe better to count in time, e.g., time_for_div
Henrik Grunell 2016/06/28 09:33:10 Done.
121
122 // Total number of times we queried for the divergent filter fraction metric.
123 int num_divergent_filter_fraction_;
124
125 // Number of non-zero divergent filter fraction metrics.
126 int num_non_zero_divergent_filter_fraction_;
127
114 DISALLOW_COPY_AND_ASSIGN(EchoInformation); 128 DISALLOW_COPY_AND_ASSIGN(EchoInformation);
115 }; 129 };
116 130
117 // Enables the echo cancellation in |audio_processing|. 131 // Enables the echo cancellation in |audio_processing|.
118 void EnableEchoCancellation(AudioProcessing* audio_processing); 132 void EnableEchoCancellation(AudioProcessing* audio_processing);
119 133
120 // Enables the noise suppression in |audio_processing|. 134 // Enables the noise suppression in |audio_processing|.
121 void EnableNoiseSuppression(AudioProcessing* audio_processing, 135 void EnableNoiseSuppression(AudioProcessing* audio_processing,
122 webrtc::NoiseSuppression::Level ns_level); 136 webrtc::NoiseSuppression::Level ns_level);
123 137
(...skipping 20 matching lines...) Expand all
144 158
145 // Returns the array geometry from the media constraints if existing and 159 // Returns the array geometry from the media constraints if existing and
146 // otherwise that provided by the input device. 160 // otherwise that provided by the input device.
147 CONTENT_EXPORT std::vector<webrtc::Point> GetArrayGeometryPreferringConstraints( 161 CONTENT_EXPORT std::vector<webrtc::Point> GetArrayGeometryPreferringConstraints(
148 const MediaAudioConstraints& audio_constraints, 162 const MediaAudioConstraints& audio_constraints,
149 const MediaStreamDevice::AudioDeviceParameters& input_params); 163 const MediaStreamDevice::AudioDeviceParameters& input_params);
150 164
151 } // namespace content 165 } // namespace content
152 166
153 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_ 167 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_PROCESSOR_OPTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698