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/timer/elapsed_timer.h" | 22 #include "base/timer/elapsed_timer.h" |
22 #include "base/timer/timer.h" | 23 #include "base/timer/timer.h" |
23 #include "build/build_config.h" | 24 #include "build/build_config.h" |
24 #include "media/base/media_observer.h" | 25 #include "media/base/media_observer.h" |
25 #include "media/base/media_tracks.h" | 26 #include "media/base/media_tracks.h" |
26 #include "media/base/pipeline_impl.h" | 27 #include "media/base/pipeline_impl.h" |
27 #include "media/base/renderer_factory.h" | 28 #include "media/base/renderer_factory.h" |
28 #include "media/base/surface_manager.h" | 29 #include "media/base/surface_manager.h" |
29 #include "media/base/text_track.h" | 30 #include "media/base/text_track.h" |
30 #include "media/blink/buffered_data_source_host_impl.h" | 31 #include "media/blink/buffered_data_source_host_impl.h" |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
556 base::OneShotTimer background_pause_timer_; | 557 base::OneShotTimer background_pause_timer_; |
557 | 558 |
558 // Monitors the watch time of the played content. | 559 // Monitors the watch time of the played content. |
559 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; | 560 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; |
560 bool is_encrypted_; | 561 bool is_encrypted_; |
561 | 562 |
562 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. | 563 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. |
563 int underflow_count_; | 564 int underflow_count_; |
564 std::unique_ptr<base::ElapsedTimer> underflow_timer_; | 565 std::unique_ptr<base::ElapsedTimer> underflow_timer_; |
565 | 566 |
567 // The last time didLoadingProgress() returned true. | |
568 base::TimeTicks last_time_loading_progressed_; | |
569 | |
570 // Points to |default_tick_clock_| by default, but can be overridden by tests. | |
571 base::TickClock* tick_clock_; | |
DaleCurtis
2016/10/28 19:11:42
Nowadays I like just having a single std::unique_p
| |
572 base::DefaultTickClock default_tick_clock_; | |
573 | |
566 // Monitors the player events. | 574 // Monitors the player events. |
567 base::WeakPtr<MediaObserver> observer_; | 575 base::WeakPtr<MediaObserver> observer_; |
568 | 576 |
569 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 577 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
570 }; | 578 }; |
571 | 579 |
572 } // namespace media | 580 } // namespace media |
573 | 581 |
574 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 582 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |