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 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 #include "media/base/pipeline.h" | 19 #include "media/base/pipeline.h" |
20 #include "media/base/renderer.h" | 20 #include "media/base/renderer.h" |
21 #include "media/base/text_track.h" | 21 #include "media/base/text_track.h" |
22 #include "media/blink/buffered_data_source.h" | 22 #include "media/blink/buffered_data_source.h" |
23 #include "media/blink/buffered_data_source_host_impl.h" | 23 #include "media/blink/buffered_data_source_host_impl.h" |
24 #include "media/blink/video_frame_compositor.h" | 24 #include "media/blink/video_frame_compositor.h" |
| 25 #include "media/blink/webmediaplayer_params.h" |
25 #include "media/filters/skcanvas_video_renderer.h" | 26 #include "media/filters/skcanvas_video_renderer.h" |
26 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" | 27 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" |
27 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 28 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
28 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | |
29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 29 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
30 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" | 30 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" |
31 #include "url/gurl.h" | 31 #include "url/gurl.h" |
32 | 32 |
33 namespace blink { | 33 namespace blink { |
| 34 class WebGraphicsContext3D; |
34 class WebLocalFrame; | 35 class WebLocalFrame; |
35 } | 36 } |
36 | 37 |
37 namespace base { | 38 namespace base { |
38 class SingleThreadTaskRunner; | 39 class SingleThreadTaskRunner; |
39 } | 40 } |
40 | 41 |
41 namespace cc_blink { | 42 namespace cc_blink { |
42 class WebLayerImpl; | 43 class WebLayerImpl; |
43 } | 44 } |
44 | 45 |
45 namespace media { | 46 namespace media { |
46 | 47 |
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 Loading... |
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::Context3DProviderCB context_3d_provider_cb_; |
275 | 276 |
276 // Factories for supporting video accelerators. May be null. | 277 // Factories for supporting video accelerators. May be null. |
277 scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_; | 278 scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_; |
278 | 279 |
279 // Routes audio playback to either AudioRendererSink or WebAudio. | 280 // Routes audio playback to either AudioRendererSink or WebAudio. |
280 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; | 281 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; |
281 | 282 |
282 bool supports_save_; | 283 bool supports_save_; |
283 | 284 |
284 // These two are mutually exclusive: | 285 // These two are mutually exclusive: |
(...skipping 25 matching lines...) Expand all Loading... |
310 const AudioHardwareConfig& audio_hardware_config_; | 311 const AudioHardwareConfig& audio_hardware_config_; |
311 | 312 |
312 scoped_ptr<Renderer> renderer_; | 313 scoped_ptr<Renderer> renderer_; |
313 | 314 |
314 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 315 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
315 }; | 316 }; |
316 | 317 |
317 } // namespace media | 318 } // namespace media |
318 | 319 |
319 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 320 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |