OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_ | 5 #ifndef MEDIA_RENDERERS_RENDERER_IMPL_H_ |
6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_ | 6 #define MEDIA_RENDERERS_RENDERER_IMPL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 // Used to defer underflow for video when audio is present. | 188 // Used to defer underflow for video when audio is present. |
189 base::CancelableClosure deferred_video_underflow_cb_; | 189 base::CancelableClosure deferred_video_underflow_cb_; |
190 | 190 |
191 // Used to defer underflow for audio when restarting audio playback. | 191 // Used to defer underflow for audio when restarting audio playback. |
192 base::CancelableClosure deferred_audio_restart_underflow_cb_; | 192 base::CancelableClosure deferred_audio_restart_underflow_cb_; |
193 | 193 |
194 // The amount of time to wait before declaring underflow if the video renderer | 194 // The amount of time to wait before declaring underflow if the video renderer |
195 // runs out of data but the audio renderer still has enough. | 195 // runs out of data but the audio renderer still has enough. |
196 base::TimeDelta video_underflow_threshold_; | 196 base::TimeDelta video_underflow_threshold_; |
197 | 197 |
| 198 // Timestamps when the playback is initiated after play or seek that's set at |
| 199 // StartPlayingFrom(). Used to calculate and report the preroll time from |
| 200 // StartPlayingFrom() to HAVE_ENOUGH_DATA. |
| 201 base::TimeTicks audio_preroll_start_time_; |
| 202 base::TimeTicks video_preroll_start_time_; |
| 203 |
198 bool restarting_audio_ = false; | 204 bool restarting_audio_ = false; |
199 bool restarting_video_ = false; | 205 bool restarting_video_ = false; |
200 | 206 |
201 base::WeakPtr<RendererImpl> weak_this_; | 207 base::WeakPtr<RendererImpl> weak_this_; |
202 base::WeakPtrFactory<RendererImpl> weak_factory_; | 208 base::WeakPtrFactory<RendererImpl> weak_factory_; |
203 | 209 |
204 DISALLOW_COPY_AND_ASSIGN(RendererImpl); | 210 DISALLOW_COPY_AND_ASSIGN(RendererImpl); |
205 }; | 211 }; |
206 | 212 |
207 } // namespace media | 213 } // namespace media |
208 | 214 |
209 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ | 215 #endif // MEDIA_RENDERERS_RENDERER_IMPL_H_ |
OLD | NEW |