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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 protected: | 50 protected: |
51 virtual ~AudioOutputIPCDelegate(); | 51 virtual ~AudioOutputIPCDelegate(); |
52 }; | 52 }; |
53 | 53 |
54 // Provides IPC functionality for an AudioOutputDevice. The implementation | 54 // Provides IPC functionality for an AudioOutputDevice. The implementation |
55 // should asynchronously deliver the messages to an AudioOutputController object | 55 // should asynchronously deliver the messages to an AudioOutputController object |
56 // (or create one in the case of CreateStream()), that may live in a separate | 56 // (or create one in the case of CreateStream()), that may live in a separate |
57 // process. | 57 // process. |
58 class MEDIA_EXPORT AudioOutputIPC { | 58 class MEDIA_EXPORT AudioOutputIPC { |
59 public: | 59 public: |
| 60 virtual ~AudioOutputIPC(); |
| 61 |
60 // Registers an AudioOutputIPCDelegate and returns a |stream_id| that must | 62 // Registers an AudioOutputIPCDelegate and returns a |stream_id| that must |
61 // be used with all other IPC functions in this interface. | 63 // be used with all other IPC functions in this interface. |
62 virtual int AddDelegate(AudioOutputIPCDelegate* delegate) = 0; | 64 virtual int AddDelegate(AudioOutputIPCDelegate* delegate) = 0; |
63 | 65 |
64 // Unregisters a delegate that was previously registered via a call to | 66 // Unregisters a delegate that was previously registered via a call to |
65 // AddDelegate(). The audio stream should be in a closed state prior to | 67 // AddDelegate(). The audio stream should be in a closed state prior to |
66 // calling this function. | 68 // calling this function. |
67 virtual void RemoveDelegate(int stream_id) = 0; | 69 virtual void RemoveDelegate(int stream_id) = 0; |
68 | 70 |
69 // Sends a request to create an AudioOutputController object in the peer | 71 // Sends a request to create an AudioOutputController object in the peer |
(...skipping 19 matching lines...) Expand all Loading... |
89 // TODO(tommi): This is currently neither implemented nor called. Remove? | 91 // TODO(tommi): This is currently neither implemented nor called. Remove? |
90 virtual void FlushStream(int stream_id) = 0; | 92 virtual void FlushStream(int stream_id) = 0; |
91 | 93 |
92 // Closes the audio stream and deletes the matching AudioOutputController | 94 // Closes the audio stream and deletes the matching AudioOutputController |
93 // instance. Prior to deleting the AudioOutputController object, a call to | 95 // instance. Prior to deleting the AudioOutputController object, a call to |
94 // AudioOutputController::Close must be made. | 96 // AudioOutputController::Close must be made. |
95 virtual void CloseStream(int stream_id) = 0; | 97 virtual void CloseStream(int stream_id) = 0; |
96 | 98 |
97 // Sets the volume of the audio stream. | 99 // Sets the volume of the audio stream. |
98 virtual void SetVolume(int stream_id, double volume) = 0; | 100 virtual void SetVolume(int stream_id, double volume) = 0; |
99 | |
100 protected: | |
101 virtual ~AudioOutputIPC(); | |
102 }; | 101 }; |
103 | 102 |
104 } // namespace media | 103 } // namespace media |
105 | 104 |
106 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ | 105 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ |
OLD | NEW |