OLD | NEW |
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 // 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 // OnCreateStream() request is only available in the low latency mode. It will | 8 // OnCreateStream() request is only available in the low latency mode. It will |
9 // creates a shared memory, a SyncWriter and a AudioInputController for the | 9 // creates a shared memory, a SyncWriter and a AudioInputController for the |
10 // input stream. | 10 // input stream. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 virtual void OnData(media::AudioInputController* controller, | 120 virtual void OnData(media::AudioInputController* controller, |
121 const uint8* data, | 121 const uint8* data, |
122 uint32 size); | 122 uint32 size); |
123 | 123 |
124 // media_stream::AudioInputDeviceManagerEventHandler implementation. | 124 // media_stream::AudioInputDeviceManagerEventHandler implementation. |
125 virtual void OnDeviceStarted(int session_id, int index); | 125 virtual void OnDeviceStarted(int session_id, int index); |
126 virtual void OnDeviceStopped(int session_id); | 126 virtual void OnDeviceStopped(int session_id); |
127 | 127 |
128 private: | 128 private: |
129 // TODO(henrika): extend test suite (compare AudioRenderHost) | 129 // TODO(henrika): extend test suite (compare AudioRenderHost) |
130 friend class BrowserThread; | 130 friend class content::BrowserThread; |
131 friend class DeleteTask<AudioInputRendererHost>; | 131 friend class DeleteTask<AudioInputRendererHost>; |
132 | 132 |
133 virtual ~AudioInputRendererHost(); | 133 virtual ~AudioInputRendererHost(); |
134 | 134 |
135 // Methods called on IO thread ---------------------------------------------- | 135 // Methods called on IO thread ---------------------------------------------- |
136 | 136 |
137 // Start the audio input device with the session id. If the device | 137 // Start the audio input device with the session id. If the device |
138 // starts successfully, it will trigger OnDeviceStarted() callback. | 138 // starts successfully, it will trigger OnDeviceStarted() callback. |
139 void OnStartDevice(int stream_id, int session_id); | 139 void OnStartDevice(int stream_id, int session_id); |
140 | 140 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 AudioEntryMap audio_entries_; | 212 AudioEntryMap audio_entries_; |
213 | 213 |
214 // A map of session IDs to audio session sources. | 214 // A map of session IDs to audio session sources. |
215 typedef std::map<int, int> SessionEntryMap; | 215 typedef std::map<int, int> SessionEntryMap; |
216 SessionEntryMap session_entries_; | 216 SessionEntryMap session_entries_; |
217 | 217 |
218 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); | 218 DISALLOW_COPY_AND_ASSIGN(AudioInputRendererHost); |
219 }; | 219 }; |
220 | 220 |
221 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ | 221 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_INPUT_RENDERER_HOST_H_ |
OLD | NEW |