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

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: added AUDIO_PROCESSING_IN_WEBRTC 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 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(
« 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