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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 void play() override; | 111 void play() override; |
112 void pause() override; | 112 void pause() override; |
113 bool supportsSave() const override; | 113 bool supportsSave() const override; |
114 void seek(double seconds) override; | 114 void seek(double seconds) override; |
115 void setRate(double rate) override; | 115 void setRate(double rate) override; |
116 void setVolume(double volume) override; | 116 void setVolume(double volume) override; |
117 void setSinkId(const blink::WebString& sink_id, | 117 void setSinkId(const blink::WebString& sink_id, |
118 const blink::WebSecurityOrigin& security_origin, | 118 const blink::WebSecurityOrigin& security_origin, |
119 blink::WebSetSinkIdCallbacks* web_callback) override; | 119 blink::WebSetSinkIdCallbacks* web_callback) override; |
120 void setPreload(blink::WebMediaPlayer::Preload preload) override; | 120 void setPreload(blink::WebMediaPlayer::Preload preload) override; |
121 void setBufferingStrategy( | |
122 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; | |
123 blink::WebTimeRanges buffered() const override; | 121 blink::WebTimeRanges buffered() const override; |
124 blink::WebTimeRanges seekable() const override; | 122 blink::WebTimeRanges seekable() const override; |
125 | 123 |
126 // paint() the current video frame into |canvas|. This is used to support | 124 // paint() the current video frame into |canvas|. This is used to support |
127 // various APIs and functionalities, including but not limited to: <canvas>, | 125 // various APIs and functionalities, including but not limited to: <canvas>, |
128 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. | 126 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. |
129 void paint(blink::WebCanvas* canvas, | 127 void paint(blink::WebCanvas* canvas, |
130 const blink::WebRect& rect, | 128 const blink::WebRect& rect, |
131 cc::PaintFlags& flags) override; | 129 cc::PaintFlags& flags) override; |
132 | 130 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 DelegateState delegate_state_; | 459 DelegateState delegate_state_; |
462 bool delegate_has_audio_; | 460 bool delegate_has_audio_; |
463 | 461 |
464 blink::WebMediaPlayer::NetworkState network_state_; | 462 blink::WebMediaPlayer::NetworkState network_state_; |
465 blink::WebMediaPlayer::ReadyState ready_state_; | 463 blink::WebMediaPlayer::ReadyState ready_state_; |
466 blink::WebMediaPlayer::ReadyState highest_ready_state_; | 464 blink::WebMediaPlayer::ReadyState highest_ready_state_; |
467 | 465 |
468 // Preload state for when |data_source_| is created after setPreload(). | 466 // Preload state for when |data_source_| is created after setPreload(). |
469 MultibufferDataSource::Preload preload_; | 467 MultibufferDataSource::Preload preload_; |
470 | 468 |
471 // Buffering strategy for when |data_source_| is created after | |
472 // setBufferingStrategy(). | |
473 MultibufferDataSource::BufferingStrategy buffering_strategy_; | |
474 | |
475 // Task runner for posting tasks on Chrome's main thread. Also used | 469 // Task runner for posting tasks on Chrome's main thread. Also used |
476 // for DCHECKs so methods calls won't execute in the wrong thread. | 470 // for DCHECKs so methods calls won't execute in the wrong thread. |
477 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 471 const scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
478 | 472 |
479 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; | 473 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner_; |
480 scoped_refptr<base::TaskRunner> worker_task_runner_; | 474 scoped_refptr<base::TaskRunner> worker_task_runner_; |
481 scoped_refptr<MediaLog> media_log_; | 475 scoped_refptr<MediaLog> media_log_; |
482 | 476 |
483 // |pipeline_controller_| owns an instance of Pipeline. | 477 // |pipeline_controller_| owns an instance of Pipeline. |
484 PipelineController pipeline_controller_; | 478 PipelineController pipeline_controller_; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
710 | 704 |
711 // Whether embedded media experience is currently enabled. | 705 // Whether embedded media experience is currently enabled. |
712 bool embedded_media_experience_enabled_ = false; | 706 bool embedded_media_experience_enabled_ = false; |
713 | 707 |
714 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 708 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
715 }; | 709 }; |
716 | 710 |
717 } // namespace media | 711 } // namespace media |
718 | 712 |
719 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 713 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |