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 CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 namespace base { | 36 namespace base { |
37 class SingleThreadTaskRunner; | 37 class SingleThreadTaskRunner; |
38 } | 38 } |
39 | 39 |
40 namespace cc_blink { | 40 namespace cc_blink { |
41 class WebLayerImpl; | 41 class WebLayerImpl; |
42 } | 42 } |
43 | 43 |
44 namespace media { | 44 namespace media { |
| 45 class AudioHardwareConfig; |
45 class ChunkDemuxer; | 46 class ChunkDemuxer; |
46 class GpuVideoAcceleratorFactories; | 47 class GpuVideoAcceleratorFactories; |
47 class MediaLog; | 48 class MediaLog; |
48 } | 49 } |
49 | 50 |
50 | 51 |
51 namespace content { | 52 namespace content { |
52 class BufferedDataSource; | 53 class BufferedDataSource; |
53 class EncryptedMediaPlayerSupport; | 54 class EncryptedMediaPlayerSupport; |
54 class VideoFrameCompositor; | 55 class VideoFrameCompositor; |
55 class WebAudioSourceProviderImpl; | 56 class WebAudioSourceProviderImpl; |
56 class WebMediaPlayerDelegate; | 57 class WebMediaPlayerDelegate; |
57 class WebMediaPlayerParams; | 58 class WebMediaPlayerParams; |
58 class WebTextTrackImpl; | 59 class WebTextTrackImpl; |
59 | 60 |
60 // The canonical implementation of blink::WebMediaPlayer that's backed by | 61 // The canonical implementation of blink::WebMediaPlayer that's backed by |
61 // media::Pipeline. Handles normal resource loading, Media Source, and | 62 // media::Pipeline. Handles normal resource loading, Media Source, and |
62 // Encrypted Media. | 63 // Encrypted Media. |
63 class WebMediaPlayerImpl | 64 class WebMediaPlayerImpl |
64 : public blink::WebMediaPlayer, | 65 : public blink::WebMediaPlayer, |
65 public base::SupportsWeakPtr<WebMediaPlayerImpl> { | 66 public base::SupportsWeakPtr<WebMediaPlayerImpl> { |
66 public: | 67 public: |
67 // Constructs a WebMediaPlayer implementation using Chromium's media stack. | 68 // Constructs a WebMediaPlayer implementation using Chromium's media stack. |
68 // |delegate| may be null. | 69 // |delegate| may be null. |
69 WebMediaPlayerImpl(blink::WebLocalFrame* frame, | 70 WebMediaPlayerImpl(blink::WebLocalFrame* frame, |
70 blink::WebMediaPlayerClient* client, | 71 blink::WebMediaPlayerClient* client, |
71 base::WeakPtr<WebMediaPlayerDelegate> delegate, | 72 base::WeakPtr<WebMediaPlayerDelegate> delegate, |
72 const WebMediaPlayerParams& params); | 73 scoped_ptr<WebMediaPlayerParams> params); |
73 virtual ~WebMediaPlayerImpl(); | 74 virtual ~WebMediaPlayerImpl(); |
74 | 75 |
75 virtual void load(LoadType load_type, | 76 virtual void load(LoadType load_type, |
76 const blink::WebURL& url, | 77 const blink::WebURL& url, |
77 CORSMode cors_mode); | 78 CORSMode cors_mode); |
78 | 79 |
79 // Playback controls. | 80 // Playback controls. |
80 virtual void play(); | 81 virtual void play(); |
81 virtual void pause(); | 82 virtual void pause(); |
82 virtual bool supportsSave() const; | 83 virtual bool supportsSave() const; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 307 |
307 // The compositor layer for displaying the video content when using composited | 308 // The compositor layer for displaying the video content when using composited |
308 // playback. | 309 // playback. |
309 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; | 310 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; |
310 | 311 |
311 // Text track objects get a unique index value when they're created. | 312 // Text track objects get a unique index value when they're created. |
312 int text_track_index_; | 313 int text_track_index_; |
313 | 314 |
314 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support_; | 315 scoped_ptr<EncryptedMediaPlayerSupport> encrypted_media_support_; |
315 | 316 |
| 317 const media::AudioHardwareConfig* const audio_hardware_config_; |
| 318 |
316 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 319 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
317 }; | 320 }; |
318 | 321 |
319 } // namespace content | 322 } // namespace content |
320 | 323 |
321 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ | 324 #endif // CONTENT_RENDERER_MEDIA_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |