OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
3 // LICENSE file. | 3 // LICENSE file. |
4 // | 4 // |
5 // Audio rendering unit utilizing audio output stream provided by browser | 5 // Audio rendering unit utilizing audio output stream provided by browser |
6 // process through IPC. | 6 // process through IPC. |
7 // | 7 // |
8 // Relationship of classes. | 8 // Relationship of classes. |
9 // | 9 // |
10 // AudioRendererHost AudioRendererImpl | 10 // AudioRendererHost AudioRendererImpl |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 | 176 |
177 // Memory shared by the browser process for audio buffer. | 177 // Memory shared by the browser process for audio buffer. |
178 scoped_ptr<base::SharedMemory> shared_memory_; | 178 scoped_ptr<base::SharedMemory> shared_memory_; |
179 size_t shared_memory_size_; | 179 size_t shared_memory_size_; |
180 | 180 |
181 // Message loop for the IO thread. | 181 // Message loop for the IO thread. |
182 MessageLoop* io_loop_; | 182 MessageLoop* io_loop_; |
183 | 183 |
184 // Protects: | 184 // Protects: |
185 // - |stopped_| | 185 // - |stopped_| |
186 // - |playback_rate_| | |
187 // - |pending_request_| | 186 // - |pending_request_| |
188 // - |request_timestamp_| | 187 // - |request_timestamp_| |
189 // - |request_delay_| | 188 // - |request_delay_| |
190 Lock lock_; | 189 Lock lock_; |
191 | 190 |
192 // A flag that indicates this filter is called to stop. | 191 // A flag that indicates this filter is called to stop. |
193 bool stopped_; | 192 bool stopped_; |
194 | 193 |
195 // Keeps the current playback rate. | |
196 float playback_rate_; | |
197 | |
198 // A flag that indicates an outstanding packet request. | 194 // A flag that indicates an outstanding packet request. |
199 bool pending_request_; | 195 bool pending_request_; |
200 | 196 |
201 // The time when a request is made. | 197 // The time when a request is made. |
202 base::Time request_timestamp_; | 198 base::Time request_timestamp_; |
203 | 199 |
204 // The delay for the requested packet to be played. | 200 // The delay for the requested packet to be played. |
205 base::TimeDelta request_delay_; | 201 base::TimeDelta request_delay_; |
206 | 202 |
207 // State variables for prerolling. | 203 // State variables for prerolling. |
208 bool prerolling_; | 204 bool prerolling_; |
209 | 205 |
210 // Remaining bytes for prerolling to complete. | 206 // Remaining bytes for prerolling to complete. |
211 size_t preroll_bytes_; | 207 size_t preroll_bytes_; |
212 | 208 |
213 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); | 209 DISALLOW_COPY_AND_ASSIGN(AudioRendererImpl); |
214 }; | 210 }; |
215 | 211 |
216 #endif // CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ | 212 #endif // CHROME_RENDERER_MEDIA_AUDIO_RENDERER_IMPL_H_ |
OLD | NEW |