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

Unified Diff: media/audio/audio_input_controller.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: Improved logging in AudioManagerBase 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_input_controller.h
diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h
index 5d555766a18cecbc87fbf4e6603642e4b8a7cd78..350e4a330516951316b03a7c671eaa68de1af94e 100644
--- a/media/audio/audio_input_controller.h
+++ b/media/audio/audio_input_controller.h
@@ -84,7 +84,8 @@ class UserInputMonitor;
class MEDIA_EXPORT AudioInputController
: public base::RefCountedThreadSafe<AudioInputController>,
- public AudioInputStream::AudioInputCallback {
+ public AudioInputStream::AudioInputCallback,
+ public AudioManager::StateChangeListener {
public:
// Error codes to make native loggin more clear. These error codes are added
@@ -234,6 +235,8 @@ class MEDIA_EXPORT AudioInputController
double volume) OVERRIDE;
virtual void OnError(AudioInputStream* stream) OVERRIDE;
+ virtual void OnStateChange(const std::string& state) OVERRIDE;
+
bool SharedMemoryAndSyncSocketMode() const { return sync_writer_ != NULL; }
protected:
@@ -266,17 +269,14 @@ class MEDIA_EXPORT AudioInputController
};
#endif
- AudioInputController(EventHandler* handler,
+ AudioInputController(AudioManager* audio_manager,
+ EventHandler* handler,
SyncWriter* sync_writer,
UserInputMonitor* user_input_monitor);
virtual ~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,
- const AudioParameters& params,
- const std::string& device_id);
+ void DoCreate(const AudioParameters& params, const std::string& device_id);
void DoCreateForStream(AudioInputStream* stream_to_control);
void DoRecord();
void DoClose();
@@ -319,6 +319,8 @@ class MEDIA_EXPORT AudioInputController
// notifications from this class.
EventHandler* handler_;
+ media::AudioManager* audio_manager_;
no longer working on chromium 2014/08/26 08:38:08 const media::AudioManager*audio_manager_; won't wo
henrika (OOO until Aug 14) 2014/08/26 10:30:10 Done.
+
// Pointer to the audio input stream object.
AudioInputStream* stream_;

Powered by Google App Engine
This is Rietveld 408576698