Chromium Code Reviews| Index: content/renderer/media/media_stream_audio_processor.cc |
| diff --git a/content/renderer/media/media_stream_audio_processor.cc b/content/renderer/media/media_stream_audio_processor.cc |
| index 11e889259c0045346b9e5714ade5649ef5aa6fdf..4bd9a0d20fbed31cd30719d4c848aa9827593db8 100644 |
| --- a/content/renderer/media/media_stream_audio_processor.cc |
| +++ b/content/renderer/media/media_stream_audio_processor.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/command_line.h" |
| #include "base/debug/trace_event.h" |
| #include "base/metrics/field_trial.h" |
| +#include "base/metrics/histogram.h" |
| #include "content/public/common/content_switches.h" |
| #include "content/renderer/media/media_stream_audio_processor_options.h" |
| #include "content/renderer/media/rtc_media_constraints.h" |
| @@ -34,6 +35,13 @@ const int kAudioProcessingNumberOfChannel = 1; |
| const int kMaxNumberOfBuffersInFifo = 2; |
| +enum AudioTrackProcessingStates { |
|
Alexei Svitkine (slow)
2014/03/17 22:15:50
Nit: Add a comment that this is used for an UMA hi
no longer working on chromium
2014/03/19 12:50:11
Done.
|
| + AUDIO_PROCESSING_ENABLED = 0, |
| + AUDIO_PROCESSING_DISABLED, |
| + AUDIO_PROCESSING_IN_WEBRTC, |
| + AUDIO_PROCESSING_MAX |
| +}; |
| + |
| } // namespace |
| class MediaStreamAudioProcessor::MediaStreamAudioConverter |
| @@ -265,8 +273,11 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule( |
| const blink::WebMediaConstraints& constraints, int effects, |
| MediaStreamType type) { |
| DCHECK(!audio_processing_); |
| - if (!IsAudioTrackProcessingEnabled()) |
| + if (!IsAudioTrackProcessingEnabled()) { |
| + UMA_HISTOGRAM_ENUMERATION("Media.AudioTrackProcessingStates", |
| + AUDIO_PROCESSING_IN_WEBRTC, AUDIO_PROCESSING_MAX); |
| return; |
| + } |
| RTCMediaConstraints native_constraints(constraints); |
| @@ -319,6 +330,8 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule( |
| if (!enable_aec && !enable_experimental_aec && !enable_ns && |
| !enable_high_pass_filter && !enable_typing_detection && !enable_agc && |
| !enable_experimental_ns) { |
| + UMA_HISTOGRAM_ENUMERATION("Media.AudioTrackProcessingStates", |
| + AUDIO_PROCESSING_DISABLED, AUDIO_PROCESSING_MAX); |
| return; |
| } |
| @@ -361,6 +374,9 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule( |
| CHECK_EQ(audio_processing_->set_num_channels(kAudioProcessingNumberOfChannel, |
| kAudioProcessingNumberOfChannel), |
| 0); |
| + |
| + UMA_HISTOGRAM_ENUMERATION("Media.AudioTrackProcessingStates", |
|
Alexei Svitkine (slow)
2014/03/17 22:15:50
Nit: Can you make a function in the anon namespace
no longer working on chromium
2014/03/19 12:50:11
Done.
|
| + AUDIO_PROCESSING_ENABLED, AUDIO_PROCESSING_MAX); |
| } |
| void MediaStreamAudioProcessor::InitializeCaptureConverter( |