OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // IPC messages for the audio. | 5 // IPC messages for the audio. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
| 8 #include "base/basictypes.h" |
8 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
9 #include "base/sync_socket.h" | 10 #include "base/sync_socket.h" |
10 #include "content/common/media/audio_stream_state.h" | 11 #include "content/common/media/audio_stream_state.h" |
11 #include "ipc/ipc_message_macros.h" | 12 #include "ipc/ipc_message_macros.h" |
12 #include "media/audio/audio_buffers_state.h" | 13 #include "media/audio/audio_buffers_state.h" |
13 #include "media/audio/audio_parameters.h" | 14 #include "media/audio/audio_parameters.h" |
14 | 15 |
15 #define IPC_MESSAGE_START AudioMsgStart | 16 #define IPC_MESSAGE_START AudioMsgStart |
16 | 17 |
17 IPC_ENUM_TRAITS(AudioStreamState) | 18 IPC_ENUM_TRAITS(AudioStreamState) |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamVolume, | 97 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamVolume, |
97 int /* stream id */, | 98 int /* stream id */, |
98 double /* volume */) | 99 double /* volume */) |
99 | 100 |
100 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, | 101 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, |
101 int /* stream id */, | 102 int /* stream id */, |
102 double /* volume */) | 103 double /* volume */) |
103 | 104 |
104 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted, | 105 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted, |
105 int /* stream id */, | 106 int /* stream id */, |
106 int /* device_index */) | 107 std::string /* device_id */) |
107 | 108 |
108 // Messages sent from the renderer to the browser. | 109 // Messages sent from the renderer to the browser. |
109 | 110 |
110 // Request that got sent to browser for creating an audio output stream | 111 // Request that got sent to browser for creating an audio output stream |
111 IPC_MESSAGE_CONTROL3(AudioHostMsg_CreateStream, | 112 IPC_MESSAGE_CONTROL3(AudioHostMsg_CreateStream, |
112 int /* stream_id */, | 113 int /* stream_id */, |
113 AudioParameters /* params */, | 114 AudioParameters /* params */, |
114 bool /* low-latency */) | 115 bool /* low-latency */) |
115 | 116 |
116 // Request that got sent to browser for creating an audio input stream | 117 // Request that got sent to browser for creating an audio input stream |
117 IPC_MESSAGE_CONTROL3(AudioInputHostMsg_CreateStream, | 118 IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream, |
118 int /* stream_id */, | 119 int /* stream_id */, |
119 AudioParameters /* params */, | 120 AudioParameters /* params */, |
120 bool /* low-latency */) | 121 bool /* low-latency */, |
| 122 std::string /* device_id */) |
121 | 123 |
122 // Tell the browser the audio buffer prepared for stream (stream_id) is | 124 // Tell the browser the audio buffer prepared for stream (stream_id) is |
123 // filled and is ready to be consumed. | 125 // filled and is ready to be consumed. |
124 IPC_MESSAGE_CONTROL2(AudioHostMsg_NotifyPacketReady, | 126 IPC_MESSAGE_CONTROL2(AudioHostMsg_NotifyPacketReady, |
125 int /* stream_id */, | 127 int /* stream_id */, |
126 uint32 /* packet size */) | 128 uint32 /* packet size */) |
127 | 129 |
128 // Start buffering and play the audio stream specified by stream_id. | 130 // Start buffering and play the audio stream specified by stream_id. |
129 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream, | 131 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream, |
130 int /* stream_id */) | 132 int /* stream_id */) |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // Set audio volume of the input stream specified by stream_id. | 169 // Set audio volume of the input stream specified by stream_id. |
168 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 170 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
169 int /* stream_id */, | 171 int /* stream_id */, |
170 double /* volume */) | 172 double /* volume */) |
171 | 173 |
172 // Start the device referenced by the session_id for the input stream specified | 174 // Start the device referenced by the session_id for the input stream specified |
173 // by stream_id. | 175 // by stream_id. |
174 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, | 176 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, |
175 int /* stream_id */, | 177 int /* stream_id */, |
176 int /* session_id */) | 178 int /* session_id */) |
OLD | NEW |