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

Unified Diff: media/audio/audio_input_controller.h

Issue 486633003: Only log audio input silence state UMA stats for low latency mode and if not fake device. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. Created 6 years, 4 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 | media/audio/audio_input_controller.cc » ('j') | media/audio/audio_input_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_controller.h
diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h
index e1e14ee3c30e94b07ed34f0043e215b635a94168..7be4796ddafee83c0e47291f494d2f7c4b85efe9 100644
--- a/media/audio/audio_input_controller.h
+++ b/media/audio/audio_input_controller.h
@@ -251,6 +251,12 @@ class MEDIA_EXPORT AudioInputController
// Elements in this enum should not be deleted or rearranged; the only
// permitted operation is to add new elements before SILENCE_STATE_MAX and
// update SILENCE_STATE_MAX.
+ // Possible silence state transitions:
+ // SILENCE_STATE_AUDIO_AND_SILENCE
+ // ^ ^
+ // SILENCE_STATE_ONLY_AUDIO SILENCE_STATE_ONLY_SILENCE
+ // ^ ^
+ // SILENCE_STATE_NO_MEASUREMENT
enum SilenceState {
SILENCE_STATE_NO_MEASUREMENT = 0,
SILENCE_STATE_ONLY_AUDIO = 1,
@@ -268,6 +274,9 @@ class MEDIA_EXPORT AudioInputController
// Methods called on the audio thread (owned by the AudioManager).
void DoCreate(AudioManager* audio_manager, const AudioParameters& params,
const std::string& device_id);
+ void DoCreateForLowLatency(AudioManager* audio_manager,
no longer working on chromium 2014/08/21 09:11:56 Please see comments above, I don't think you need
Henrik Grunell 2014/08/21 11:06:10 See comment above.
+ const AudioParameters& params,
+ const std::string& device_id);
void DoCreateForStream(AudioInputStream* stream_to_control);
void DoRecord();
void DoClose();
@@ -292,6 +301,11 @@ class MEDIA_EXPORT AudioInputController
bool GetDataIsActive();
#if defined(AUDIO_POWER_MONITORING)
+ // Updates the silence state, see enum SilenceState above for state
+ // transitions.
+ void UpdateSilenceState(bool silence);
+
+ // Logs the silence state as UMA stat.
void LogSilenceState(SilenceState value);
#endif
@@ -345,6 +359,9 @@ class MEDIA_EXPORT AudioInputController
media::AudioParameters audio_params_;
base::TimeTicks last_audio_level_log_time_;
+ // Whether the silence state should sent as UMA stat.
+ bool log_silence_state_;
+
// The silence report sent as UMA stat at the end of a session.
SilenceState silence_state_;
#endif
« no previous file with comments | « no previous file | media/audio/audio_input_controller.cc » ('j') | media/audio/audio_input_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698