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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 bool supportsSave() const override; | 108 bool supportsSave() const override; |
109 void seek(double seconds) override; | 109 void seek(double seconds) override; |
110 void setRate(double rate) override; | 110 void setRate(double rate) override; |
111 void setVolume(double volume) override; | 111 void setVolume(double volume) override; |
112 void setSinkId(const blink::WebString& sink_id, | 112 void setSinkId(const blink::WebString& sink_id, |
113 const blink::WebSecurityOrigin& security_origin, | 113 const blink::WebSecurityOrigin& security_origin, |
114 blink::WebSetSinkIdCallbacks* web_callback) override; | 114 blink::WebSetSinkIdCallbacks* web_callback) override; |
115 void setPreload(blink::WebMediaPlayer::Preload preload) override; | 115 void setPreload(blink::WebMediaPlayer::Preload preload) override; |
116 void setBufferingStrategy( | 116 void setBufferingStrategy( |
117 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; | 117 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; |
118 void setPaused(bool is_paused) override; | |
118 blink::WebTimeRanges buffered() const override; | 119 blink::WebTimeRanges buffered() const override; |
119 blink::WebTimeRanges seekable() const override; | 120 blink::WebTimeRanges seekable() const override; |
120 | 121 |
121 // paint() the current video frame into |canvas|. This is used to support | 122 // paint() the current video frame into |canvas|. This is used to support |
122 // various APIs and functionalities, including but not limited to: <canvas>, | 123 // various APIs and functionalities, including but not limited to: <canvas>, |
123 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. | 124 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. |
124 void paint(blink::WebCanvas* canvas, | 125 void paint(blink::WebCanvas* canvas, |
125 const blink::WebRect& rect, | 126 const blink::WebRect& rect, |
126 unsigned char alpha, | 127 unsigned char alpha, |
127 SkXfermode::Mode mode) override; | 128 SkXfermode::Mode mode) override; |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
539 base::OneShotTimer background_pause_timer_; | 540 base::OneShotTimer background_pause_timer_; |
540 | 541 |
541 // Monitors the watch time of the played content. | 542 // Monitors the watch time of the played content. |
542 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; | 543 std::unique_ptr<WatchTimeReporter> watch_time_reporter_; |
543 bool is_encrypted_; | 544 bool is_encrypted_; |
544 | 545 |
545 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. | 546 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. |
546 int underflow_count_; | 547 int underflow_count_; |
547 std::unique_ptr<base::ElapsedTimer> underflow_timer_; | 548 std::unique_ptr<base::ElapsedTimer> underflow_timer_; |
548 | 549 |
550 // Reflects the playback state of the WebMediaPlayerClient. This will not | |
sandersd (OOO until July 31)
2016/08/30 22:41:41
Nit: will not -> may not
DaleCurtis
2016/08/30 22:59:43
Done.
| |
551 // match |paused_| or |playback_rate_| when |highest_ready_state_| is less | |
552 // than WebMediaPlayer::ReadyStateHaveFutureData. | |
553 bool is_client_paused_; | |
554 | |
549 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 555 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
550 }; | 556 }; |
551 | 557 |
552 } // namespace media | 558 } // namespace media |
553 | 559 |
554 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 560 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |