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 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. | 5 // Delegate calls from WebCore::MediaPlayerPrivate to Chrome's video player. |
6 // It contains Pipeline which is the actual media player pipeline, it glues | 6 // It contains Pipeline which is the actual media player pipeline, it glues |
7 // the media player pipeline, data source, audio renderer and renderer. | 7 // the media player pipeline, data source, audio renderer and renderer. |
8 // Pipeline would creates multiple threads and access some public methods | 8 // Pipeline would creates multiple threads and access some public methods |
9 // of this class, so we need to be extra careful about concurrent access of | 9 // of this class, so we need to be extra careful about concurrent access of |
10 // methods and members. | 10 // methods and members. |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "base/memory/ref_counted.h" | 25 #include "base/memory/ref_counted.h" |
26 #include "base/memory/scoped_ptr.h" | 26 #include "base/memory/scoped_ptr.h" |
27 #include "base/memory/weak_ptr.h" | 27 #include "base/memory/weak_ptr.h" |
28 #include "base/threading/thread.h" | 28 #include "base/threading/thread.h" |
29 #include "googleurl/src/gurl.h" | 29 #include "googleurl/src/gurl.h" |
30 #include "media/base/audio_renderer_sink.h" | 30 #include "media/base/audio_renderer_sink.h" |
31 #include "media/base/decryptor.h" | 31 #include "media/base/decryptor.h" |
32 #include "media/base/pipeline.h" | 32 #include "media/base/pipeline.h" |
33 #include "media/filters/skcanvas_video_renderer.h" | 33 #include "media/filters/skcanvas_video_renderer.h" |
34 #include "skia/ext/platform_canvas.h" | 34 #include "skia/ext/platform_canvas.h" |
| 35 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
35 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
r.h" | 36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAudioSourceProvide
r.h" |
36 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" | 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayer.h" |
37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaPlayerClient.
h" |
38 #include "webkit/media/crypto/key_systems.h" | 39 #include "webkit/media/crypto/key_systems.h" |
39 #include "webkit/media/crypto/proxy_decryptor.h" | 40 #include "webkit/media/crypto/proxy_decryptor.h" |
40 | 41 |
41 class RenderAudioSourceProvider; | 42 class RenderAudioSourceProvider; |
42 | 43 |
43 namespace WebKit { | 44 namespace WebKit { |
44 class WebFrame; | 45 class WebFrame; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 virtual float mediaTimeForTimeValue(float timeValue) const; | 137 virtual float mediaTimeForTimeValue(float timeValue) const; |
137 | 138 |
138 virtual unsigned decodedFrameCount() const; | 139 virtual unsigned decodedFrameCount() const; |
139 virtual unsigned droppedFrameCount() const; | 140 virtual unsigned droppedFrameCount() const; |
140 virtual unsigned audioDecodedByteCount() const; | 141 virtual unsigned audioDecodedByteCount() const; |
141 virtual unsigned videoDecodedByteCount() const; | 142 virtual unsigned videoDecodedByteCount() const; |
142 | 143 |
143 virtual WebKit::WebVideoFrame* getCurrentFrame(); | 144 virtual WebKit::WebVideoFrame* getCurrentFrame(); |
144 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); | 145 virtual void putCurrentFrame(WebKit::WebVideoFrame* web_video_frame); |
145 | 146 |
| 147 virtual bool copyVideoTextureToPlatformTexture( |
| 148 WebKit::WebGraphicsContext3D* web_graphics_context, |
| 149 unsigned int texture, |
| 150 unsigned int level, |
| 151 unsigned int internal_format, |
| 152 bool premultiply_alpha, |
| 153 bool flip_y); |
| 154 |
146 virtual WebKit::WebAudioSourceProvider* audioSourceProvider(); | 155 virtual WebKit::WebAudioSourceProvider* audioSourceProvider(); |
147 | 156 |
148 virtual MediaKeyException generateKeyRequest( | 157 virtual MediaKeyException generateKeyRequest( |
149 const WebKit::WebString& key_system, | 158 const WebKit::WebString& key_system, |
150 const unsigned char* init_data, | 159 const unsigned char* init_data, |
151 unsigned init_data_length); | 160 unsigned init_data_length); |
152 | 161 |
153 virtual MediaKeyException addKey(const WebKit::WebString& key_system, | 162 virtual MediaKeyException addKey(const WebKit::WebString& key_system, |
154 const unsigned char* key, | 163 const unsigned char* key, |
155 unsigned key_length, | 164 unsigned key_length, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 media::SkCanvasVideoRenderer skcanvas_video_renderer_; | 340 media::SkCanvasVideoRenderer skcanvas_video_renderer_; |
332 scoped_refptr<media::VideoFrame> current_frame_; | 341 scoped_refptr<media::VideoFrame> current_frame_; |
333 bool pending_repaint_; | 342 bool pending_repaint_; |
334 | 343 |
335 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 344 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
336 }; | 345 }; |
337 | 346 |
338 } // namespace webkit_media | 347 } // namespace webkit_media |
339 | 348 |
340 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 349 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |