Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: content/common/media/audio_messages.h

Issue 9655018: Make AudioParameters a class instead of a struct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix copyright years Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/DEPS ('k') | content/common/media/audio_param_traits.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/shared_memory.h" 9 #include "base/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/audio_param_traits.h"
12 #include "content/common/media/audio_stream_state.h" 13 #include "content/common/media/audio_stream_state.h"
13 #include "ipc/ipc_message_macros.h" 14 #include "ipc/ipc_message_macros.h"
14 #include "media/audio/audio_buffers_state.h" 15 #include "media/audio/audio_buffers_state.h"
15 #include "media/audio/audio_parameters.h" 16 #include "media/audio/audio_parameters.h"
16 17
17 #undef IPC_MESSAGE_EXPORT 18 #undef IPC_MESSAGE_EXPORT
18 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 19 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
19 #define IPC_MESSAGE_START AudioMsgStart 20 #define IPC_MESSAGE_START AudioMsgStart
20 21
21 IPC_ENUM_TRAITS(AudioStreamState) 22 IPC_ENUM_TRAITS(AudioStreamState)
22 IPC_ENUM_TRAITS(AudioParameters::Format)
23 IPC_ENUM_TRAITS(ChannelLayout)
24 23
25 IPC_STRUCT_TRAITS_BEGIN(AudioBuffersState) 24 IPC_STRUCT_TRAITS_BEGIN(AudioBuffersState)
26 IPC_STRUCT_TRAITS_MEMBER(pending_bytes) 25 IPC_STRUCT_TRAITS_MEMBER(pending_bytes)
27 IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes) 26 IPC_STRUCT_TRAITS_MEMBER(hardware_delay_bytes)
28 IPC_STRUCT_TRAITS_END() 27 IPC_STRUCT_TRAITS_END()
29 28
30 IPC_STRUCT_TRAITS_BEGIN(AudioParameters)
31 IPC_STRUCT_TRAITS_MEMBER(format)
32 IPC_STRUCT_TRAITS_MEMBER(channel_layout)
33 IPC_STRUCT_TRAITS_MEMBER(sample_rate)
34 IPC_STRUCT_TRAITS_MEMBER(bits_per_sample)
35 IPC_STRUCT_TRAITS_MEMBER(samples_per_packet)
36 IPC_STRUCT_TRAITS_MEMBER(channels)
37 IPC_STRUCT_TRAITS_END()
38
39 // Messages sent from the browser to the renderer. 29 // Messages sent from the browser to the renderer.
40 30
41 // Tell the renderer process that an audio stream has been created. 31 // Tell the renderer process that an audio stream has been created.
42 // The renderer process is given a shared memory handle for the audio data 32 // The renderer process is given a shared memory handle for the audio data
43 // buffer it shares with the browser process. It is also given a SyncSocket that 33 // buffer it shares with the browser process. It is also given a SyncSocket that
44 // it uses to communicate with the browser process about the state of the 34 // it uses to communicate with the browser process about the state of the
45 // buffered audio data. 35 // buffered audio data.
46 #if defined(OS_WIN) 36 #if defined(OS_WIN)
47 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated, 37 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyStreamCreated,
48 int /* stream id */, 38 int /* stream id */,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Set audio volume of the input stream specified by stream_id. 134 // Set audio volume of the input stream specified by stream_id.
145 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, 135 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume,
146 int /* stream_id */, 136 int /* stream_id */,
147 double /* volume */) 137 double /* volume */)
148 138
149 // 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
150 // by stream_id. 140 // by stream_id.
151 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, 141 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice,
152 int /* stream_id */, 142 int /* stream_id */,
153 int /* session_id */) 143 int /* session_id */)
OLDNEW
« no previous file with comments | « content/common/DEPS ('k') | content/common/media/audio_param_traits.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698