| 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/memory/shared_memory.h" | 9 #include "base/memory/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/media_param_traits.h" | 12 #include "content/common/media/media_param_traits.h" |
| 13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 14 #include "media/audio/audio_input_ipc.h" | 14 #include "media/audio/audio_input_ipc.h" |
| 15 #include "media/audio/audio_output_ipc.h" | 15 #include "media/audio/audio_output_ipc.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_MAX_VALUE(media::AudioInputIPCDelegate::State, | 22 IPC_ENUM_TRAITS_MAX_VALUE(media::AudioInputIPCDelegateState, |
| 23 media::AudioInputIPCDelegate::kStateLast) | 23 media::AUDIO_INPUT_IPC_DELEGATE_STATE_LAST) |
| 24 | 24 |
| 25 IPC_ENUM_TRAITS_MAX_VALUE(media::AudioOutputIPCDelegate::State, | 25 IPC_ENUM_TRAITS_MAX_VALUE(media::AudioOutputIPCDelegateState, |
| 26 media::AudioOutputIPCDelegate::kStateLast) | 26 media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_LAST) |
| 27 | 27 |
| 28 IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config) | 28 IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config) |
| 29 IPC_STRUCT_MEMBER(media::AudioParameters, params) | 29 IPC_STRUCT_MEMBER(media::AudioParameters, params) |
| 30 IPC_STRUCT_MEMBER(bool, automatic_gain_control) | 30 IPC_STRUCT_MEMBER(bool, automatic_gain_control) |
| 31 IPC_STRUCT_MEMBER(uint32, shared_memory_count) | 31 IPC_STRUCT_MEMBER(uint32, shared_memory_count) |
| 32 IPC_STRUCT_END() | 32 IPC_STRUCT_END() |
| 33 | 33 |
| 34 // Messages sent from the browser to the renderer. | 34 // Messages sent from the browser to the renderer. |
| 35 | 35 |
| 36 // Tell the renderer process that an audio stream has been created. | 36 // Tell the renderer process that an audio stream has been created. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 53 int /* stream id */, | 53 int /* stream id */, |
| 54 base::SharedMemoryHandle /* handle */, | 54 base::SharedMemoryHandle /* handle */, |
| 55 base::SyncSocket::TransitDescriptor /* socket descriptor */, | 55 base::SyncSocket::TransitDescriptor /* socket descriptor */, |
| 56 uint32 /* length */, | 56 uint32 /* length */, |
| 57 uint32 /* segment count */) | 57 uint32 /* segment count */) |
| 58 | 58 |
| 59 // Notification message sent from AudioRendererHost to renderer for state | 59 // Notification message sent from AudioRendererHost to renderer for state |
| 60 // update after the renderer has requested a Create/Start/Close. | 60 // update after the renderer has requested a Create/Start/Close. |
| 61 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamStateChanged, | 61 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamStateChanged, |
| 62 int /* stream id */, | 62 int /* stream id */, |
| 63 media::AudioOutputIPCDelegate::State /* new state */) | 63 media::AudioOutputIPCDelegateState /* new state */) |
| 64 | 64 |
| 65 // Notification message sent from browser to renderer for state update. | 65 // Notification message sent from browser to renderer for state update. |
| 66 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, | 66 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, |
| 67 int /* stream id */, | 67 int /* stream id */, |
| 68 media::AudioInputIPCDelegate::State /* new state */) | 68 media::AudioInputIPCDelegateState /* new state */) |
| 69 | 69 |
| 70 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, | 70 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, |
| 71 int /* stream id */, | 71 int /* stream id */, |
| 72 double /* volume */) | 72 double /* volume */) |
| 73 | 73 |
| 74 // Messages sent from the renderer to the browser. | 74 // Messages sent from the renderer to the browser. |
| 75 | 75 |
| 76 // Request that is sent to the browser for creating an audio output stream. | 76 // Request that is sent to the browser for creating an audio output stream. |
| 77 // |render_frame_id| is the routing ID for the RenderFrame producing the audio | 77 // |render_frame_id| is the routing ID for the RenderFrame producing the audio |
| 78 // data. | 78 // data. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Set audio volume of the stream specified by stream_id. | 114 // Set audio volume of the stream specified by stream_id. |
| 115 // TODO(hclam): change this to vector if we have channel numbers other than 2. | 115 // TODO(hclam): change this to vector if we have channel numbers other than 2. |
| 116 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, | 116 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, |
| 117 int /* stream_id */, | 117 int /* stream_id */, |
| 118 double /* volume */) | 118 double /* volume */) |
| 119 | 119 |
| 120 // Set audio volume of the input stream specified by stream_id. | 120 // Set audio volume of the input stream specified by stream_id. |
| 121 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, | 121 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, |
| 122 int /* stream_id */, | 122 int /* stream_id */, |
| 123 double /* volume */) | 123 double /* volume */) |
| OLD | NEW |