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

Unified Diff: media/audio/mac/audio_low_latency_input_mac.cc

Issue 1750403004: Adds Media.Audio.InputStartWasDeferredAudioWorkedMac UMA stat (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also adds Media.Audio.InputBufferSizeWasChangedAudioWorkedMac Created 4 years, 10 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') | tools/metrics/histograms/histograms.xml » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_low_latency_input_mac.cc
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index ac27f2d590488308afb0224e102a4622dd7a7bef..0599d6022580afeaa79085044a87dcb240f2ba2c 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -537,10 +537,25 @@ void AUAudioInputStream::Close() {
CloseAudioUnit();
// Disable the listener for device property changes.
DeRegisterDeviceChangeListener();
- // Check if any device property changes are added by filtering out a selected
- // set of the |device_property_changes_map_| map. Add UMA stats if valuable
- // data is found.
- AddDevicePropertyChangesToUMA(false);
+ // Add more UMA stats but only if AGC was activated, i.e. for e.g. WebRTC
+ // audio input streams.
+ if (GetAutomaticGainControl()) {
+ // Check if any device property changes are added by filtering out a
+ // selected set of the |device_property_changes_map_| map. Add UMA stats
+ // if valuable data is found.
+ AddDevicePropertyChangesToUMA(false);
+ // Log if call to Start() was deferred or not. To be compared with
Ilya Sherman 2016/03/02 22:57:24 nit: s/Log if ... or not/Log whether ...
henrika (OOO until Aug 14) 2016/03/03 09:44:39 Done.
+ // Media.Audio.InputStartWasDeferredMac which logs the same value but only
+ // when input audio fail to start.
Ilya Sherman 2016/03/02 22:57:24 nit: s/fail/fails
henrika (OOO until Aug 14) 2016/03/03 09:44:39 Done.
+ UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputStartWasDeferredAudioWorkedMac",
+ start_was_deferred_);
+ // Log if a change of I/O buffer size was required. To be compared with
+ // Media.Audio.InputBufferSizeWasChangedMac which logs the same value but
+ // only when input audio fail to start.
+ UMA_HISTOGRAM_BOOLEAN("Media.Audio.InputBufferSizeWasChangedAudioWorkedMac",
+ buffer_size_was_changed_);
+ // TODO(henrika): possibly add more values here...
+ }
// Inform the audio manager that we have been closed. This will cause our
// destruction.
manager_->ReleaseInputStream(this);
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698