Index: media/audio/audio_input_ipc.h |
=================================================================== |
--- media/audio/audio_input_ipc.h (revision 186213) |
+++ media/audio/audio_input_ipc.h (working copy) |
@@ -25,17 +25,24 @@ |
}; |
// Called when an AudioInputController has been created. |
- // The shared memory |handle| points to a memory section that's used to |
- // transfer data between the AudioInputDevice and AudioInputController |
- // objects. The implementation of OnStreamCreated takes ownership. |
// The |socket_handle| is used by the AudioInputController to signal |
// notifications that more data is available and can optionally provide |
- // parameter changes back. The AudioInputDevice must read from this socket |
+ // parameter changes back. The AudioInputDevice must read from this socket |
// and process the shared memory whenever data is read from the socket. |
- virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
- base::SyncSocket::Handle socket_handle, |
- int length) = 0; |
+ // The |total_handles| states how many shared memory buffers are used to |
+ // transfer data. |
+ virtual void OnStreamCreated(base::SyncSocket::Handle socket_handle, |
+ int total_handles) = 0; |
+ // Called when an AudioInputController has been created. |
+ // The shared memory |handle| points to a memory section that's used to |
+ // transfer data between the AudioInputDevice and AudioInputController |
+ // objects. The implementation of OnStreamCreated takes ownership. |
+ // The memory has |length| size and its id is |index|. |
+ virtual void OnSharedMemoryCreated(base::SharedMemoryHandle handle, |
+ int length, |
+ int index) = 0; |
+ |
// Called when state of an audio stream has changed. |
virtual void OnStateChanged(State state) = 0; |
@@ -76,8 +83,12 @@ |
// audio |params|. Once the stream has been created, the implementation must |
// generate a notification to the AudioInputIPCDelegate and call |
// OnStreamCreated(). |
- virtual void CreateStream(int stream_id, const AudioParameters& params, |
- const std::string& device_id, bool automatic_gain_control) = 0; |
+ virtual void CreateStream( |
+ int stream_id, |
+ const AudioParameters& params, |
+ const std::string& device_id, |
+ bool automatic_gain_control, |
+ int shared_memory_count) = 0; |
// Starts the device on the server side. Once the device has started, |
// or failed to start, a callback to |