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

Unified Diff: media/audio/audio_output_device.h

Issue 12383016: Merge AssociateStreamWithProducer message into CreateStream message for both audio output and input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: media/audio/audio_output_device.h
diff --git a/media/audio/audio_output_device.h b/media/audio/audio_output_device.h
index 28a7098057f9fb22db4e4ba38d554a39dc9dd8b3..afef9690f74fffae55aeecf2eaec55fff11741d0 100644
--- a/media/audio/audio_output_device.h
+++ b/media/audio/audio_output_device.h
@@ -94,8 +94,8 @@ class MEDIA_EXPORT AudioOutputDevice
int length) OVERRIDE;
virtual void OnIPCClosed() OVERRIDE;
- // Creates an uninitialized AudioOutputDevice. Clients must call Initialize()
- // before using.
+ // Creates an uninitialized AudioOutputDevice. Takes ownership of |ipc|.
+ // Clients must call Initialize() before using.
AudioOutputDevice(AudioOutputIPC* ipc,
const scoped_refptr<base::MessageLoopProxy>& io_loop);
@@ -105,10 +105,6 @@ class MEDIA_EXPORT AudioOutputDevice
friend class base::RefCountedThreadSafe<AudioOutputDevice>;
virtual ~AudioOutputDevice();
- // Accessors for subclasses (via IO thread only).
- int stream_id() const { return stream_id_; }
- AudioOutputIPC* audio_output_ipc() const { return ipc_; }
-
private:
// Note: The ordering of members in this enum is critical to correct behavior!
enum State {
@@ -138,12 +134,9 @@ class MEDIA_EXPORT AudioOutputDevice
RenderCallback* callback_;
// A pointer to the IPC layer that takes care of sending requests over to
- // the AudioRendererHost.
- AudioOutputIPC* ipc_;
-
- // Our stream ID on the message filter. Only accessed on the IO thread.
- // Must only be modified on the IO thread.
- int stream_id_;
+ // the AudioRendererHost. Only valid when state_ != IPC_CLOSED and must only
+ // be accessed on the IO thread.
+ const scoped_ptr<AudioOutputIPC> ipc_;
// Current state (must only be accessed from the IO thread). See comments for
// State enum above.

Powered by Google App Engine
This is Rietveld 408576698