OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "cc/layers/video_frame_provider.h" | 15 #include "cc/layers/video_frame_provider.h" |
| 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" | 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebURL.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
19 #include "webkit/media/android/stream_texture_factory_android.h" | 20 #include "webkit/media/android/stream_texture_factory_android.h" |
20 | 21 |
21 namespace webkit { | 22 namespace webkit { |
22 class WebLayerImpl; | 23 class WebLayerImpl; |
23 } | 24 } |
24 | 25 |
25 namespace webkit_media { | 26 namespace webkit_media { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual const WebKit::WebTimeRanges& buffered(); | 59 virtual const WebKit::WebTimeRanges& buffered(); |
59 virtual float maxTimeSeekableFloat() const; | 60 virtual float maxTimeSeekableFloat() const; |
60 virtual double maxTimeSeekable() const; | 61 virtual double maxTimeSeekable() const; |
61 | 62 |
62 // Methods for painting. | 63 // Methods for painting. |
63 virtual void setSize(const WebKit::WebSize& size); | 64 virtual void setSize(const WebKit::WebSize& size); |
64 virtual void paint(WebKit::WebCanvas* canvas, | 65 virtual void paint(WebKit::WebCanvas* canvas, |
65 const WebKit::WebRect& rect, | 66 const WebKit::WebRect& rect, |
66 uint8_t alpha); | 67 uint8_t alpha); |
67 | 68 |
| 69 virtual bool copyVideoTextureToPlatformTexture( |
| 70 WebKit::WebGraphicsContext3D* web_graphics_context, |
| 71 unsigned int texture, |
| 72 unsigned int level, |
| 73 unsigned int internal_format, |
| 74 bool premultiply_alpha, |
| 75 bool flip_y); |
| 76 |
68 // True if the loaded media has a playable video/audio track. | 77 // True if the loaded media has a playable video/audio track. |
69 virtual bool hasVideo() const; | 78 virtual bool hasVideo() const; |
70 virtual bool hasAudio() const; | 79 virtual bool hasAudio() const; |
71 | 80 |
72 // Dimensions of the video. | 81 // Dimensions of the video. |
73 virtual WebKit::WebSize naturalSize() const; | 82 virtual WebKit::WebSize naturalSize() const; |
74 | 83 |
75 // Getters of playback state. | 84 // Getters of playback state. |
76 virtual bool paused() const; | 85 virtual bool paused() const; |
77 virtual bool seeking() const; | 86 virtual bool seeking() const; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 cc::VideoFrameProvider::Client* video_frame_provider_client_; | 274 cc::VideoFrameProvider::Client* video_frame_provider_client_; |
266 | 275 |
267 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; | 276 scoped_ptr<webkit::WebLayerImpl> video_weblayer_; |
268 | 277 |
269 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 278 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
270 }; | 279 }; |
271 | 280 |
272 } // namespace webkit_media | 281 } // namespace webkit_media |
273 | 282 |
274 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 283 #endif // WEBKIT_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |