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

Unified Diff: media/audio/audio_manager.h

Issue 495983002: Improve logging related to start/stop and failure of audio input streams in Chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback from xians@ 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
Index: media/audio/audio_manager.h
diff --git a/media/audio/audio_manager.h b/media/audio/audio_manager.h
index 915308ef77d89cfea1470ee0b1696d44b5b94e12..35bb586ba13229f084279f9e06e7c1f79af4e787 100644
--- a/media/audio/audio_manager.h
+++ b/media/audio/audio_manager.h
@@ -145,6 +145,21 @@ class MEDIA_EXPORT AudioManager {
virtual void RemoveOutputDeviceChangeListener(
AudioDeviceListener* listener) = 0;
+ // It is possible to register listeners for logging of important state
+ // changes. These are mainly intended for input streams and is used to track
+ // down issues related to failing captured audio (http://crbug.com/404884).
+ // The typical repsonse to receiving this callback is to add the information
+ // to some sort of log file.
+ // TODO(henrika): remove these when we have understood why audio is sometimes
+ // not captured as it should. See http://crbug.com/405449.
+ class StateChangeListener {
+ public:
+ virtual void OnStateChange(const std::string& state) = 0;
tommi (sloooow) - chröme 2014/08/26 11:42:31 Having |state| be a string is not what I'd expect.
henrika (OOO until Aug 14) 2014/08/27 13:44:05 Removed!
+ };
+
+ virtual void AddStateChangeListener(StateChangeListener* listener) = 0;
+ virtual void RemoveStateChangeListener(StateChangeListener* listener) = 0;
+
// Returns the default output hardware audio parameters for opening output
// streams. It is a convenience interface to
// AudioManagerBase::GetPreferredOutputStreamParameters and each AudioManager

Powered by Google App Engine
This is Rietveld 408576698