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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void setBufferingStrategy( | 116 void setBufferingStrategy( |
117 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; | 117 blink::WebMediaPlayer::BufferingStrategy buffering_strategy) override; |
118 blink::WebTimeRanges buffered() const override; | 118 blink::WebTimeRanges buffered() const override; |
119 blink::WebTimeRanges seekable() const override; | 119 blink::WebTimeRanges seekable() const override; |
120 | 120 |
121 // paint() the current video frame into |canvas|. This is used to support | 121 // paint() the current video frame into |canvas|. This is used to support |
122 // various APIs and functionalities, including but not limited to: <canvas>, | 122 // various APIs and functionalities, including but not limited to: <canvas>, |
123 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. | 123 // WebGL texImage2D, ImageBitmap, printing and capturing capabilities. |
124 void paint(blink::WebCanvas* canvas, | 124 void paint(blink::WebCanvas* canvas, |
125 const blink::WebRect& rect, | 125 const blink::WebRect& rect, |
126 unsigned char alpha, | 126 SkPaint& paint) override; |
127 SkXfermode::Mode mode) override; | |
128 | 127 |
129 // True if the loaded media has a playable video/audio track. | 128 // True if the loaded media has a playable video/audio track. |
130 bool hasVideo() const override; | 129 bool hasVideo() const override; |
131 bool hasAudio() const override; | 130 bool hasAudio() const override; |
132 | 131 |
133 void enabledAudioTracksChanged( | 132 void enabledAudioTracksChanged( |
134 const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) | 133 const blink::WebVector<blink::WebMediaPlayer::TrackId>& enabledTrackIds) |
135 override; | 134 override; |
136 void selectedVideoTrackChanged( | 135 void selectedVideoTrackChanged( |
137 blink::WebMediaPlayer::TrackId* selectedTrackId) override; | 136 blink::WebMediaPlayer::TrackId* selectedTrackId) override; |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. | 547 // Number of times we've reached BUFFERING_HAVE_NOTHING during playback. |
549 int underflow_count_; | 548 int underflow_count_; |
550 std::unique_ptr<base::ElapsedTimer> underflow_timer_; | 549 std::unique_ptr<base::ElapsedTimer> underflow_timer_; |
551 | 550 |
552 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 551 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
553 }; | 552 }; |
554 | 553 |
555 } // namespace media | 554 } // namespace media |
556 | 555 |
557 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 556 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |