| 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 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // TODO(scherkus): we have these because Pipeline favours the simplicity of a | 267 // TODO(scherkus): we have these because Pipeline favours the simplicity of a |
| 268 // single "playback rate" over worrying about paused/stopped etc... It forces | 268 // single "playback rate" over worrying about paused/stopped etc... It forces |
| 269 // all clients to manage the pause+playback rate externally, but is that | 269 // all clients to manage the pause+playback rate externally, but is that |
| 270 // really a bad thing? | 270 // really a bad thing? |
| 271 // | 271 // |
| 272 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want | 272 // TODO(scherkus): since SetPlaybackRate(0) is asynchronous and we don't want |
| 273 // to hang the render thread during pause(), we record the time at the same | 273 // to hang the render thread during pause(), we record the time at the same |
| 274 // time we pause and then return that value in currentTime(). Otherwise our | 274 // time we pause and then return that value in currentTime(). Otherwise our |
| 275 // clock can creep forward a little bit while the asynchronous | 275 // clock can creep forward a little bit while the asynchronous |
| 276 // SetPlaybackRate(0) is being executed. | 276 // SetPlaybackRate(0) is being executed. |
| 277 double playback_rate_; |
| 277 bool paused_; | 278 bool paused_; |
| 279 base::TimeDelta paused_time_; |
| 278 bool seeking_; | 280 bool seeking_; |
| 279 double playback_rate_; | 281 base::TimeDelta seek_time_; // Meaningless when |seeking_| is false. |
| 280 base::TimeDelta paused_time_; | |
| 281 | 282 |
| 282 // TODO(scherkus): Replace with an explicit ended signal to HTMLMediaElement, | 283 // TODO(scherkus): Replace with an explicit ended signal to HTMLMediaElement, |
| 283 // see http://crbug.com/409280 | 284 // see http://crbug.com/409280 |
| 284 bool ended_; | 285 bool ended_; |
| 285 | 286 |
| 286 // Seek gets pending if another seek is in progress. Only last pending seek | 287 // Seek gets pending if another seek is in progress. Only last pending seek |
| 287 // will have effect. | 288 // will have effect. |
| 288 bool pending_seek_; | 289 bool pending_seek_; |
| 289 double pending_seek_seconds_; | 290 // |pending_seek_time_| is meaningless when |pending_seek_| is false. |
| 291 base::TimeDelta pending_seek_time_; |
| 290 | 292 |
| 291 // Tracks whether to issue time changed notifications during buffering state | 293 // Tracks whether to issue time changed notifications during buffering state |
| 292 // changes. | 294 // changes. |
| 293 bool should_notify_time_changed_; | 295 bool should_notify_time_changed_; |
| 294 | 296 |
| 295 blink::WebMediaPlayerClient* client_; | 297 blink::WebMediaPlayerClient* client_; |
| 296 | 298 |
| 297 base::WeakPtr<WebMediaPlayerDelegate> delegate_; | 299 base::WeakPtr<WebMediaPlayerDelegate> delegate_; |
| 298 | 300 |
| 299 WebMediaPlayerParams::DeferLoadCB defer_load_cb_; | 301 WebMediaPlayerParams::DeferLoadCB defer_load_cb_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 328 EncryptedMediaPlayerSupport encrypted_media_support_; | 330 EncryptedMediaPlayerSupport encrypted_media_support_; |
| 329 | 331 |
| 330 scoped_ptr<RendererFactory> renderer_factory_; | 332 scoped_ptr<RendererFactory> renderer_factory_; |
| 331 | 333 |
| 332 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 334 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 333 }; | 335 }; |
| 334 | 336 |
| 335 } // namespace media | 337 } // namespace media |
| 336 | 338 |
| 337 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 339 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |