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 CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 6 #define CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "content/renderer/media/android/stream_texture_factory.h" | 24 #include "content/renderer/media/android/stream_texture_factory.h" |
25 #include "gpu/command_buffer/common/mailbox.h" | 25 #include "gpu/command_buffer/common/mailbox.h" |
26 #include "media/base/android/media_player_android.h" | 26 #include "media/base/android/media_player_android.h" |
27 #include "media/base/cdm_context.h" | 27 #include "media/base/cdm_context.h" |
28 #include "media/base/demuxer_stream.h" | 28 #include "media/base/demuxer_stream.h" |
29 #include "media/base/eme_constants.h" | 29 #include "media/base/eme_constants.h" |
30 #include "media/base/media_keys.h" | 30 #include "media/base/media_keys.h" |
31 #include "media/base/time_delta_interpolator.h" | 31 #include "media/base/time_delta_interpolator.h" |
32 #include "media/blink/webmediaplayer_delegate.h" | 32 #include "media/blink/webmediaplayer_delegate.h" |
33 #include "media/blink/webmediaplayer_params.h" | 33 #include "media/blink/webmediaplayer_params.h" |
34 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | |
35 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 34 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
36 #include "third_party/WebKit/public/platform/WebSetSinkIdCallbacks.h" | 35 #include "third_party/WebKit/public/platform/WebSetSinkIdCallbacks.h" |
37 #include "third_party/WebKit/public/platform/WebSize.h" | 36 #include "third_party/WebKit/public/platform/WebSize.h" |
38 #include "third_party/WebKit/public/platform/WebURL.h" | 37 #include "third_party/WebKit/public/platform/WebURL.h" |
39 #include "third_party/skia/include/core/SkBitmap.h" | 38 #include "third_party/skia/include/core/SkBitmap.h" |
40 #include "ui/gfx/geometry/rect_f.h" | 39 #include "ui/gfx/geometry/rect_f.h" |
41 | 40 |
42 namespace base { | 41 namespace base { |
43 class SingleThreadTaskRunner; | 42 class SingleThreadTaskRunner; |
44 } | 43 } |
45 | 44 |
46 namespace blink { | 45 namespace blink { |
47 class WebContentDecryptionModule; | 46 class WebContentDecryptionModule; |
48 class WebContentDecryptionModuleResult; | 47 class WebContentDecryptionModuleResult; |
49 class WebFrame; | 48 class WebFrame; |
50 class WebMediaPlayerClient; | 49 class WebMediaPlayerClient; |
51 class WebMediaPlayerEncryptedMediaClient; | 50 class WebMediaPlayerEncryptedMediaClient; |
52 class WebURL; | 51 class WebURL; |
53 } | 52 } |
54 | 53 |
55 namespace cc_blink { | 54 namespace cc_blink { |
56 class WebLayerImpl; | 55 class WebLayerImpl; |
57 } | 56 } |
58 | 57 |
59 namespace gpu { | 58 namespace gpu { |
| 59 namespace gles2 { |
| 60 class GLES2Interface; |
| 61 } |
60 struct MailboxHolder; | 62 struct MailboxHolder; |
61 } | 63 } |
62 | 64 |
63 namespace media { | 65 namespace media { |
64 class CdmContext; | 66 class CdmContext; |
65 class MediaLog; | 67 class MediaLog; |
66 class WebContentDecryptionModuleImpl; | 68 class WebContentDecryptionModuleImpl; |
67 } | 69 } |
68 | 70 |
69 namespace content { | 71 namespace content { |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Methods for painting. | 131 // Methods for painting. |
130 // FIXME: This path "only works" on Android. It is a workaround for the | 132 // FIXME: This path "only works" on Android. It is a workaround for the |
131 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture | 133 // issue that Skia could not handle Android's GL_TEXTURE_EXTERNAL_OES texture |
132 // internally. It should be removed and replaced by the normal paint path. | 134 // internally. It should be removed and replaced by the normal paint path. |
133 // https://code.google.com/p/skia/issues/detail?id=1189 | 135 // https://code.google.com/p/skia/issues/detail?id=1189 |
134 void paint(blink::WebCanvas* canvas, | 136 void paint(blink::WebCanvas* canvas, |
135 const blink::WebRect& rect, | 137 const blink::WebRect& rect, |
136 unsigned char alpha, | 138 unsigned char alpha, |
137 SkXfermode::Mode mode) override; | 139 SkXfermode::Mode mode) override; |
138 | 140 |
139 bool copyVideoTextureToPlatformTexture( | 141 bool copyVideoTextureToPlatformTexture(gpu::gles2::GLES2Interface* gl, |
140 blink::WebGraphicsContext3D* web_graphics_context, | 142 unsigned int texture, |
141 unsigned int texture, | 143 unsigned int internal_format, |
142 unsigned int internal_format, | 144 unsigned int type, |
143 unsigned int type, | 145 bool premultiply_alpha, |
144 bool premultiply_alpha, | 146 bool flip_y) override; |
145 bool flip_y) override; | |
146 | 147 |
147 // True if the loaded media has a playable video/audio track. | 148 // True if the loaded media has a playable video/audio track. |
148 bool hasVideo() const override; | 149 bool hasVideo() const override; |
149 bool hasAudio() const override; | 150 bool hasAudio() const override; |
150 | 151 |
151 bool isRemote() const override; | 152 bool isRemote() const override; |
152 | 153 |
153 // Dimensions of the video. | 154 // Dimensions of the video. |
154 blink::WebSize naturalSize() const override; | 155 blink::WebSize naturalSize() const override; |
155 | 156 |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 516 |
516 // NOTE: Weak pointers must be invalidated before all other member variables. | 517 // NOTE: Weak pointers must be invalidated before all other member variables. |
517 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; | 518 base::WeakPtrFactory<WebMediaPlayerAndroid> weak_factory_; |
518 | 519 |
519 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); | 520 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerAndroid); |
520 }; | 521 }; |
521 | 522 |
522 } // namespace content | 523 } // namespace content |
523 | 524 |
524 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ | 525 #endif // CONTENT_RENDERER_MEDIA_ANDROID_WEBMEDIAPLAYER_ANDROID_H_ |
OLD | NEW |