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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // Send an error message to the renderer. | 168 // Send an error message to the renderer. |
169 void SendErrorMessage(int stream_id); | 169 void SendErrorMessage(int stream_id); |
170 | 170 |
171 // Delete all audio entry and all audio streams | 171 // Delete all audio entry and all audio streams |
172 void DeleteEntries(); | 172 void DeleteEntries(); |
173 | 173 |
174 // Closes the stream. The stream is then deleted in DeleteEntry() after it | 174 // Closes the stream. The stream is then deleted in DeleteEntry() after it |
175 // is closed. | 175 // is closed. |
176 void CloseAndDeleteStream(AudioEntry* entry); | 176 void CloseAndDeleteStream(AudioEntry* entry); |
177 | 177 |
178 // Called on the audio thread after the audio input stream is closed. | |
179 void OnStreamClosed(AudioEntry* entry); | |
180 | |
181 // Delete an audio entry and close the related audio stream. | 178 // Delete an audio entry and close the related audio stream. |
182 void DeleteEntry(AudioEntry* entry); | 179 void DeleteEntry(AudioEntry* entry); |
183 | 180 |
184 // Delete audio entry and close the related audio input stream. | 181 // Delete audio entry and close the related audio input stream. |
185 void DeleteEntryOnError(AudioEntry* entry); | 182 void DeleteEntryOnError(AudioEntry* entry); |
186 | 183 |
187 // Stop the device and delete its audio session entry. | 184 // Stop the device and delete its audio session entry. |
188 void StopAndDeleteDevice(int stream_id); | 185 void StopAndDeleteDevice(int stream_id); |
189 | 186 |
190 // A helper method to look up a AudioEntry identified by |stream_id|. | 187 // A helper method to look up a AudioEntry identified by |stream_id|. |
(...skipping 18 matching lines...) Expand all Loading... |
209 AudioEntryMap audio_entries_; | 206 AudioEntryMap audio_entries_; |
210 | 207 |
211 // A map of session IDs to audio session sources. | 208 // A map of session IDs to audio session sources. |
212 typedef std::map<int, int> SessionEntryMap; | 209 typedef std::map<int, int> SessionEntryMap; |
213 SessionEntryMap session_entries_; | 210 SessionEntryMap session_entries_; |
214 | 211 |
215 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); | 212 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); |
216 }; | 213 }; |
217 | 214 |
218 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ | 215 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ |
OLD | NEW |