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
3 // found in the LICENSE file.
5 #ifndef WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
6 #define WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_
8 #include "base/memory/ref_counted.h"
9 #include "media/filters/gpu_video_decoder.h"
12 class AudioRendererSink
;
16 namespace webkit_media
{
18 // Holds parameters for constructing WebMediaPlayerImpl without having
19 // to plumb arguments through various abstraction layers.
20 class WebMediaPlayerParams
{
22 // |media_log| is the only required parameter; all others may be null.
24 const scoped_refptr
<media::AudioRendererSink
>& audio_renderer_sink
,
25 const scoped_refptr
<media::GpuVideoDecoder::Factories
>& gpu_factories
,
26 const scoped_refptr
<media::MediaLog
>& media_log
);
27 ~WebMediaPlayerParams();
29 const scoped_refptr
<media::AudioRendererSink
>& audio_renderer_sink() const {
30 return audio_renderer_sink_
;
33 const scoped_refptr
<media::GpuVideoDecoder::Factories
>&
34 gpu_factories() const {
35 return gpu_factories_
;
38 const scoped_refptr
<media::MediaLog
>& media_log() const {
43 scoped_refptr
<media::AudioRendererSink
> audio_renderer_sink_
;
44 scoped_refptr
<media::GpuVideoDecoder::Factories
> gpu_factories_
;
45 scoped_refptr
<media::MediaLog
> media_log_
;
47 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams
);
52 #endif // WEBKIT_MEDIA_WEBMEDIAPLAYER_PARAMS_H_