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

Side by Side Diff: media/blink/webmediaplayer_impl.h

Issue 783003002: Introduce media::RendererFactory interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years 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
« no previous file with comments | « media/base/renderer_factory.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
18 #include "media/base/cdm_factory.h" 17 #include "media/base/cdm_factory.h"
19 #include "media/base/media_export.h" 18 #include "media/base/media_export.h"
20 #include "media/base/pipeline.h" 19 #include "media/base/pipeline.h"
21 #include "media/base/renderer.h" 20 #include "media/base/renderer_factory.h"
22 #include "media/base/text_track.h" 21 #include "media/base/text_track.h"
23 #include "media/blink/buffered_data_source.h" 22 #include "media/blink/buffered_data_source.h"
24 #include "media/blink/buffered_data_source_host_impl.h" 23 #include "media/blink/buffered_data_source_host_impl.h"
25 #include "media/blink/encrypted_media_player_support.h" 24 #include "media/blink/encrypted_media_player_support.h"
26 #include "media/blink/video_frame_compositor.h" 25 #include "media/blink/video_frame_compositor.h"
27 #include "media/filters/skcanvas_video_renderer.h" 26 #include "media/filters/skcanvas_video_renderer.h"
28 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" 27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h"
29 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" 28 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h"
30 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" 29 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h"
31 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" 30 #include "third_party/WebKit/public/platform/WebMediaPlayer.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 public base::SupportsWeakPtr<WebMediaPlayerImpl> { 63 public base::SupportsWeakPtr<WebMediaPlayerImpl> {
65 public: 64 public:
66 // Constructs a WebMediaPlayer implementation using Chromium's media stack. 65 // Constructs a WebMediaPlayer implementation using Chromium's media stack.
67 // |delegate| may be null. |renderer| may also be null, in which case an 66 // |delegate| may be null. |renderer| may also be null, in which case an
68 // internal renderer will be created. 67 // internal renderer will be created.
69 // TODO(xhwang): Drop the internal renderer path and always pass in a renderer 68 // TODO(xhwang): Drop the internal renderer path and always pass in a renderer
70 // here. 69 // here.
71 WebMediaPlayerImpl(blink::WebLocalFrame* frame, 70 WebMediaPlayerImpl(blink::WebLocalFrame* frame,
72 blink::WebMediaPlayerClient* client, 71 blink::WebMediaPlayerClient* client,
73 base::WeakPtr<WebMediaPlayerDelegate> delegate, 72 base::WeakPtr<WebMediaPlayerDelegate> delegate,
74 scoped_ptr<Renderer> renderer, 73 scoped_ptr<RendererFactory> renderer_factory,
75 scoped_ptr<CdmFactory> cdm_factory, 74 scoped_ptr<CdmFactory> cdm_factory,
76 const WebMediaPlayerParams& params); 75 const WebMediaPlayerParams& params);
77 virtual ~WebMediaPlayerImpl(); 76 virtual ~WebMediaPlayerImpl();
78 77
79 virtual void load(LoadType load_type, 78 virtual void load(LoadType load_type,
80 const blink::WebURL& url, 79 const blink::WebURL& url,
81 CORSMode cors_mode); 80 CORSMode cors_mode);
82 81
83 // Playback controls. 82 // Playback controls.
84 virtual void play(); 83 virtual void play();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 // Tracks whether to issue time changed notifications during buffering state 273 // Tracks whether to issue time changed notifications during buffering state
275 // changes. 274 // changes.
276 bool should_notify_time_changed_; 275 bool should_notify_time_changed_;
277 276
278 blink::WebMediaPlayerClient* client_; 277 blink::WebMediaPlayerClient* client_;
279 278
280 base::WeakPtr<WebMediaPlayerDelegate> delegate_; 279 base::WeakPtr<WebMediaPlayerDelegate> delegate_;
281 280
282 base::Callback<void(const base::Closure&)> defer_load_cb_; 281 base::Callback<void(const base::Closure&)> defer_load_cb_;
283 282
284 // Factories for supporting video accelerators. May be null.
285 scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_;
286
287 // Routes audio playback to either AudioRendererSink or WebAudio. 283 // Routes audio playback to either AudioRendererSink or WebAudio.
288 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; 284 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_;
289 285
290 bool supports_save_; 286 bool supports_save_;
291 287
292 // These two are mutually exclusive: 288 // These two are mutually exclusive:
293 // |data_source_| is used for regular resource loads. 289 // |data_source_| is used for regular resource loads.
294 // |chunk_demuxer_| is used for Media Source resource loads. 290 // |chunk_demuxer_| is used for Media Source resource loads.
295 // 291 //
296 // |demuxer_| will contain the appropriate demuxer based on which resource 292 // |demuxer_| will contain the appropriate demuxer based on which resource
(...skipping 11 matching lines...) Expand all
308 304
309 // The compositor layer for displaying the video content when using composited 305 // The compositor layer for displaying the video content when using composited
310 // playback. 306 // playback.
311 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; 307 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_;
312 308
313 // Text track objects get a unique index value when they're created. 309 // Text track objects get a unique index value when they're created.
314 int text_track_index_; 310 int text_track_index_;
315 311
316 EncryptedMediaPlayerSupport encrypted_media_support_; 312 EncryptedMediaPlayerSupport encrypted_media_support_;
317 313
318 const AudioHardwareConfig& audio_hardware_config_; 314 scoped_ptr<RendererFactory> renderer_factory_;
319
320 scoped_ptr<Renderer> renderer_;
321 315
322 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); 316 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl);
323 }; 317 };
324 318
325 } // namespace media 319 } // namespace media
326 320
327 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ 321 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_
OLDNEW
« no previous file with comments | « media/base/renderer_factory.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698