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

Unified Diff: media/audio/audio_input_device.h

Issue 12440027: Do not pass the string device_id via IPC message to create an audio input stream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Per's comments. Created 7 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 | « content/renderer/pepper/pepper_platform_audio_input_impl.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_input_device.h
diff --git a/media/audio/audio_input_device.h b/media/audio/audio_input_device.h
index e4d6230be2ba8c795b8d4debf5d71a7aeb6d1934..45aa50bc6ecb8b43571215655f2d46816668a5fe 100644
--- a/media/audio/audio_input_device.h
+++ b/media/audio/audio_input_device.h
@@ -27,18 +27,10 @@
//
// State sequences:
//
-// Sequence where session_id has not been set using SetDevice():
-// ('<-' signifies callbacks, -> signifies calls made by AudioInputDevice)
// Start -> InitializeOnIOThread -> CreateStream ->
// <- OnStreamCreated <-
// -> StartOnIOThread -> PlayStream ->
//
-// Sequence where session_id has been set using SetDevice():
-// Start -> InitializeOnIOThread -> StartDevice ->
-// <- OnDeviceReady <-
-// -> CreateStream ->
-// <- OnStreamCreated <-
-// -> StartOnIOThread -> PlayStream ->
//
// AudioInputDevice::Capture => low latency audio transport on audio thread =>
// |
@@ -93,11 +85,10 @@ class MEDIA_EXPORT AudioInputDevice
// AudioCapturerSource implementation.
virtual void Initialize(const AudioParameters& params,
CaptureCallback* callback,
- CaptureEventHandler* event_handler) OVERRIDE;
+ int session_id) OVERRIDE;
virtual void Start() OVERRIDE;
virtual void Stop() OVERRIDE;
virtual void SetVolume(double volume) OVERRIDE;
- virtual void SetDevice(int session_id) OVERRIDE;
virtual void SetAutomaticGainControl(bool enabled) OVERRIDE;
protected:
@@ -110,7 +101,6 @@ class MEDIA_EXPORT AudioInputDevice
virtual void OnVolume(double volume) OVERRIDE;
virtual void OnStateChanged(
AudioInputIPCDelegate::State state) OVERRIDE;
- virtual void OnDeviceReady(const std::string& device_id) OVERRIDE;
virtual void OnIPCClosed() OVERRIDE;
friend class base::RefCountedThreadSafe<AudioInputDevice>;
@@ -122,7 +112,6 @@ class MEDIA_EXPORT AudioInputDevice
// be executed on that thread. They interact with AudioInputMessageFilter and
// sends IPC messages on that thread.
void InitializeOnIOThread();
- void SetSessionIdOnIOThread(int session_id);
void StartOnIOThread();
void ShutDownOnIOThread();
void SetVolumeOnIOThread(double volume);
@@ -135,7 +124,6 @@ class MEDIA_EXPORT AudioInputDevice
AudioParameters audio_parameters_;
CaptureCallback* callback_;
- CaptureEventHandler* event_handler_;
AudioInputIPC* ipc_;
@@ -143,13 +131,9 @@ class MEDIA_EXPORT AudioInputDevice
int stream_id_;
// The media session ID used to identify which input device to be started.
- // Only modified on the IO thread.
+ // Only modified in Initialize() and ShutDownOnIOThread().
int session_id_;
- // State variable used to indicate it is waiting for a OnDeviceReady()
- // callback. Only modified on the IO thread.
- bool pending_device_ready_;
-
// Stores the Automatic Gain Control state. Default is false.
// Only modified on the IO thread.
bool agc_is_enabled_;
« no previous file with comments | « content/renderer/pepper/pepper_platform_audio_input_impl.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698