| 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/memory/shared_memory.h" | 11 #include "base/memory/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/media_param_traits.h" | 14 #include "content/common/media/media_param_traits.h" |
| 15 #include "ipc/ipc_message_macros.h" | 15 #include "ipc/ipc_message_macros.h" |
| 16 #include "media/audio/audio_input_ipc.h" | 16 #include "media/audio/audio_input_ipc.h" |
| 17 #include "media/audio/audio_output_ipc.h" | 17 #include "media/audio/audio_output_ipc.h" |
| 18 #include "media/audio/audio_parameters.h" | 18 #include "media/audio/audio_parameters.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.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_MAX_VALUE(media::AudioInputIPCDelegate::State, | 25 IPC_ENUM_TRAITS_MAX_VALUE(media::AudioInputIPCDelegateState, |
| 26 media::AudioInputIPCDelegate::kStateLast) | 26 media::AUDIO_INPUT_IPC_DELEGATE_STATE_LAST) |
| 27 | 27 |
| 28 IPC_ENUM_TRAITS_MAX_VALUE(media::AudioOutputIPCDelegate::State, | 28 IPC_ENUM_TRAITS_MAX_VALUE(media::AudioOutputIPCDelegateState, |
| 29 media::AudioOutputIPCDelegate::kStateLast) | 29 media::AUDIO_OUTPUT_IPC_DELEGATE_STATE_LAST) |
| 30 | 30 |
| 31 IPC_ENUM_TRAITS_MAX_VALUE(media::SwitchOutputDeviceResult, | 31 IPC_ENUM_TRAITS_MAX_VALUE(media::SwitchOutputDeviceResult, |
| 32 media::SWITCH_OUTPUT_DEVICE_RESULT_LAST) | 32 media::SWITCH_OUTPUT_DEVICE_RESULT_LAST) |
| 33 | 33 |
| 34 IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config) | 34 IPC_STRUCT_BEGIN(AudioInputHostMsg_CreateStream_Config) |
| 35 IPC_STRUCT_MEMBER(media::AudioParameters, params) | 35 IPC_STRUCT_MEMBER(media::AudioParameters, params) |
| 36 IPC_STRUCT_MEMBER(bool, automatic_gain_control) | 36 IPC_STRUCT_MEMBER(bool, automatic_gain_control) |
| 37 IPC_STRUCT_MEMBER(uint32, shared_memory_count) | 37 IPC_STRUCT_MEMBER(uint32, shared_memory_count) |
| 38 IPC_STRUCT_END() | 38 IPC_STRUCT_END() |
| 39 | 39 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 59 int /* stream id */, | 59 int /* stream id */, |
| 60 base::SharedMemoryHandle /* handle */, | 60 base::SharedMemoryHandle /* handle */, |
| 61 base::SyncSocket::TransitDescriptor /* socket descriptor */, | 61 base::SyncSocket::TransitDescriptor /* socket descriptor */, |
| 62 uint32 /* length */, | 62 uint32 /* length */, |
| 63 uint32 /* segment count */) | 63 uint32 /* segment count */) |
| 64 | 64 |
| 65 // Notification message sent from AudioRendererHost to renderer for state | 65 // Notification message sent from AudioRendererHost to renderer for state |
| 66 // update after the renderer has requested a Create/Start/Close. | 66 // update after the renderer has requested a Create/Start/Close. |
| 67 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamStateChanged, | 67 IPC_MESSAGE_CONTROL2(AudioMsg_NotifyStreamStateChanged, |
| 68 int /* stream id */, | 68 int /* stream id */, |
| 69 media::AudioOutputIPCDelegate::State /* new state */) | 69 media::AudioOutputIPCDelegateState /* new state */) |
| 70 | 70 |
| 71 // Notification message sent from browser to renderer for state update. | 71 // Notification message sent from browser to renderer for state update. |
| 72 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, | 72 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamStateChanged, |
| 73 int /* stream id */, | 73 int /* stream id */, |
| 74 media::AudioInputIPCDelegate::State /* new state */) | 74 media::AudioInputIPCDelegateState /* new state */) |
| 75 | 75 |
| 76 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, | 76 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyStreamVolume, |
| 77 int /* stream id */, | 77 int /* stream id */, |
| 78 double /* volume */) | 78 double /* volume */) |
| 79 | 79 |
| 80 // Notification message sent from AudioRendererHost to renderer for state | 80 // Notification message sent from AudioRendererHost to renderer for state |
| 81 // update after the renderer has requested a SwitchOutputDevice. | 81 // update after the renderer has requested a SwitchOutputDevice. |
| 82 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyOutputDeviceSwitched, | 82 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyOutputDeviceSwitched, |
| 83 int /* stream id */, | 83 int /* stream id */, |
| 84 int /* request id */, | 84 int /* request id */, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 int /* stream_id */, | 135 int /* stream_id */, |
| 136 double /* volume */) | 136 double /* volume */) |
| 137 | 137 |
| 138 // Switch the output device of the stream specified by stream_id. | 138 // Switch the output device of the stream specified by stream_id. |
| 139 IPC_MESSAGE_CONTROL5(AudioHostMsg_SwitchOutputDevice, | 139 IPC_MESSAGE_CONTROL5(AudioHostMsg_SwitchOutputDevice, |
| 140 int /* stream_id */, | 140 int /* stream_id */, |
| 141 int /* render_frame_id */, | 141 int /* render_frame_id */, |
| 142 std::string /* device_id */, | 142 std::string /* device_id */, |
| 143 GURL /* security_origin */, | 143 GURL /* security_origin */, |
| 144 int /* request_id */) | 144 int /* request_id */) |
| OLD | NEW |