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 "ipc/ipc_message_macros.h" | 15 #include "ipc/ipc_message_macros.h" |
16 #include "media/audio/audio_buffers_state.h" | 16 #include "media/audio/audio_buffers_state.h" |
17 #include "media/audio/audio_input_ipc.h" | 17 #include "media/audio/audio_input_ipc.h" |
18 #include "media/audio/audio_output_ipc.h" | 18 #include "media/audio/audio_output_ipc.h" |
19 #include "media/audio/audio_parameters.h" | 19 #include "media/audio/audio_parameters.h" |
20 | 20 |
21 #undef IPC_MESSAGE_EXPORT | 21 #undef IPC_MESSAGE_EXPORT |
22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
23 #define IPC_MESSAGE_START AudioMsgStart | 23 #define IPC_MESSAGE_START AudioMsgStart |
24 | 24 |
25 IPC_ENUM_TRAITS(media::AudioInputIPCDelegate::State) | 25 IPC_ENUM_TRAITS(media::AudioInputIPCDelegate::State) |
26 IPC_ENUM_TRAITS(media::AudioOutputIPCDelegate::State) | 26 IPC_ENUM_TRAITS(media::AudioOutputIPCDelegate::State) |
27 | 27 |
28 IPC_STRUCT_TRAITS_BEGIN(media::AudioBuffersState) | |
29 IPC_STRUCT_TRAITS_MEMBER(pending_bytes) | |
30 IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes) | |
31 IPC_STRUCT_TRAITS_END() | |
32 | |
33 // Messages sent from the browser to the renderer. | 28 // Messages sent from the browser to the renderer. |
34 | 29 |
35 // Tell the renderer process that an audio stream has been created. | 30 // Tell the renderer process that an audio stream has been created. |
36 // The renderer process is given a shared memory handle for the audio data | 31 // The renderer process is given a shared memory handle for the audio data |
37 // buffer it shares with the browser process. It is also given a SyncSocket that | 32 // buffer it shares with the browser process. It is also given a SyncSocket that |
38 // it uses to communicate with the browser process about the state of the | 33 // it uses to communicate with the browser process about the state of the |
39 // buffered audio data. | 34 // buffered audio data. |
40 #if defined(OS_WIN) | 35 #if defined(OS_WIN) |
41 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, | 36 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, |
42 int /* stream id */, | 37 int /* stream id */, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Set audio volume of the input stream specified by stream_id. | 129 // Set audio volume of the input stream specified by stream_id. |
135 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 130 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
136 int /* stream_id */, | 131 int /* stream_id */, |
137 double /* volume */) | 132 double /* volume */) |
138 | 133 |
139 // Start the device referenced by the session_id for the input stream specified | 134 // Start the device referenced by the session_id for the input stream specified |
140 // by stream_id. | 135 // by stream_id. |
141 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, | 136 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, |
142 int /* stream_id */, | 137 int /* stream_id */, |
143 int /* session_id */) | 138 int /* session_id */) |
OLD | NEW |