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

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

Issue 9121062: Remove "high"-latency audio code path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more to delete! Created 8 years, 11 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
(...skipping 18 matching lines...) Expand all
29 IPC_STRUCT_TRAITS_MEMBER(format) 29 IPC_STRUCT_TRAITS_MEMBER(format)
30 IPC_STRUCT_TRAITS_MEMBER(channel_layout) 30 IPC_STRUCT_TRAITS_MEMBER(channel_layout)
31 IPC_STRUCT_TRAITS_MEMBER(sample_rate) 31 IPC_STRUCT_TRAITS_MEMBER(sample_rate)
32 IPC_STRUCT_TRAITS_MEMBER(bits_per_sample) 32 IPC_STRUCT_TRAITS_MEMBER(bits_per_sample)
33 IPC_STRUCT_TRAITS_MEMBER(samples_per_packet) 33 IPC_STRUCT_TRAITS_MEMBER(samples_per_packet)
34 IPC_STRUCT_TRAITS_MEMBER(channels) 34 IPC_STRUCT_TRAITS_MEMBER(channels)
35 IPC_STRUCT_TRAITS_END() 35 IPC_STRUCT_TRAITS_END()
36 36
37 // Messages sent from the browser to the renderer. 37 // Messages sent from the browser to the renderer.
38 38
39 // Sent by AudioRendererHost to renderer to request an audio packet.
40 IPC_MESSAGE_CONTROL2(AudioMsg_RequestPacket,
41 int /* stream id */,
42 AudioBuffersState)
43
44 // Tell the renderer process that the audio stream has been created, renderer
45 // process would be given a ShareMemoryHandle that it should write to from
46 // then on.
47 IPC_MESSAGE_CONTROL3(AudioMsg_NotifyStreamCreated,
48 int /* stream id */,
49 base::SharedMemoryHandle /* handle */,
50 uint32 /* length */)
51
52 // Tell the renderer process that a low latency audio stream has been created, 39 // Tell the renderer process that a low latency audio stream has been created,
53 // renderer process would be given a SyncSocket that it should write to from 40 // renderer process would be given a SyncSocket that it should write to from
54 // then on. 41 // then on.
55 #if defined(OS_WIN) 42 #if defined(OS_WIN)
56 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyLowLatencyStreamCreated, 43 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyLowLatencyStreamCreated,
henrika (OOO until Aug 14) 2012/01/29 20:54:00 Why not rename this to _NotifyStreamCreated and re
vrk (LEFT CHROMIUM) 2012/01/31 23:53:08 Ah, no reason! I was just going to do the rename i
henrika (OOO until Aug 14) 2012/02/01 13:11:29 The SpeechInput API are still using the "old" path
vrk (LEFT CHROMIUM) 2012/02/02 21:05:41 Awesome, sounds great! Will do if I run into anyth
57 int /* stream id */, 44 int /* stream id */,
58 base::SharedMemoryHandle /* handle */, 45 base::SharedMemoryHandle /* handle */,
59 base::SyncSocket::Handle /* socket handle */, 46 base::SyncSocket::Handle /* socket handle */,
60 uint32 /* length */) 47 uint32 /* length */)
61 #else 48 #else
62 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyLowLatencyStreamCreated, 49 IPC_MESSAGE_CONTROL4(AudioMsg_NotifyLowLatencyStreamCreated,
63 int /* stream id */, 50 int /* stream id */,
64 base::SharedMemoryHandle /* handle */, 51 base::SharedMemoryHandle /* handle */,
65 base::FileDescriptor /* socket handle */, 52 base::FileDescriptor /* socket handle */,
66 uint32 /* length */) 53 uint32 /* length */)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 int /* stream id */, 89 int /* stream id */,
103 double /* volume */) 90 double /* volume */)
104 91
105 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted, 92 IPC_MESSAGE_CONTROL2(AudioInputMsg_NotifyDeviceStarted,
106 int /* stream id */, 93 int /* stream id */,
107 std::string /* device_id */) 94 std::string /* device_id */)
108 95
109 // Messages sent from the renderer to the browser. 96 // Messages sent from the renderer to the browser.
110 97
111 // Request that got sent to browser for creating an audio output stream 98 // Request that got sent to browser for creating an audio output stream
112 IPC_MESSAGE_CONTROL3(AudioHostMsg_CreateStream, 99 IPC_MESSAGE_CONTROL2(AudioHostMsg_CreateStream,
113 int /* stream_id */, 100 int /* stream_id */,
114 AudioParameters /* params */, 101 AudioParameters /* params */)
115 bool /* low-latency */)
116 102
117 // Request that got sent to browser for creating an audio input stream 103 // Request that got sent to browser for creating an audio input stream
118 IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream, 104 IPC_MESSAGE_CONTROL4(AudioInputHostMsg_CreateStream,
119 int /* stream_id */, 105 int /* stream_id */,
120 AudioParameters /* params */, 106 AudioParameters /* params */,
121 bool /* low-latency */, 107 bool /* low-latency */,
122 std::string /* device_id */) 108 std::string /* device_id */)
123 109
124 // Tell the browser the audio buffer prepared for stream (stream_id) is
125 // filled and is ready to be consumed.
126 IPC_MESSAGE_CONTROL2(AudioHostMsg_NotifyPacketReady,
127 int /* stream_id */,
128 uint32 /* packet size */)
129
130 // Start buffering and play the audio stream specified by stream_id. 110 // Start buffering and play the audio stream specified by stream_id.
131 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream, 111 IPC_MESSAGE_CONTROL1(AudioHostMsg_PlayStream,
132 int /* stream_id */) 112 int /* stream_id */)
133 113
134 // Start recording the audio input stream specified by stream_id. 114 // Start recording the audio input stream specified by stream_id.
135 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_RecordStream, 115 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_RecordStream,
136 int /* stream_id */) 116 int /* stream_id */)
137 117
138 // Pause the audio stream specified by stream_id. 118 // Pause the audio stream specified by stream_id.
139 IPC_MESSAGE_CONTROL1(AudioHostMsg_PauseStream, 119 IPC_MESSAGE_CONTROL1(AudioHostMsg_PauseStream,
140 int /* stream_id */) 120 int /* stream_id */)
141 121
142 // Discard all buffered audio data for the specified audio stream. 122 // Discard all buffered audio data for the specified audio stream.
143 IPC_MESSAGE_CONTROL1(AudioHostMsg_FlushStream, 123 IPC_MESSAGE_CONTROL1(AudioHostMsg_FlushStream,
144 int /* stream_id */) 124 int /* stream_id */)
145 125
146 // Close an audio stream specified by stream_id. 126 // Close an audio stream specified by stream_id.
147 IPC_MESSAGE_CONTROL1(AudioHostMsg_CloseStream, 127 IPC_MESSAGE_CONTROL1(AudioHostMsg_CloseStream,
148 int /* stream_id */) 128 int /* stream_id */)
149 129
150 // Close an audio input stream specified by stream_id. 130 // Close an audio input stream specified by stream_id.
151 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_CloseStream, 131 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_CloseStream,
152 int /* stream_id */) 132 int /* stream_id */)
153 133
154 // Get audio volume of the stream specified by stream_id.
155 IPC_MESSAGE_CONTROL1(AudioHostMsg_GetVolume,
156 int /* stream_id */)
157
158 // Get audio volume of the input stream specified by 134 // Get audio volume of the input stream specified by
159 // (render_view_id, stream_id). 135 // (render_view_id, stream_id).
160 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_GetVolume, 136 IPC_MESSAGE_CONTROL1(AudioInputHostMsg_GetVolume,
161 int /* stream_id */) 137 int /* stream_id */)
162 138
163 // Set audio volume of the stream specified by stream_id. 139 // Set audio volume of the stream specified by stream_id.
164 // TODO(hclam): change this to vector if we have channel numbers other than 2. 140 // TODO(hclam): change this to vector if we have channel numbers other than 2.
165 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume, 141 IPC_MESSAGE_CONTROL2(AudioHostMsg_SetVolume,
166 int /* stream_id */, 142 int /* stream_id */,
167 double /* volume */) 143 double /* volume */)
168 144
169 // Set audio volume of the input stream specified by stream_id. 145 // Set audio volume of the input stream specified by stream_id.
170 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume, 146 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_SetVolume,
171 int /* stream_id */, 147 int /* stream_id */,
172 double /* volume */) 148 double /* volume */)
173 149
174 // Start the device referenced by the session_id for the input stream specified 150 // Start the device referenced by the session_id for the input stream specified
175 // by stream_id. 151 // by stream_id.
176 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice, 152 IPC_MESSAGE_CONTROL2(AudioInputHostMsg_StartDevice,
177 int /* stream_id */, 153 int /* stream_id */,
178 int /* session_id */) 154 int /* session_id */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698