OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 6 #define WEBKIT_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 media { | 11 namespace media { |
12 class AudioRendererSink; | 12 class AudioRendererSink; |
13 class MediaLog; | 13 class MediaLog; |
14 } | 14 } |
15 | 15 |
16 namespace webkit_media { | 16 namespace webkit_media { |
17 | 17 |
18 class MediaStreamClient; | 18 class MediaStreamClient; |
wjia(left Chromium)
2013/02/27 02:43:54
nit: remove this line.
wuchengli
2013/02/27 21:37:41
Done.
| |
19 | 19 |
20 // Holds parameters for constructing WebMediaPlayerImpl without having | 20 // Holds parameters for constructing WebMediaPlayerImpl without having |
21 // to plumb arguments through various abstraction layers. | 21 // to plumb arguments through various abstraction layers. |
22 class WebMediaPlayerParams { | 22 class WebMediaPlayerParams { |
23 public: | 23 public: |
24 // |media_log| is the only required parameter; all others may be null. | 24 // |media_log| is the only required parameter; all others may be null. |
25 WebMediaPlayerParams( | 25 WebMediaPlayerParams( |
26 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink, | 26 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink, |
27 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories, | 27 const scoped_refptr<media::GpuVideoDecoder::Factories>& gpu_factories, |
28 MediaStreamClient* media_stream_client, | |
29 const scoped_refptr<media::MediaLog>& media_log); | 28 const scoped_refptr<media::MediaLog>& media_log); |
30 ~WebMediaPlayerParams(); | 29 ~WebMediaPlayerParams(); |
31 | 30 |
32 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const { | 31 const scoped_refptr<media::AudioRendererSink>& audio_renderer_sink() const { |
33 return audio_renderer_sink_; | 32 return audio_renderer_sink_; |
34 } | 33 } |
35 | 34 |
36 const scoped_refptr<media::GpuVideoDecoder::Factories>& | 35 const scoped_refptr<media::GpuVideoDecoder::Factories>& |
37 gpu_factories() const { | 36 gpu_factories() const { |
38 return gpu_factories_; | 37 return gpu_factories_; |
39 } | 38 } |
40 | 39 |
41 MediaStreamClient* media_stream_client() const { | |
42 return media_stream_client_; | |
43 } | |
44 | |
45 const scoped_refptr<media::MediaLog>& media_log() const { | 40 const scoped_refptr<media::MediaLog>& media_log() const { |
46 return media_log_; | 41 return media_log_; |
47 } | 42 } |
48 | 43 |
49 private: | 44 private: |
50 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_; | 45 scoped_refptr<media::AudioRendererSink> audio_renderer_sink_; |
51 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; | 46 scoped_refptr<media::GpuVideoDecoder::Factories> gpu_factories_; |
52 MediaStreamClient* media_stream_client_; | |
53 scoped_refptr<media::MediaLog> media_log_; | 47 scoped_refptr<media::MediaLog> media_log_; |
54 | 48 |
55 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); | 49 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); |
56 }; | 50 }; |
57 | 51 |
58 } // namespace media | 52 } // namespace media |
59 | 53 |
60 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ | 54 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_ |
OLD | NEW |