OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. | 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. |
6 // It contains Pipeline which is the actual media player pipeline, it glues | 6 // It contains Pipeline which is the actual media player pipeline, it glues |
7 // the media player pipeline, data source, audio renderer and renderer. | 7 // the media player pipeline, data source, audio renderer and renderer. |
8 // Pipeline would creates multiple threads and access some public methods | 8 // Pipeline would creates multiple threads and access some public methods |
9 // of this class, so we need to be extra careful about concurrent access of | 9 // of this class, so we need to be extra careful about concurrent access of |
10 // methods and members. | 10 // methods and members. |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 // all clients to manage the pause+playback rate externally, but is that | 288 // all clients to manage the pause+playback rate externally, but is that |
289 // really a bad thing? | 289 // really a bad thing? |
290 // | 290 // |
291 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want | 291 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want |
292 // to hang the render thread during pause(), we record the time at the same | 292 // to hang the render thread during pause(), we record the time at the same |
293 // time we pause and then return that value in currentTime(). Otherwise our | 293 // time we pause and then return that value in currentTime(). Otherwise our |
294 // clock can creep forward a little bit while the asynchronous | 294 // clock can creep forward a little bit while the asynchronous |
295 // SetPlaybackRate(0) is being executed. | 295 // SetPlaybackRate(0) is being executed. |
296 bool paused_; | 296 bool paused_; |
297 bool seeking_; | 297 bool seeking_; |
| 298 base::TimeDelta seek_time_; |
298 double playback_rate_; | 299 double playback_rate_; |
299 base::TimeDelta paused_time_; | 300 base::TimeDelta paused_time_; |
300 | 301 |
301 // Seek gets pending if another seek is in progress. Only last pending seek | 302 // Seek gets pending if another seek is in progress. Only last pending seek |
302 // will have effect. | 303 // will have effect. |
303 bool pending_seek_; | 304 bool pending_seek_; |
304 double pending_seek_seconds_; | 305 base::TimeDelta pending_seek_time_; |
305 | 306 |
306 WebKit::WebMediaPlayerClient* client_; | 307 WebKit::WebMediaPlayerClient* client_; |
307 | 308 |
308 base::WeakPtr<WebMediaPlayerDelegate> delegate_; | 309 base::WeakPtr<WebMediaPlayerDelegate> delegate_; |
309 | 310 |
310 base::Callback<void(const base::Closure&)> defer_load_cb_; | 311 base::Callback<void(const base::Closure&)> defer_load_cb_; |
311 | 312 |
312 scoped_refptr<media::MediaLog> media_log_; | 313 scoped_refptr<media::MediaLog> media_log_; |
313 | 314 |
314 // Since accelerated compositing status is only known after the first layout, | 315 // Since accelerated compositing status is only known after the first layout, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 | 367 |
367 // Text track objects get a unique index value when they're created. | 368 // Text track objects get a unique index value when they're created. |
368 int text_track_index_; | 369 int text_track_index_; |
369 | 370 |
370 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 371 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
371 }; | 372 }; |
372 | 373 |
373 } // namespace content | 374 } // namespace content |
374 | 375 |
375 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 376 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |