| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 // Return the pipeline media duration or the value overridden by tests. | 448 // Return the pipeline media duration or the value overridden by tests. |
| 449 base::TimeDelta GetPipelineMediaDuration() const; | 449 base::TimeDelta GetPipelineMediaDuration() const; |
| 450 | 450 |
| 451 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time, | 451 void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time, |
| 452 base::TimeTicks new_frame_time); | 452 base::TimeTicks new_frame_time); |
| 453 | 453 |
| 454 // Records |duration| to the appropriate metric based on whether we're | 454 // Records |duration| to the appropriate metric based on whether we're |
| 455 // handling a src= or MSE based playback. | 455 // handling a src= or MSE based playback. |
| 456 void RecordUnderflowDuration(base::TimeDelta duration); | 456 void RecordUnderflowDuration(base::TimeDelta duration); |
| 457 | 457 |
| 458 // Called by the data source when loading progresses. |
| 459 // Can be called quite often. |
| 460 void OnProgress(); |
| 461 |
| 462 // Returns true when we estimate that we can play the rest of the media |
| 463 // without buffering. |
| 464 bool CanPlayThrough(); |
| 465 |
| 458 blink::WebLocalFrame* frame_; | 466 blink::WebLocalFrame* frame_; |
| 459 | 467 |
| 460 // The playback state last reported to |delegate_|, to avoid setting duplicate | 468 // The playback state last reported to |delegate_|, to avoid setting duplicate |
| 461 // states. | 469 // states. |
| 462 // TODO(sandersd): The delegate should be implementing deduplication. | 470 // TODO(sandersd): The delegate should be implementing deduplication. |
| 463 DelegateState delegate_state_; | 471 DelegateState delegate_state_; |
| 464 bool delegate_has_audio_; | 472 bool delegate_has_audio_; |
| 465 | 473 |
| 466 blink::WebMediaPlayer::NetworkState network_state_; | 474 blink::WebMediaPlayer::NetworkState network_state_; |
| 467 blink::WebMediaPlayer::ReadyState ready_state_; | 475 blink::WebMediaPlayer::ReadyState ready_state_; |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 719 |
| 712 gfx::Size last_uploaded_frame_size_; | 720 gfx::Size last_uploaded_frame_size_; |
| 713 base::TimeDelta last_uploaded_frame_timestamp_; | 721 base::TimeDelta last_uploaded_frame_timestamp_; |
| 714 | 722 |
| 715 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 723 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 716 }; | 724 }; |
| 717 | 725 |
| 718 } // namespace media | 726 } // namespace media |
| 719 | 727 |
| 720 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 728 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |