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" |
11 #include "base/shared_memory.h" | 11 #include "base/shared_memory.h" |
12 #include "base/sync_socket.h" | 12 #include "base/sync_socket.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/common/media/audio_param_traits.h" | 14 #include "content/common/media/audio_param_traits.h" |
15 #include "content/common/media/audio_stream_state.h" | |
16 #include "ipc/ipc_message_macros.h" | 15 #include "ipc/ipc_message_macros.h" |
17 #include "media/audio/audio_buffers_state.h" | 16 #include "media/audio/audio_buffers_state.h" |
| 17 #include "media/audio/audio_input_ipc.h" |
| 18 #include "media/audio/audio_output_ipc.h" |
18 #include "media/audio/audio_parameters.h" | 19 #include "media/audio/audio_parameters.h" |
19 | 20 |
20 #undef IPC_MESSAGE_EXPORT | 21 #undef IPC_MESSAGE_EXPORT |
21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
22 #define IPC_MESSAGE_START AudioMsgStart | 23 #define IPC_MESSAGE_START AudioMsgStart |
23 | 24 |
24 IPC_ENUM_TRAITS(AudioStreamState) | 25 IPC_ENUM_TRAITS(media::AudioInputIPCDelegate::State) |
| 26 IPC_ENUM_TRAITS(media::AudioOutputIPCDelegate::State) |
25 | 27 |
26 IPC_STRUCT_TRAITS_BEGIN(media::AudioBuffersState) | 28 IPC_STRUCT_TRAITS_BEGIN(media::AudioBuffersState) |
27 IPC_STRUCT_TRAITS_MEMBER(pending_bytes) | 29 IPC_STRUCT_TRAITS_MEMBER(pending_bytes) |
28 IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes) | 30 IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes) |
29 IPC_STRUCT_TRAITS_END() | 31 IPC_STRUCT_TRAITS_END() |
30 | 32 |
31 // Messages sent from the browser to the renderer. | 33 // Messages sent from the browser to the renderer. |
32 | 34 |
33 // Tell the renderer process that an audio stream has been created. | 35 // Tell the renderer process that an audio stream has been created. |
34 // The renderer process is given a shared memory handle for the audio data | 36 // The renderer process is given a shared memory handle for the audio data |
(...skipping 28 matching lines...) Expand all Loading... |
63 int /* stream id */, | 65 int /* stream id */, |
64 base::SharedMemoryHandle /* handle */, | 66 base::SharedMemoryHandle /* handle */, |
65 base::FileDescriptor /* socket handle */, | 67 base::FileDescriptor /* socket handle */, |
66 uint32 /* length */) | 68 uint32 /* length */) |
67 #endif | 69 #endif |
68 | 70 |
69 // Notification message sent from AudioRendererHost to renderer for state | 71 // Notification message sent from AudioRendererHost to renderer for state |
70 // update after the renderer has requested a Create/Start/Close. | 72 // update after the renderer has requested a Create/Start/Close. |
71 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamStateChanged, | 73 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamStateChanged, |
72 int /* stream id */, | 74 int /* stream id */, |
73 AudioStreamState /* new state */) | 75 media::AudioOutputIPCDelegate::State /* new state */) |
74 | 76 |
75 // Notification message sent from browser to renderer for state update. | 77 // Notification message sent from browser to renderer for state update. |
76 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, | 78 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, |
77 int /* stream id */, | 79 int /* stream id */, |
78 AudioStreamState /* new state */) | 80 media::AudioInputIPCDelegate::State /* new state */) |
79 | 81 |
80 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, | 82 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, |
81 int /* stream id */, | 83 int /* stream id */, |
82 double /* volume */) | 84 double /* volume */) |
83 | 85 |
84 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted, | 86 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted, |
85 int /* stream id */, | 87 int /* stream id */, |
86 std::string /* device_id */) | 88 std::string /* device_id */) |
87 | 89 |
88 // Messages sent from the renderer to the browser. | 90 // Messages sent from the renderer to the browser. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // Set audio volume of the input stream specified by stream_id. | 134 // Set audio volume of the input stream specified by stream_id. |
133 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 135 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
134 int /* stream_id */, | 136 int /* stream_id */, |
135 double /* volume */) | 137 double /* volume */) |
136 | 138 |
137 // 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 |
138 // by stream_id. | 140 // by stream_id. |
139 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, | 141 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, |
140 int /* stream_id */, | 142 int /* stream_id */, |
141 int /* session_id */) | 143 int /* session_id */) |
OLD | NEW |