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 // 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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 #else | 41 #else |
42 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, | 42 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, |
43 int /* stream id */, | 43 int /* stream id */, |
44 base::SharedMemoryHandle /* handle */, | 44 base::SharedMemoryHandle /* handle */, |
45 base::FileDescriptor /* socket handle */, | 45 base::FileDescriptor /* socket handle */, |
46 uint32 /* length */) | 46 uint32 /* length */) |
47 #endif | 47 #endif |
48 | 48 |
49 // Tell the renderer process that an audio input stream has been created. | 49 // Tell the renderer process that an audio input stream has been created. |
50 // The renderer process would be given a SyncSocket that it should read | 50 // The renderer process would be given a SyncSocket that it should read |
51 // from from then on. | 51 // from from then on. It is also given total number of shared memory handles. |
52 #if defined(OS_WIN) | 52 #if defined(OS_WIN) |
53 IPC_MESSAGE_CONTROL4(AudioInputMsg_NotifyStreamCreated, | 53 IPC_MESSAGE_CONTROL3(AudioInputMsg_NotifyStreamCreated, |
| 54 int /* stream id */, |
| 55 base::SyncSocket::Handle /* socket handle */, |
| 56 uint32 /* total shared memory handles */) |
| 57 |
| 58 #else |
| 59 IPC_MESSAGE_CONTROL3(AudioInputMsg_NotifyStreamCreated, |
| 60 int /* stream id */, |
| 61 base::FileDescriptor /* socket handle */, |
| 62 uint32 /* total shared memory handles */) |
| 63 #endif |
| 64 |
| 65 // Tell the renderer process that a shared memory handle has been created. |
| 66 IPC_MESSAGE_CONTROL4(AudioInputMsg_NotifySharedMemoryCreated, |
54 int /* stream id */, | 67 int /* stream id */, |
55 base::SharedMemoryHandle /* handle */, | 68 base::SharedMemoryHandle /* handle */, |
56 base::SyncSocket::Handle /* socket handle */, | 69 uint32 /* length */, |
57 uint32 /* length */) | 70 uint32 /* handle index */) |
58 #else | |
59 IPC_MESSAGE_CONTROL4(AudioInputMsg_NotifyStreamCreated, | |
60 int /* stream id */, | |
61 base::SharedMemoryHandle /* handle */, | |
62 base::FileDescriptor /* socket handle */, | |
63 uint32 /* length */) | |
64 #endif | |
65 | 71 |
66 // Notification message sent from AudioRendererHost to renderer after an output | 72 // Notification message sent from AudioRendererHost to renderer after an output |
67 // device change has occurred. | 73 // device change has occurred. |
68 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyDeviceChanged, | 74 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyDeviceChanged, |
69 int /* stream_id */, | 75 int /* stream_id */, |
70 int /* new_buffer_size */, | 76 int /* new_buffer_size */, |
71 int /* new_sample_rate */) | 77 int /* new_sample_rate */) |
72 | 78 |
73 // Notification message sent from AudioRendererHost to renderer for state | 79 // Notification message sent from AudioRendererHost to renderer for state |
74 // update after the renderer has requested a Create/Start/Close. | 80 // update after the renderer has requested a Create/Start/Close. |
(...skipping 15 matching lines...) Expand all Loading... |
90 std::string /* device_id */) | 96 std::string /* device_id */) |
91 | 97 |
92 // Messages sent from the renderer to the browser. | 98 // Messages sent from the renderer to the browser. |
93 | 99 |
94 // Request that got sent to browser for creating an audio output stream | 100 // Request that got sent to browser for creating an audio output stream |
95 IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream, | 101 IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream, |
96 int /* stream_id */, | 102 int /* stream_id */, |
97 media::AudioParameters /* params */) | 103 media::AudioParameters /* params */) |
98 | 104 |
99 // Request that got sent to browser for creating an audio input stream | 105 // Request that got sent to browser for creating an audio input stream |
100 IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream, | 106 IPC_MESSAGE_CONTROL5(AudioInputHostMsg_CreateStream, |
101 int /* stream_id */, | 107 int /* stream_id */, |
102 media::AudioParameters /* params */, | 108 media::AudioParameters /* params */, |
103 std::string /* device_id */, | 109 std::string /* device_id */, |
104 bool /* automatic_gain_control */) | 110 bool /* automatic_gain_control */, |
| 111 int /* shared memory count */) |
105 | 112 |
106 // Indicate that audio for a stream is produced by the specified render view. | 113 // Indicate that audio for a stream is produced by the specified render view. |
107 IPC_MESSAGE_CONTROL2(AudioHostMsg_AssociateStreamWithProducer, | 114 IPC_MESSAGE_CONTROL2(AudioHostMsg_AssociateStreamWithProducer, |
108 int /* stream_id */, | 115 int /* stream_id */, |
109 int /* render_view_id */) | 116 int /* render_view_id */) |
110 | 117 |
111 // Indicate that audio for a stream is consumed by the specified render view. | 118 // Indicate that audio for a stream is consumed by the specified render view. |
112 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_AssociateStreamWithConsumer, | 119 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_AssociateStreamWithConsumer, |
113 int /* stream_id */, | 120 int /* stream_id */, |
114 int /* render_view_id */) | 121 int /* render_view_id */) |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // Set audio volume of the input stream specified by stream_id. | 153 // Set audio volume of the input stream specified by stream_id. |
147 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 154 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
148 int /* stream_id */, | 155 int /* stream_id */, |
149 double /* volume */) | 156 double /* volume */) |
150 | 157 |
151 // Start the device referenced by the session_id for the input stream specified | 158 // Start the device referenced by the session_id for the input stream specified |
152 // by stream_id. | 159 // by stream_id. |
153 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, | 160 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, |
154 int /* stream_id */, | 161 int /* stream_id */, |
155 int /* session_id */) | 162 int /* session_id */) |
OLD | NEW |