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 16 matching lines...) Expand all Loading... |
86 // TODO(tommi): This is currently neither implemented nor called. Remove? | 88 // TODO(tommi): This is currently neither implemented nor called. Remove? |
87 virtual void FlushStream(int stream_id) = 0; | 89 virtual void FlushStream(int stream_id) = 0; |
88 | 90 |
89 // Closes the audio stream and deletes the matching AudioOutputController | 91 // Closes the audio stream and deletes the matching AudioOutputController |
90 // instance. Prior to deleting the AudioOutputController object, a call to | 92 // instance. Prior to deleting the AudioOutputController object, a call to |
91 // AudioOutputController::Close must be made. | 93 // AudioOutputController::Close must be made. |
92 virtual void CloseStream(int stream_id) = 0; | 94 virtual void CloseStream(int stream_id) = 0; |
93 | 95 |
94 // Sets the volume of the audio stream. | 96 // Sets the volume of the audio stream. |
95 virtual void SetVolume(int stream_id, double volume) = 0; | 97 virtual void SetVolume(int stream_id, double volume) = 0; |
96 | |
97 protected: | |
98 virtual ~AudioOutputIPC(); | |
99 }; | 98 }; |
100 | 99 |
101 } // namespace media | 100 } // namespace media |
102 | 101 |
103 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ | 102 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_IPC_H_ |
OLD | NEW |