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 // AudioInputRendererHost serves audio related requests from audio capturer | 5 // AudioInputRendererHost serves audio related requests from audio capturer |
6 // which lives inside the render process and provide access to audio hardware. | 6 // which lives inside the render process and provide access to audio hardware. |
7 // | 7 // |
8 // Create stream sequence (AudioInputController = AIC): | 8 // Create stream sequence (AudioInputController = AIC): |
9 // | 9 // |
10 // AudioInputHostMsg_CreateStream -> OnCreateStream -> AIC::CreateLowLatency -> | 10 // AudioInputHostMsg_CreateStream -> OnCreateStream -> AIC::CreateLowLatency -> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // Methods called on IO thread ---------------------------------------------- | 133 // Methods called on IO thread ---------------------------------------------- |
134 | 134 |
135 // Start the audio input device with the session id. If the device | 135 // Start the audio input device with the session id. If the device |
136 // starts successfully, it will trigger OnDeviceStarted() callback. | 136 // starts successfully, it will trigger OnDeviceStarted() callback. |
137 void OnStartDevice(int stream_id, int session_id); | 137 void OnStartDevice(int stream_id, int session_id); |
138 | 138 |
139 // Audio related IPC message handlers. | 139 // Audio related IPC message handlers. |
140 // Creates an audio input stream with the specified format. If this call is | 140 // Creates an audio input stream with the specified format. If this call is |
141 // successful this object would keep an internal entry of the stream for the | 141 // successful this object would keep an internal entry of the stream for the |
142 // required properties. | 142 // required properties. |
143 void OnCreateStream(int stream_id, | 143 void OnCreateStream(int render_view_id, |
| 144 int stream_id, |
144 const media::AudioParameters& params, | 145 const media::AudioParameters& params, |
145 const std::string& device_id, | 146 const std::string& device_id, |
146 bool automatic_gain_control); | 147 bool automatic_gain_control); |
147 | 148 |
148 // Record the audio input stream referenced by |stream_id|. | 149 // Record the audio input stream referenced by |stream_id|. |
149 void OnRecordStream(int stream_id); | 150 void OnRecordStream(int stream_id); |
150 | 151 |
151 // Close the audio stream referenced by |stream_id|. | 152 // Close the audio stream referenced by |stream_id|. |
152 void OnCloseStream(int stream_id); | 153 void OnCloseStream(int stream_id); |
153 | 154 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 AudioEntryMap audio_entries_; | 208 AudioEntryMap audio_entries_; |
208 | 209 |
209 // A map of session IDs to audio session sources. | 210 // A map of session IDs to audio session sources. |
210 typedef std::map<int, int> SessionEntryMap; | 211 typedef std::map<int, int> SessionEntryMap; |
211 SessionEntryMap session_entries_; | 212 SessionEntryMap session_entries_; |
212 | 213 |
213 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); | 214 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); |
214 }; | 215 }; |
215 | 216 |
216 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ | 217 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ |
OLD | NEW |