Chromium Code Reviews| Index: content/renderer/media/media_stream_audio_processor_options.cc |
| diff --git a/content/renderer/media/media_stream_audio_processor_options.cc b/content/renderer/media/media_stream_audio_processor_options.cc |
| index c39b1544c5c878a13abf2a7c4b64a41319d978f1..bdc3ff16e170ae8f3ba84752802c603279ec1852 100644 |
| --- a/content/renderer/media/media_stream_audio_processor_options.cc |
| +++ b/content/renderer/media/media_stream_audio_processor_options.cc |
| @@ -222,12 +222,20 @@ bool MediaAudioConstraints::GetDefaultValueForConstraint( |
| } |
| EchoInformation::EchoInformation() |
| - : num_chunks_(0) {} |
| + : num_chunks_(0), echo_frames_received_(false) { |
| +} |
| EchoInformation::~EchoInformation() {} |
| void EchoInformation::UpdateAecDelayStats( |
| webrtc::EchoCancellation* echo_cancellation) { |
| + // Only start collecting stats if we know echo cancellation has measured an |
| + // echo. Otherwise we clutter the stats with for example cases where only the |
| + // microphone is used. |
| + if (!echo_frames_received_ & !echo_cancellation->stream_has_echo()) { |
|
tommi (sloooow) - chröme
2015/04/23 14:35:35
no {}
bjornv
2015/04/24 08:01:55
Done.
|
| + return; |
| + } |
| + echo_frames_received_ = true; |
| // In WebRTC, three echo delay metrics are calculated and updated every |
| // five seconds. We use one of them, |fraction_poor_delays| to log in a UMA |
| // histogram an Echo Cancellation quality metric. The stat in WebRTC has a |