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

Unified Diff: media/audio/audio_output_ipc.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: rebase 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_ipc.h
diff --git a/media/audio/audio_output_ipc.h b/media/audio/audio_output_ipc.h
index 894ece5f3aabf7386385b067f4b90fb50303e5c5..85ed5c5f9ad0111b9f3b993081868bf21b67296a 100644
--- a/media/audio/audio_output_ipc.h
+++ b/media/audio/audio_output_ipc.h
@@ -43,61 +43,48 @@ class MEDIA_EXPORT AudioOutputIPCDelegate {
// Called when the AudioOutputIPC object is going away and/or when the IPC
// channel has been closed and no more ipc requests can be made.
- // Implementations must clear any references to the AudioOutputIPC object
- // at this point.
+ // Implementations should delete their owned AudioOutputIPC instance
+ // immediately.
virtual void OnIPCClosed() = 0;
protected:
virtual ~AudioOutputIPCDelegate();
};
-// Provides IPC functionality for an AudioOutputDevice. The implementation
-// should asynchronously deliver the messages to an AudioOutputController object
-// (or create one in the case of CreateStream()), that may live in a separate
-// process.
+// Provides the IPC functionality for an AudioOutputIPCDelegate (e.g., an
+// AudioOutputDevice). The implementation should asynchronously deliver the
+// messages to an AudioOutputController object (or create one in the case of
+// CreateStream()), that may live in a separate process.
class MEDIA_EXPORT AudioOutputIPC {
public:
- // Registers an AudioOutputIPCDelegate and returns a |stream_id| that must
- // be used with all other IPC functions in this interface.
- virtual int AddDelegate(AudioOutputIPCDelegate* delegate) = 0;
-
- // Unregisters a delegate that was previously registered via a call to
- // AddDelegate(). The audio stream should be in a closed state prior to
- // calling this function.
- virtual void RemoveDelegate(int stream_id) = 0;
+ virtual ~AudioOutputIPC();
// Sends a request to create an AudioOutputController object in the peer
- // process, identify it by |stream_id| and configure it to use the specified
- // audio |params| including number of synchronized input channels.
- // Once the stream has been created, the implementation must
- // generate a notification to the AudioOutputIPCDelegate and call
- // OnStreamCreated().
- virtual void CreateStream(int stream_id,
+ // process and configures it to use the specified audio |params| including
+ // number of synchronized input channels. Once the stream has been created,
+ // the implementation will notify |delegate| by calling OnStreamCreated().
+ virtual void CreateStream(AudioOutputIPCDelegate* delegate,
const AudioParameters& params) = 0;
// Starts playing the stream. This should generate a call to
// AudioOutputController::Play().
- virtual void PlayStream(int stream_id) = 0;
+ virtual void PlayStream() = 0;
// Pauses an audio stream. This should generate a call to
// AudioOutputController::Pause().
- virtual void PauseStream(int stream_id) = 0;
+ virtual void PauseStream() = 0;
// "Flushes" the audio device. This should generate a call to
// AudioOutputController::Flush().
// TODO(tommi): This is currently neither implemented nor called. Remove?
- virtual void FlushStream(int stream_id) = 0;
+ virtual void FlushStream() = 0;
- // Closes the audio stream and deletes the matching AudioOutputController
- // instance. Prior to deleting the AudioOutputController object, a call to
- // AudioOutputController::Close must be made.
- virtual void CloseStream(int stream_id) = 0;
+ // Closes the audio stream which should shut down the corresponding
+ // AudioOutputController in the peer process.
+ virtual void CloseStream() = 0;
// Sets the volume of the audio stream.
- virtual void SetVolume(int stream_id, double volume) = 0;
-
- protected:
- virtual ~AudioOutputIPC();
+ virtual void SetVolume(double volume) = 0;
};
} // namespace media
« media/audio/audio_output_device.cc ('K') | « media/audio/audio_output_device_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698