| 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 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 bool preroll_attempt_pending_; | 643 bool preroll_attempt_pending_; |
| 644 base::TimeTicks preroll_attempt_start_time_; | 644 base::TimeTicks preroll_attempt_start_time_; |
| 645 | 645 |
| 646 std::unique_ptr<base::TickClock> tick_clock_; | 646 std::unique_ptr<base::TickClock> tick_clock_; |
| 647 | 647 |
| 648 // Monitors the player events. | 648 // Monitors the player events. |
| 649 base::WeakPtr<MediaObserver> observer_; | 649 base::WeakPtr<MediaObserver> observer_; |
| 650 | 650 |
| 651 // The maximum video keyframe distance that allows triggering background | 651 // The maximum video keyframe distance that allows triggering background |
| 652 // playback optimizations. | 652 // playback optimizations. |
| 653 // 10 seconds by default but can be overridden by a Finch experiment. | 653 base::TimeDelta max_keyframe_distance_to_disable_background_video_; |
| 654 base::TimeDelta max_keyframe_distance_to_disable_background_video_ = | |
| 655 base::TimeDelta::FromSeconds(10); | |
| 656 | 654 |
| 657 // Whether disabled the video track as an optimization. | 655 // Whether disabled the video track as an optimization. |
| 658 bool video_track_disabled_ = false; | 656 bool video_track_disabled_ = false; |
| 659 | 657 |
| 660 // Whether the pipeline is being resumed at the moment. | 658 // Whether the pipeline is being resumed at the moment. |
| 661 bool is_pipeline_resuming_ = false; | 659 bool is_pipeline_resuming_ = false; |
| 662 | 660 |
| 663 // Pipeline statistics overridden by tests. | 661 // Pipeline statistics overridden by tests. |
| 664 base::Optional<PipelineStatistics> pipeline_statistics_for_test_; | 662 base::Optional<PipelineStatistics> pipeline_statistics_for_test_; |
| 665 | 663 |
| 666 // Pipeline media duration overridden by tests. | 664 // Pipeline media duration overridden by tests. |
| 667 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_; | 665 base::Optional<base::TimeDelta> pipeline_media_duration_for_test_; |
| 668 | 666 |
| 669 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 667 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 670 }; | 668 }; |
| 671 | 669 |
| 672 } // namespace media | 670 } // namespace media |
| 673 | 671 |
| 674 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 672 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |