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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "base/sync_socket.h" | 10 #include "base/sync_socket.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/common/media/audio_param_traits.h" | 12 #include "content/common/media/audio_param_traits.h" |
13 #include "content/common/media/audio_stream_state.h" | 13 #include "content/common/media/audio_stream_state.h" |
14 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
15 #include "media/audio/audio_buffers_state.h" | 15 #include "media/audio/audio_buffers_state.h" |
16 #include "media/audio/audio_parameters.h" | 16 #include "media/audio/audio_parameters.h" |
17 | 17 |
18 #undef IPC_MESSAGE_EXPORT | 18 #undef IPC_MESSAGE_EXPORT |
19 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 19 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
20 #define IPC_MESSAGE_START AudioMsgStart | 20 #define IPC_MESSAGE_START AudioMsgStart |
21 | 21 |
22 IPC_ENUM_TRAITS(AudioStreamState) | 22 IPC_ENUM_TRAITS(AudioStreamState) |
23 | 23 |
24 IPC_STRUCT_TRAITS_BEGIN(AudioBuffersState) | 24 IPC_STRUCT_TRAITS_BEGIN(media::AudioBuffersState) |
25 IPC_STRUCT_TRAITS_MEMBER(pending_bytes) | 25 IPC_STRUCT_TRAITS_MEMBER(pending_bytes) |
26 IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes) | 26 IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes) |
27 IPC_STRUCT_TRAITS_END() | 27 IPC_STRUCT_TRAITS_END() |
28 | 28 |
29 // Messages sent from the browser to the renderer. | 29 // Messages sent from the browser to the renderer. |
30 | 30 |
31 // Tell the renderer process that an audio stream has been created. | 31 // Tell the renderer process that an audio stream has been created. |
32 // The renderer process is given a shared memory handle for the audio data | 32 // The renderer process is given a shared memory handle for the audio data |
33 // buffer it shares with the browser process. It is also given a SyncSocket that | 33 // buffer it shares with the browser process. It is also given a SyncSocket that |
34 // it uses to communicate with the browser process about the state of the | 34 // it uses to communicate with the browser process about the state of the |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted, | 82 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted, |
83 int /* stream id */, | 83 int /* stream id */, |
84 std::string /* device_id */) | 84 std::string /* device_id */) |
85 | 85 |
86 // Messages sent from the renderer to the browser. | 86 // Messages sent from the renderer to the browser. |
87 | 87 |
88 // Request that got sent to browser for creating an audio output stream | 88 // Request that got sent to browser for creating an audio output stream |
89 IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream, | 89 IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream, |
90 int /* stream_id */, | 90 int /* stream_id */, |
91 AudioParameters /* params */) | 91 media::AudioParameters /* params */) |
92 | 92 |
93 // Request that got sent to browser for creating an audio input stream | 93 // Request that got sent to browser for creating an audio input stream |
94 IPC_MESSAGE_CONTROL3(AudioInputHostMsg_CreateStream, | 94 IPC_MESSAGE_CONTROL3(AudioInputHostMsg_CreateStream, |
95 int /* stream_id */, | 95 int /* stream_id */, |
96 AudioParameters /* params */, | 96 media::AudioParameters /* params */, |
97 std::string /* device_id */) | 97 std::string /* device_id */) |
98 | 98 |
99 // Start buffering and play the audio stream specified by stream_id. | 99 // Start buffering and play the audio stream specified by stream_id. |
100 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream, | 100 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream, |
101 int /* stream_id */) | 101 int /* stream_id */) |
102 | 102 |
103 // Start recording the audio input stream specified by stream_id. | 103 // Start recording the audio input stream specified by stream_id. |
104 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_RecordStream, | 104 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_RecordStream, |
105 int /* stream_id */) | 105 int /* stream_id */) |
106 | 106 |
(...skipping 27 matching lines...) Expand all Loading... |
134 // Set audio volume of the input stream specified by stream_id. | 134 // Set audio volume of the input stream specified by stream_id. |
135 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 135 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
136 int /* stream_id */, | 136 int /* stream_id */, |
137 double /* volume */) | 137 double /* volume */) |
138 | 138 |
139 // Start the device referenced by the session_id for the input stream specified | 139 // Start the device referenced by the session_id for the input stream specified |
140 // by stream_id. | 140 // by stream_id. |
141 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, | 141 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, |
142 int /* stream_id */, | 142 int /* stream_id */, |
143 int /* session_id */) | 143 int /* session_id */) |
OLD | NEW |