| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ | 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ |
| 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ | 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ |
| 7 | 7 |
| 8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
| 9 #include "base/sync_socket.h" | 9 #include "base/sync_socket.h" |
| 10 #include "media/audio/audio_parameters.h" | 10 #include "media/audio/audio_parameters.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // Provides the IPC functionality for an AudioOutputIPCDelegate (e.g., an | 54 // Provides the IPC functionality for an AudioOutputIPCDelegate (e.g., an |
| 55 // AudioOutputDevice). The implementation should asynchronously deliver the | 55 // AudioOutputDevice). The implementation should asynchronously deliver the |
| 56 // messages to an AudioOutputController object (or create one in the case of | 56 // messages to an AudioOutputController object (or create one in the case of |
| 57 // CreateStream()), that may live in a separate process. | 57 // CreateStream()), that may live in a separate process. |
| 58 class MEDIA_EXPORT AudioOutputIPC { | 58 class MEDIA_EXPORT AudioOutputIPC { |
| 59 public: | 59 public: |
| 60 virtual ~AudioOutputIPC(); | 60 virtual ~AudioOutputIPC(); |
| 61 | 61 |
| 62 // Sends a request to create an AudioOutputController object in the peer | 62 // Sends a request to create an AudioOutputController object in the peer |
| 63 // process and configures it to use the specified audio |params| including | 63 // process and configures it to use the specified audio |params| including |
| 64 // number of synchronized input channels. Once the stream has been created, | 64 // number of synchronized input channels.|session_id| is used by the browser |
| 65 // to select the correct input device if the input channel in |params| is |
| 66 // valid, otherwise it will be ignored. Once the stream has been created, |
| 65 // the implementation will notify |delegate| by calling OnStreamCreated(). | 67 // the implementation will notify |delegate| by calling OnStreamCreated(). |
| 66 virtual void CreateStream(AudioOutputIPCDelegate* delegate, | 68 virtual void CreateStream(AudioOutputIPCDelegate* delegate, |
| 67 const AudioParameters& params) = 0; | 69 const AudioParameters& params, |
| 70 int session_id) = 0; |
| 68 | 71 |
| 69 // Starts playing the stream. This should generate a call to | 72 // Starts playing the stream. This should generate a call to |
| 70 // AudioOutputController::Play(). | 73 // AudioOutputController::Play(). |
| 71 virtual void PlayStream() = 0; | 74 virtual void PlayStream() = 0; |
| 72 | 75 |
| 73 // Pauses an audio stream. This should generate a call to | 76 // Pauses an audio stream. This should generate a call to |
| 74 // AudioOutputController::Pause(). | 77 // AudioOutputController::Pause(). |
| 75 virtual void PauseStream() = 0; | 78 virtual void PauseStream() = 0; |
| 76 | 79 |
| 77 // Closes the audio stream which should shut down the corresponding | 80 // Closes the audio stream which should shut down the corresponding |
| 78 // AudioOutputController in the peer process. | 81 // AudioOutputController in the peer process. |
| 79 virtual void CloseStream() = 0; | 82 virtual void CloseStream() = 0; |
| 80 | 83 |
| 81 // Sets the volume of the audio stream. | 84 // Sets the volume of the audio stream. |
| 82 virtual void SetVolume(double volume) = 0; | 85 virtual void SetVolume(double volume) = 0; |
| 83 }; | 86 }; |
| 84 | 87 |
| 85 } // namespace media | 88 } // namespace media |
| 86 | 89 |
| 87 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ | 90 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ |
| OLD | NEW |