Chromium Code Reviews| 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 26 matching lines...) Expand all Loading... | |
| 37 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX) | 37 IPC_ENUM_TRAITS_MAX_VALUE(media::ChannelLayout, media::CHANNEL_LAYOUT_MAX) |
| 38 | 38 |
| 39 IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config) | 39 IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config) |
| 40 IPC_STRUCT_MEMBER(media::AudioParameters, params) | 40 IPC_STRUCT_MEMBER(media::AudioParameters, params) |
| 41 IPC_STRUCT_MEMBER(bool, automatic_gain_control) | 41 IPC_STRUCT_MEMBER(bool, automatic_gain_control) |
| 42 IPC_STRUCT_MEMBER(uint32, shared_memory_count) | 42 IPC_STRUCT_MEMBER(uint32, shared_memory_count) |
| 43 IPC_STRUCT_END() | 43 IPC_STRUCT_END() |
| 44 | 44 |
| 45 // Messages sent from the browser to the renderer. | 45 // Messages sent from the browser to the renderer. |
| 46 | 46 |
| 47 // Tell the renderer process that an audio output device has been authorized | |
| 48 // for a given stream. The renderer is given the output parameters for the | |
| 49 // authorized device. | |
| 50 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyDeviceAuthorized, | |
| 51 int /* stream id */, | |
| 52 bool /* success */, | |
| 53 media::AudioParameters /* output parameters */) | |
| 54 | |
| 47 // Tell the renderer process that an audio stream has been created. | 55 // Tell the renderer process that an audio stream has been created. |
| 48 // The renderer process is given a shared memory handle for the audio data | 56 // The renderer process is given a shared memory handle for the audio data |
| 49 // buffer it shares with the browser process. It is also given a SyncSocket that | 57 // buffer it shares with the browser process. It is also given a SyncSocket that |
| 50 // it uses to communicate with the browser process about the state of the | 58 // it uses to communicate with the browser process about the state of the |
| 51 // buffered audio data. | 59 // buffered audio data. |
| 52 IPC_MESSAGE_CONTROL4( | 60 IPC_MESSAGE_CONTROL4( |
| 53 AudioMsg_NotifyStreamCreated, | 61 AudioMsg_NotifyStreamCreated, |
| 54 int /* stream id */, | 62 int /* stream id */, |
| 55 base::SharedMemoryHandle /* handle */, | 63 base::SharedMemoryHandle /* handle */, |
| 56 base::SyncSocket::TransitDescriptor /* socket descriptor */, | 64 base::SyncSocket::TransitDescriptor /* socket descriptor */, |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 77 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, | 85 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, |
| 78 int /* stream id */, | 86 int /* stream id */, |
| 79 media::AudioInputIPCDelegateState /* new state */) | 87 media::AudioInputIPCDelegateState /* new state */) |
| 80 | 88 |
| 81 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, | 89 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, |
| 82 int /* stream id */, | 90 int /* stream id */, |
| 83 double /* volume */) | 91 double /* volume */) |
| 84 | 92 |
| 85 // Notification message sent from AudioRendererHost to renderer for state | 93 // Notification message sent from AudioRendererHost to renderer for state |
| 86 // update after the renderer has requested a SwitchOutputDevice. | 94 // update after the renderer has requested a SwitchOutputDevice. |
| 87 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyOutputDeviceSwitched, | 95 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyOutputDeviceSwitched, |
| 88 int /* stream id */, | 96 int /* stream id */, |
| 89 int /* request id */, | |
| 90 media::SwitchOutputDeviceResult /* result */) | 97 media::SwitchOutputDeviceResult /* result */) |
| 91 | 98 |
| 92 // Messages sent from the renderer to the browser. | 99 // Messages sent from the renderer to the browser. |
| 93 | 100 |
| 94 // Request that is sent to the browser for creating an audio output stream. | 101 // Request that is sent to the browser to authorize use of an audio output |
|
palmer
2015/09/15 20:29:24
To request the use of?
Guido Urdaneta
2015/09/16 11:34:49
Done.
| |
| 95 // |render_frame_id| is the routing ID for the RenderFrame producing the audio | 102 // device. |render_frame_id| is the routing ID for the RenderFrame producing |
| 96 // data. | 103 // the audio data. |
| 97 IPC_MESSAGE_CONTROL4(AudioHostMsg_CreateStream, | 104 IPC_MESSAGE_CONTROL5(AudioHostMsg_RequestDeviceAuthorization, |
| 98 int /* stream_id */, | 105 int /* stream_id */, |
| 99 int /* render_frame_id */, | 106 int /* render_frame_id */, |
| 100 int /* session_id */, | 107 int /* session_id */, |
| 108 std::string /* device_id */, | |
|
palmer
2015/09/15 20:29:24
What lexical/syntactic form do these device IDs ha
Guido Urdaneta
2015/09/16 11:34:49
It's an opaque ID consisting of a hash of the actu
| |
| 109 GURL /* security_origin */) | |
|
palmer
2015/09/15 20:29:24
url::Origin is the canonical class for this purpos
Guido Urdaneta
2015/09/16 11:34:49
Done.
| |
| 110 | |
| 111 // Request that is sent to the browser for creating an audio output stream. | |
| 112 IPC_MESSAGE_CONTROL3(AudioHostMsg_CreateStream, | |
| 113 int /* stream_id */, | |
| 114 int /* render_frame_id */, | |
| 101 media::AudioParameters /* params */) | 115 media::AudioParameters /* params */) |
| 102 | 116 |
| 103 // Request that is sent to the browser for creating an audio input stream. | 117 // Request that is sent to the browser for creating an audio input stream. |
| 104 // |render_frame_id| is the routing ID for the RenderFrame consuming the audio | 118 // |render_frame_id| is the routing ID for the RenderFrame consuming the audio |
| 105 // data. | 119 // data. |
| 106 IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream, | 120 IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream, |
| 107 int /* stream_id */, | 121 int /* stream_id */, |
| 108 int /* render_frame_id */, | 122 int /* render_frame_id */, |
| 109 int /* session_id */, | 123 int /* session_id */, |
| 110 AudioInputHostMsg_CreateStream_Config) | 124 AudioInputHostMsg_CreateStream_Config) |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 134 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, | 148 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, |
| 135 int /* stream_id */, | 149 int /* stream_id */, |
| 136 double /* volume */) | 150 double /* volume */) |
| 137 | 151 |
| 138 // Set audio volume of the input stream specified by stream_id. | 152 // Set audio volume of the input stream specified by stream_id. |
| 139 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 153 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
| 140 int /* stream_id */, | 154 int /* stream_id */, |
| 141 double /* volume */) | 155 double /* volume */) |
| 142 | 156 |
| 143 // Switch the output device of the stream specified by stream_id. | 157 // Switch the output device of the stream specified by stream_id. |
| 144 IPC_MESSAGE_CONTROL5(AudioHostMsg_SwitchOutputDevice, | 158 IPC_MESSAGE_CONTROL4(AudioHostMsg_SwitchOutputDevice, |
| 145 int /* stream_id */, | 159 int /* stream_id */, |
| 146 int /* render_frame_id */, | 160 int /* render_frame_id */, |
| 147 std::string /* device_id */, | 161 std::string /* device_id */, |
| 148 GURL /* security_origin */, | 162 GURL /* security_origin */) |
|
palmer
2015/09/15 20:29:24
url::Origin here too.
Guido Urdaneta
2015/09/16 11:34:49
Done.
| |
| 149 int /* request_id */) | |
| OLD | NEW |