| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // Contains IPC notifications for the state of the server side | 29 // Contains IPC notifications for the state of the server side |
| 30 // (AudioOutputController) audio state changes and when an AudioOutputController | 30 // (AudioOutputController) audio state changes and when an AudioOutputController |
| 31 // has been created. Implemented by AudioOutputDevice. | 31 // has been created. Implemented by AudioOutputDevice. |
| 32 class MEDIA_EXPORT AudioOutputIPCDelegate { | 32 class MEDIA_EXPORT AudioOutputIPCDelegate { |
| 33 public: | 33 public: |
| 34 // Called when state of an audio stream has changed. | 34 // Called when state of an audio stream has changed. |
| 35 virtual void OnStateChanged(AudioOutputIPCDelegateState state) = 0; | 35 virtual void OnStateChanged(AudioOutputIPCDelegateState state) = 0; |
| 36 | 36 |
| 37 // Called when an authorization request for an output device has been | 37 // Called when an authorization request for an output device has been |
| 38 // completed | 38 // completed |
| 39 virtual void OnDeviceAuthorized( | 39 virtual void OnDeviceAuthorized(OutputDeviceStatus device_status, |
| 40 OutputDeviceStatus device_status, | 40 const media::AudioParameters& output_params, |
| 41 const media::AudioParameters& output_params) = 0; | 41 const std::string& matched_device_id) = 0; |
| 42 | 42 |
| 43 // Called when an audio stream has been created. | 43 // Called when an audio stream has been created. |
| 44 // The shared memory |handle| points to a memory section that's used to | 44 // The shared memory |handle| points to a memory section that's used to |
| 45 // transfer audio buffers from the AudioOutputIPCDelegate back to the | 45 // transfer audio buffers from the AudioOutputIPCDelegate back to the |
| 46 // AudioRendererHost. The implementation of OnStreamCreated takes ownership. | 46 // AudioRendererHost. The implementation of OnStreamCreated takes ownership. |
| 47 // The |socket_handle| is used by AudioRendererHost to signal requests for | 47 // The |socket_handle| is used by AudioRendererHost to signal requests for |
| 48 // audio data to be written into the shared memory. The AudioOutputIPCDelegate | 48 // audio data to be written into the shared memory. The AudioOutputIPCDelegate |
| 49 // must read from this socket and provide audio whenever data (search for | 49 // must read from this socket and provide audio whenever data (search for |
| 50 // "pending_bytes") is received. | 50 // "pending_bytes") is received. |
| 51 virtual void OnStreamCreated(base::SharedMemoryHandle handle, | 51 virtual void OnStreamCreated(base::SharedMemoryHandle handle, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 // AudioOutputController in the peer process. | 110 // AudioOutputController in the peer process. |
| 111 virtual void CloseStream() = 0; | 111 virtual void CloseStream() = 0; |
| 112 | 112 |
| 113 // Sets the volume of the audio stream. | 113 // Sets the volume of the audio stream. |
| 114 virtual void SetVolume(double volume) = 0; | 114 virtual void SetVolume(double volume) = 0; |
| 115 }; | 115 }; |
| 116 | 116 |
| 117 } // namespace media | 117 } // namespace media |
| 118 | 118 |
| 119 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ | 119 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ |
| OLD | NEW |