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

Unified Diff: content/renderer/media/media_stream_audio_processor.cc

Issue 200293002: added uma stats to check the usage of media stream audio track audio processing (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 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 | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4c1a2c90ab299c27846cebd1c56e730cc9f0f22a..1a5c73fc89bb33722d51162cc7d1605569206e46 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,12 @@ const int kAudioProcessingNumberOfChannel = 1;
const int kMaxNumberOfBuffersInFifo = 2;
+enum AudioTrackProcessingStates {
+ AUDIO_PROCESSING_ENABLED = 0,
+ AUDIO_PROCESSING_DISABLED,
+ AUDIO_PROCESSING_MAX
+};
+
} // namespace
class MediaStreamAudioProcessor::MediaStreamAudioConverter
@@ -265,8 +272,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_DISABLED, AUDIO_PROCESSING_MAX);
return;
+ }
RTCMediaConstraints native_constraints(constraints);
@@ -319,6 +329,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);
tommi (sloooow) - chröme 2014/03/14 14:38:32 Could we have a different value for this case? He
no longer working on chromium 2014/03/14 14:43:56 Do we really want this? AUDIO_PROCESSING_BYPASSED
return;
}
@@ -361,6 +373,9 @@ void MediaStreamAudioProcessor::InitializeAudioProcessingModule(
CHECK_EQ(audio_processing_->set_num_channels(kAudioProcessingNumberOfChannel,
kAudioProcessingNumberOfChannel),
0);
+
+ UMA_HISTOGRAM_ENUMERATION("Media.AudioTrackProcessingStates",
+ AUDIO_PROCESSING_ENABLED, AUDIO_PROCESSING_MAX);
}
void MediaStreamAudioProcessor::InitializeCaptureConverter(
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698