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 WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 5 #ifndef WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
6 #define WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 6 #define WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "media/filters/gpu_video_decoder.h" | 9 #include "media/filters/gpu_video_decoder.h" |
10 | 10 |
11 namespace base { | 11 namespace base { |
12 class MessageLoopProxy; | 12 class MessageLoopProxy; |
13 } | 13 } |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 class AudioRendererSink; | 16 class AudioRendererSink; |
17 class MediaLog; | 17 class MediaLog; |
18 } | 18 } |
19 | 19 |
20 namespace webkit_media { | 20 namespace webkit_media { |
| 21 class MediaLoadDelegate; |
21 | 22 |
22 // Holds parameters for constructing WebMediaPlayerImpl without having | 23 // Holds parameters for constructing WebMediaPlayerImpl without having |
23 // to plumb arguments through various abstraction layers. | 24 // to plumb arguments through various abstraction layers. |
24 class WebMediaPlayerParams { | 25 class WebMediaPlayerParams { |
25 public: | 26 public: |
26 // |message_loop_proxy| and |media_log| are the only required parameters; | 27 // |message_loop_proxy| and |media_log| are the only required parameters; |
27 // all others may be null. | 28 // all others may be null. |
28 WebMediaPlayerParams( | 29 WebMediaPlayerParams( |
29 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy, | 30 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy, |
| 31 MediaLoadDelegate* load_delegate, |
30 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink, | 32 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink, |
31 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories, | 33 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories, |
32 const scoped_refptr<media::MediaLog>& media_log); | 34 const scoped_refptr<media::MediaLog>& media_log); |
33 ~WebMediaPlayerParams(); | 35 ~WebMediaPlayerParams(); |
34 | 36 |
35 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy() const { | 37 const scoped_refptr<base::MessageLoopProxy>& message_loop_proxy() const { |
36 return message_loop_proxy_; | 38 return message_loop_proxy_; |
37 } | 39 } |
38 | 40 |
| 41 MediaLoadDelegate* load_delegate() const { return load_delegate_; } |
| 42 |
39 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const { | 43 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const { |
40 return audio_renderer_sink_; | 44 return audio_renderer_sink_; |
41 } | 45 } |
42 | 46 |
43 const scoped_refptr<media::GpuVideoDecoder::Factories>& | 47 const scoped_refptr<media::GpuVideoDecoder::Factories>& |
44 gpu_factories() const { | 48 gpu_factories() const { |
45 return gpu_factories_; | 49 return gpu_factories_; |
46 } | 50 } |
47 | 51 |
48 const scoped_refptr<media::MediaLog>& media_log() const { | 52 const scoped_refptr<media::MediaLog>& media_log() const { |
49 return media_log_; | 53 return media_log_; |
50 } | 54 } |
51 | 55 |
52 private: | 56 private: |
53 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 57 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 58 MediaLoadDelegate* load_delegate_; |
54 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_; | 59 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_; |
55 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; | 60 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; |
56 scoped_refptr<media::MediaLog> media_log_; | 61 scoped_refptr<media::MediaLog> media_log_; |
57 | 62 |
58 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); | 63 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); |
59 }; | 64 }; |
60 | 65 |
61 } // namespace media | 66 } // namespace media |
62 | 67 |
63 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 68 #endif // WEBKIT_RENDERER_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
OLD | NEW |