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" |
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 | 48 |
48 class AudioHardwareConfig; | 49 class AudioHardwareConfig; |
49 class ChunkDemuxer; | 50 class ChunkDemuxer; |
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 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 base::Callback<void(const base::Closure&)> defer_load_cb_; | 281 WebMediaPlayerParams::DeferLoadCB defer_load_cb_; |
| 282 WebMediaPlayerParams::Context3DCB context_3d_cb_; |
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: |
289 // |data_source_| is used for regular resource loads. | 290 // |data_source_| is used for regular resource loads. |
290 // |chunk_demuxer_| is used for Media Source resource loads. | 291 // |chunk_demuxer_| is used for Media Source resource loads. |
291 // | 292 // |
(...skipping 17 matching lines...) Expand all Loading... |
309 EncryptedMediaPlayerSupport encrypted_media_support_; | 310 EncryptedMediaPlayerSupport encrypted_media_support_; |
310 | 311 |
311 scoped_ptr<RendererFactory> renderer_factory_; | 312 scoped_ptr<RendererFactory> renderer_factory_; |
312 | 313 |
313 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 314 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
314 }; | 315 }; |
315 | 316 |
316 } // namespace media | 317 } // namespace media |
317 | 318 |
318 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 319 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |