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

Side by Side Diff: media/blink/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: Rebase to ToT. Address nits Created 6 years, 2 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 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 <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/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/memory/weak_ptr.h" 15 #include "base/memory/weak_ptr.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "media/base/audio_renderer_sink.h" 17 #include "media/base/audio_renderer_sink.h"
18 #include "media/base/media_export.h" 18 #include "media/base/media_export.h"
19 // TODO(xhwang): Remove when we remove prefixed EME implementation. 19 // TODO(xhwang): Remove when we remove prefixed EME implementation.
20 #include "media/base/media_keys.h" 20 #include "media/base/media_keys.h"
21 #include "media/base/pipeline.h" 21 #include "media/base/pipeline.h"
22 #include "media/base/text_track.h" 22 #include "media/base/text_track.h"
23 #include "media/blink/buffered_data_source.h" 23 #include "media/blink/buffered_data_source.h"
24 #include "media/blink/buffered_data_source_host_impl.h" 24 #include "media/blink/buffered_data_source_host_impl.h"
25 #include "media/blink/video_frame_compositor.h" 25 #include "media/blink/video_frame_compositor.h"
26 #include "media/blink/webmediaplayer_params.h"
26 #include "media/filters/skcanvas_video_renderer.h" 27 #include "media/filters/skcanvas_video_renderer.h"
27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" 28 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
28 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" 29 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
29 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
30 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 30 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
31 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" 31 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h"
32 #include "url/gurl.h" 32 #include "url/gurl.h"
33 33
34 namespace blink { 34 namespace blink {
35 class WebGraphicsContext3D;
35 class WebLocalFrame; 36 class WebLocalFrame;
36 } 37 }
37 38
38 namespace base { 39 namespace base {
39 class SingleThreadTaskRunner; 40 class SingleThreadTaskRunner;
40 } 41 }
41 42
42 namespace cc_blink { 43 namespace cc_blink {
43 class WebLayerImpl; 44 class WebLayerImpl;
44 } 45 }
45 46
46 namespace media { 47 namespace media {
47 class AudioHardwareConfig; 48 class AudioHardwareConfig;
48 class ChunkDemuxer; 49 class ChunkDemuxer;
49 class EncryptedMediaPlayerSupport; 50 class EncryptedMediaPlayerSupport;
50 class GpuVideoAcceleratorFactories; 51 class GpuVideoAcceleratorFactories;
51 class MediaLog; 52 class MediaLog;
52 class VideoFrameCompositor; 53 class VideoFrameCompositor;
53 class WebAudioSourceProviderImpl; 54 class WebAudioSourceProviderImpl;
54 class WebMediaPlayerDelegate; 55 class WebMediaPlayerDelegate;
55 class WebMediaPlayerParams;
56 class WebTextTrackImpl; 56 class WebTextTrackImpl;
57 57
58 // The canonical implementation of blink::WebMediaPlayer that's backed by 58 // The canonical implementation of blink::WebMediaPlayer that's backed by
59 // Pipeline. Handles normal resource loading, Media Source, and 59 // Pipeline. Handles normal resource loading, Media Source, and
60 // Encrypted Media. 60 // Encrypted Media.
61 class MEDIA_EXPORT WebMediaPlayerImpl 61 class MEDIA_EXPORT WebMediaPlayerImpl
62 : public NON_EXPORTED_BASE(blink::WebMediaPlayer), 62 : public NON_EXPORTED_BASE(blink::WebMediaPlayer),
63 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 63 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
64 public: 64 public:
65 // Constructs a WebMediaPlayer implementation using Chromium's media stack. 65 // Constructs a WebMediaPlayer implementation using Chromium's media stack.
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 double pending_seek_seconds_; 264 double pending_seek_seconds_;
265 265
266 // Tracks whether to issue time changed notifications during buffering state 266 // Tracks whether to issue time changed notifications during buffering state
267 // changes. 267 // changes.
268 bool should_notify_time_changed_; 268 bool should_notify_time_changed_;
269 269
270 blink::WebMediaPlayerClient* client_; 270 blink::WebMediaPlayerClient* client_;
271 271
272 base::WeakPtr<WebMediaPlayerDelegate> delegate_; 272 base::WeakPtr<WebMediaPlayerDelegate> delegate_;
273 273
274 base::Callback<void(const base::Closure&)> defer_load_cb_; 274 WebMediaPlayerParams::DeferLoadCB defer_load_cb_;
275 WebMediaPlayerParams::ContextProviderCB
276 shared_main_thread_context_provider_cb_;
275 277
276 // Factories for supporting video accelerators. May be null. 278 // Factories for supporting video accelerators. May be null.
277 scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_; 279 scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_;
278 280
279 // Routes audio playback to either AudioRendererSink or WebAudio. 281 // Routes audio playback to either AudioRendererSink or WebAudio.
280 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; 282 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_;
281 283
282 bool supports_save_; 284 bool supports_save_;
283 285
284 // These two are mutually exclusive: 286 // These two are mutually exclusive:
(...skipping 23 matching lines...) Expand all
308 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support_; 310 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support_;
309 311
310 const AudioHardwareConfig& audio_hardware_config_; 312 const AudioHardwareConfig& audio_hardware_config_;
311 313
312 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 314 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
313 }; 315 };
314 316
315 } // namespace media 317 } // namespace media
316 318
317 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 319 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698