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