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/cdm_factory.h" | 17 #include "media/base/cdm_factory.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_factory.h" | 20 #include "media/base/renderer_factory.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/encrypted_media_player_support.h" | 24 #include "media/blink/encrypted_media_player_support.h" |
25 #include "media/blink/video_frame_compositor.h" | 25 #include "media/blink/video_frame_compositor.h" |
26 #include "media/blink/webmediaplayer_params.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" |
| 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; | |
36 class WebLocalFrame; | 35 class WebLocalFrame; |
37 } | 36 } |
38 | 37 |
39 namespace base { | 38 namespace base { |
40 class SingleThreadTaskRunner; | 39 class SingleThreadTaskRunner; |
41 } | 40 } |
42 | 41 |
43 namespace cc_blink { | 42 namespace cc_blink { |
44 class WebLayerImpl; | 43 class WebLayerImpl; |
45 } | 44 } |
46 | 45 |
47 namespace media { | 46 namespace media { |
48 | 47 |
49 class AudioHardwareConfig; | 48 class AudioHardwareConfig; |
50 class ChunkDemuxer; | 49 class ChunkDemuxer; |
51 class GpuVideoAcceleratorFactories; | 50 class GpuVideoAcceleratorFactories; |
52 class MediaLog; | 51 class MediaLog; |
53 class VideoFrameCompositor; | 52 class VideoFrameCompositor; |
54 class WebAudioSourceProviderImpl; | 53 class WebAudioSourceProviderImpl; |
55 class WebMediaPlayerDelegate; | 54 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 double pending_seek_seconds_; | 271 double pending_seek_seconds_; |
272 | 272 |
273 // Tracks whether to issue time changed notifications during buffering state | 273 // Tracks whether to issue time changed notifications during buffering state |
274 // changes. | 274 // changes. |
275 bool should_notify_time_changed_; | 275 bool should_notify_time_changed_; |
276 | 276 |
277 blink::WebMediaPlayerClient* client_; | 277 blink::WebMediaPlayerClient* client_; |
278 | 278 |
279 base::WeakPtr<WebMediaPlayerDelegate> delegate_; | 279 base::WeakPtr<WebMediaPlayerDelegate> delegate_; |
280 | 280 |
281 WebMediaPlayerParams::DeferLoadCB defer_load_cb_; | 281 base::Callback<void(const base::Closure&)> defer_load_cb_; |
282 WebMediaPlayerParams::Context3DCB context_3d_cb_; | |
283 | 282 |
284 // Routes audio playback to either AudioRendererSink or WebAudio. | 283 // Routes audio playback to either AudioRendererSink or WebAudio. |
285 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; | 284 scoped_refptr<WebAudioSourceProviderImpl> audio_source_provider_; |
286 | 285 |
287 bool supports_save_; | 286 bool supports_save_; |
288 | 287 |
289 // These two are mutually exclusive: | 288 // These two are mutually exclusive: |
290 // |data_source_| is used for regular resource loads. | 289 // |data_source_| is used for regular resource loads. |
291 // |chunk_demuxer_| is used for Media Source resource loads. | 290 // |chunk_demuxer_| is used for Media Source resource loads. |
292 // | 291 // |
(...skipping 17 matching lines...) Expand all Loading... |
310 EncryptedMediaPlayerSupport encrypted_media_support_; | 309 EncryptedMediaPlayerSupport encrypted_media_support_; |
311 | 310 |
312 scoped_ptr<RendererFactory> renderer_factory_; | 311 scoped_ptr<RendererFactory> renderer_factory_; |
313 | 312 |
314 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 313 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
315 }; | 314 }; |
316 | 315 |
317 } // namespace media | 316 } // namespace media |
318 | 317 |
319 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 318 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |