Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: content/renderer/media/webmediaplayer_impl.h

Issue 445013002: media: Optimize HW Video to 2D Canvas copy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix cc unittests Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_WEBMEDIAPLAYER_IMPL_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/threading/thread.h" 15 #include "base/threading/thread.h"
16 #include "cc/resources/media/skcanvas_video_renderer.h"
16 #include "content/renderer/media/buffered_data_source_host_impl.h" 17 #include "content/renderer/media/buffered_data_source_host_impl.h"
17 #include "content/renderer/media/crypto/proxy_decryptor.h" 18 #include "content/renderer/media/crypto/proxy_decryptor.h"
18 #include "content/renderer/media/video_frame_compositor.h" 19 #include "content/renderer/media/video_frame_compositor.h"
19 #include "media/base/audio_renderer_sink.h" 20 #include "media/base/audio_renderer_sink.h"
20 #include "media/base/decryptor.h" 21 #include "media/base/decryptor.h"
21 // TODO(xhwang): Remove when we remove prefixed EME implementation. 22 // TODO(xhwang): Remove when we remove prefixed EME implementation.
22 #include "media/base/media_keys.h" 23 #include "media/base/media_keys.h"
23 #include "media/base/pipeline.h" 24 #include "media/base/pipeline.h"
24 #include "media/base/text_track.h" 25 #include "media/base/text_track.h"
25 #include "media/filters/skcanvas_video_renderer.h"
26 #include "skia/ext/platform_canvas.h" 26 #include "skia/ext/platform_canvas.h"
27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" 27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 28 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
30 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" 29 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
31 #include "url/gurl.h" 30 #include "url/gurl.h"
32 31
33 class RenderAudioSourceProvider; 32 class RenderAudioSourceProvider;
34 33
35 namespace blink { 34 namespace blink {
36 class WebContentDecryptionModule; 35 class WebContentDecryptionModule;
36 class WebGraphicsContext3D;
37 class WebLocalFrame; 37 class WebLocalFrame;
38 } 38 }
39 39
40 namespace base { 40 namespace base {
41 class MessageLoopProxy; 41 class MessageLoopProxy;
42 } 42 }
43 43
44 namespace media { 44 namespace media {
45 class ChunkDemuxer; 45 class ChunkDemuxer;
46 class GpuVideoAcceleratorFactories; 46 class GpuVideoAcceleratorFactories;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 virtual unsigned audioDecodedByteCount() const; 125 virtual unsigned audioDecodedByteCount() const;
126 virtual unsigned videoDecodedByteCount() const; 126 virtual unsigned videoDecodedByteCount() const;
127 127
128 virtual bool copyVideoTextureToPlatformTexture( 128 virtual bool copyVideoTextureToPlatformTexture(
129 blink::WebGraphicsContext3D* web_graphics_context, 129 blink::WebGraphicsContext3D* web_graphics_context,
130 unsigned int texture, 130 unsigned int texture,
131 unsigned int level, 131 unsigned int level,
132 unsigned int internal_format, 132 unsigned int internal_format,
133 unsigned int type, 133 unsigned int type,
134 bool premultiply_alpha, 134 bool premultiply_alpha,
135 bool flip_y); 135 bool flip_y) OVERRIDE;
136 136
137 virtual blink::WebAudioSourceProvider* audioSourceProvider(); 137 virtual blink::WebAudioSourceProvider* audioSourceProvider();
138 138
139 virtual MediaKeyException generateKeyRequest( 139 virtual MediaKeyException generateKeyRequest(
140 const blink::WebString& key_system, 140 const blink::WebString& key_system,
141 const unsigned char* init_data, 141 const unsigned char* init_data,
142 unsigned init_data_length); 142 unsigned init_data_length);
143 143
144 virtual MediaKeyException addKey(const blink::WebString& key_system, 144 virtual MediaKeyException addKey(const blink::WebString& key_system,
145 const unsigned char* key, 145 const unsigned char* key,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 BufferedDataSourceHostImpl buffered_data_source_host_; 315 BufferedDataSourceHostImpl buffered_data_source_host_;
316 316
317 // Temporary for EME v0.1. In the future the init data type should be passed 317 // Temporary for EME v0.1. In the future the init data type should be passed
318 // through GenerateKeyRequest() directly from WebKit. 318 // through GenerateKeyRequest() directly from WebKit.
319 std::string init_data_type_; 319 std::string init_data_type_;
320 320
321 // Video rendering members. 321 // Video rendering members.
322 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; 322 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
323 VideoFrameCompositor* compositor_; // Deleted on |compositor_task_runner_|. 323 VideoFrameCompositor* compositor_; // Deleted on |compositor_task_runner_|.
324 media::SkCanvasVideoRenderer skcanvas_video_renderer_; 324 cc::SkCanvasVideoRenderer skcanvas_video_renderer_;
325 325
326 // The compositor layer for displaying the video content when using composited 326 // The compositor layer for displaying the video content when using composited
327 // playback. 327 // playback.
328 scoped_ptr<WebLayerImpl> video_weblayer_; 328 scoped_ptr<WebLayerImpl> video_weblayer_;
329 329
330 // Text track objects get a unique index value when they're created. 330 // Text track objects get a unique index value when they're created.
331 int text_track_index_; 331 int text_track_index_;
332 332
333 // Manages decryption keys and decrypts encrypted frames. 333 // Manages decryption keys and decrypts encrypted frames.
334 scoped_ptr<ProxyDecryptor> proxy_decryptor_; 334 scoped_ptr<ProxyDecryptor> proxy_decryptor_;
335 335
336 // Non-owned pointer to the CDM. Updated via calls to 336 // Non-owned pointer to the CDM. Updated via calls to
337 // setContentDecryptionModule(). 337 // setContentDecryptionModule().
338 WebContentDecryptionModuleImpl* web_cdm_; 338 WebContentDecryptionModuleImpl* web_cdm_;
339 339
340 media::DecryptorReadyCB decryptor_ready_cb_; 340 media::DecryptorReadyCB decryptor_ready_cb_;
341 341
342 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 342 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
343 }; 343 };
344 344
345 } // namespace content 345 } // namespace content
346 346
347 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ 347 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698