Chromium Code Reviews| 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> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/cancelable_callback.h" | 14 #include "base/cancelable_callback.h" |
| 15 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/linked_ptr.h" | 17 #include "base/memory/linked_ptr.h" |
| 18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 20 #include "base/threading/thread.h" | 20 #include "base/threading/thread.h" |
| 21 #include "base/time/default_tick_clock.h" | 21 #include "base/time/default_tick_clock.h" |
| 22 #include "base/time/time.h" | |
| 22 #include "base/timer/elapsed_timer.h" | 23 #include "base/timer/elapsed_timer.h" |
| 23 #include "base/timer/timer.h" | 24 #include "base/timer/timer.h" |
| 24 #include "build/build_config.h" | 25 #include "build/build_config.h" |
| 25 #include "media/base/media_observer.h" | 26 #include "media/base/media_observer.h" |
| 26 #include "media/base/media_tracks.h" | 27 #include "media/base/media_tracks.h" |
| 27 #include "media/base/pipeline_impl.h" | 28 #include "media/base/pipeline_impl.h" |
| 28 #include "media/base/renderer_factory.h" | 29 #include "media/base/renderer_factory.h" |
| 29 #include "media/base/surface_manager.h" | 30 #include "media/base/surface_manager.h" |
| 30 #include "media/base/text_track.h" | 31 #include "media/base/text_track.h" |
| 31 #include "media/blink/buffered_data_source_host_impl.h" | 32 #include "media/blink/buffered_data_source_host_impl.h" |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 613 base::TimeTicks last_time_loading_progressed_; | 614 base::TimeTicks last_time_loading_progressed_; |
| 614 | 615 |
| 615 std::unique_ptr<base::TickClock> tick_clock_; | 616 std::unique_ptr<base::TickClock> tick_clock_; |
| 616 | 617 |
| 617 // Monitors the player events. | 618 // Monitors the player events. |
| 618 base::WeakPtr<MediaObserver> observer_; | 619 base::WeakPtr<MediaObserver> observer_; |
| 619 | 620 |
| 620 // Whether the player is currently in autoplay muted state. | 621 // Whether the player is currently in autoplay muted state. |
| 621 bool autoplay_muted_ = false; | 622 bool autoplay_muted_ = false; |
| 622 | 623 |
| 624 // The maximum video keyframe distance that allows triggering background | |
| 625 // playback optimizations. | |
| 626 // 10 seconds by default but can be overridden by a Finch experiment. | |
| 627 base::TimeDelta max_keyframe_distance_for_fast_decode_ = | |
|
DaleCurtis
2017/01/11 01:14:51
Replace fast_decode_ terminology like before.
whywhat
2017/01/11 17:17:33
Done.
| |
| 628 base::TimeDelta::FromSeconds(10); | |
| 629 | |
| 623 // Whether disabled the video track as an optimization. | 630 // Whether disabled the video track as an optimization. |
| 624 bool video_track_disabled_ = false; | 631 bool video_track_disabled_ = false; |
| 625 | 632 |
| 626 // Whether the pipeline is being resumed at the moment. | 633 // Whether the pipeline is being resumed at the moment. |
| 627 bool is_pipeline_resuming_ = false; | 634 bool is_pipeline_resuming_ = false; |
| 628 | 635 |
| 629 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 636 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 630 }; | 637 }; |
| 631 | 638 |
| 632 } // namespace media | 639 } // namespace media |
| 633 | 640 |
| 634 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 641 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |