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/cdm_factory.h" | 18 #include "media/base/cdm_factory.h" |
19 #include "media/base/media_export.h" | 19 #include "media/base/media_export.h" |
20 #include "media/base/pipeline.h" | 20 #include "media/base/pipeline.h" |
21 #include "media/base/renderer.h" | 21 #include "media/base/renderer.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/encrypted_media_player_support.h" | 25 #include "media/blink/encrypted_media_player_support.h" |
26 #include "media/blink/video_frame_compositor.h" | 26 #include "media/blink/video_frame_compositor.h" |
| 27 #include "media/blink/webmediaplayer_params.h" |
27 #include "media/filters/skcanvas_video_renderer.h" | 28 #include "media/filters/skcanvas_video_renderer.h" |
28 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" | 29 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" |
29 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 30 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
30 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | |
31 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 31 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
32 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" | 32 #include "third_party/WebKit/public/platform/WebMediaPlayerClient.h" |
33 #include "url/gurl.h" | 33 #include "url/gurl.h" |
34 | 34 |
35 namespace blink { | 35 namespace blink { |
| 36 class WebGraphicsContext3D; |
36 class WebLocalFrame; | 37 class WebLocalFrame; |
37 } | 38 } |
38 | 39 |
39 namespace base { | 40 namespace base { |
40 class SingleThreadTaskRunner; | 41 class SingleThreadTaskRunner; |
41 } | 42 } |
42 | 43 |
43 namespace cc_blink { | 44 namespace cc_blink { |
44 class WebLayerImpl; | 45 class WebLayerImpl; |
45 } | 46 } |
46 | 47 |
47 namespace media { | 48 namespace media { |
48 | 49 |
49 class AudioHardwareConfig; | 50 class AudioHardwareConfig; |
50 class ChunkDemuxer; | 51 class ChunkDemuxer; |
51 class GpuVideoAcceleratorFactories; | 52 class GpuVideoAcceleratorFactories; |
52 class MediaLog; | 53 class MediaLog; |
53 class VideoFrameCompositor; | 54 class VideoFrameCompositor; |
54 class WebAudioSourceProviderImpl; | 55 class WebAudioSourceProviderImpl; |
55 class WebMediaPlayerDelegate; | 56 class WebMediaPlayerDelegate; |
56 class WebMediaPlayerParams; | |
57 class WebTextTrackImpl; | 57 class WebTextTrackImpl; |
58 | 58 |
59 // The canonical implementation of blink::WebMediaPlayer that's backed by | 59 // The canonical implementation of blink::WebMediaPlayer that's backed by |
60 // Pipeline. Handles normal resource loading, Media Source, and | 60 // Pipeline. Handles normal resource loading, Media Source, and |
61 // Encrypted Media. | 61 // Encrypted Media. |
62 class MEDIA_EXPORT WebMediaPlayerImpl | 62 class MEDIA_EXPORT WebMediaPlayerImpl |
63 : public NON_EXPORTED_BASE(blink::WebMediaPlayer), | 63 : public NON_EXPORTED_BASE(blink::WebMediaPlayer), |
64 public base::SupportsWeakPtr<WebMediaPlayerImpl> { | 64 public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
65 public: | 65 public: |
66 // Constructs a WebMediaPlayer implementation using Chromium's media stack. | 66 // Constructs a WebMediaPlayer implementation using Chromium's media stack. |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 double pending_seek_seconds_; | 268 double pending_seek_seconds_; |
269 | 269 |
270 // Tracks whether to issue time changed notifications during buffering state | 270 // Tracks whether to issue time changed notifications during buffering state |
271 // changes. | 271 // changes. |
272 bool should_notify_time_changed_; | 272 bool should_notify_time_changed_; |
273 | 273 |
274 blink::WebMediaPlayerClient* client_; | 274 blink::WebMediaPlayerClient* client_; |
275 | 275 |
276 base::WeakPtr<WebMediaPlayerDelegate> delegate_; | 276 base::WeakPtr<WebMediaPlayerDelegate> delegate_; |
277 | 277 |
278 base::Callback<void(const base::Closure&)> defer_load_cb_; | 278 WebMediaPlayerParams::DeferLoadCB defer_load_cb_; |
| 279 WebMediaPlayerParams::Context3DCB context_3d_cb_; |
279 | 280 |
280 // Factories for supporting video accelerators. May be null. | 281 // Factories for supporting video accelerators. May be null. |
281 scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_; | 282 scoped_refptr<GpuVideoAcceleratorFactories> gpu_factories_; |
282 | 283 |
283 // Routes audio playback to either AudioRendererSink or WebAudio. | 284 // Routes audio playback to either AudioRendererSink or WebAudio. |
284 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; | 285 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; |
285 | 286 |
286 bool supports_save_; | 287 bool supports_save_; |
287 | 288 |
288 // These two are mutually exclusive: | 289 // These two are mutually exclusive: |
(...skipping 25 matching lines...) Expand all Loading... |
314 const AudioHardwareConfig& audio_hardware_config_; | 315 const AudioHardwareConfig& audio_hardware_config_; |
315 | 316 |
316 scoped_ptr<Renderer> renderer_; | 317 scoped_ptr<Renderer> renderer_; |
317 | 318 |
318 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 319 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
319 }; | 320 }; |
320 | 321 |
321 } // namespace media | 322 } // namespace media |
322 | 323 |
323 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 324 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |