1 // Copyright 2015 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 CHROMECAST_RENDERER_MEDIA_CHROMECAST_MEDIA_RENDERER_FACTORY_H_
6 #define CHROMECAST_RENDERER_MEDIA_CHROMECAST_MEDIA_RENDERER_FACTORY_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "media/base/renderer_factory.h"
13 class AudioHardwareConfig
;
14 class GpuVideoAcceleratorFactories
;
16 class DefaultRendererFactory
;
19 namespace chromecast
{
22 class ChromecastMediaRendererFactory
: public ::media::RendererFactory
{
24 ChromecastMediaRendererFactory(
25 const scoped_refptr
<::media::GpuVideoAcceleratorFactories
>& gpu_factories
,
26 const scoped_refptr
<::media::MediaLog
>& media_log
,
28 ~ChromecastMediaRendererFactory() final
;
30 // ::media::RendererFactory implementation.
31 scoped_ptr
<::media::Renderer
> CreateRenderer(
32 const scoped_refptr
<base::SingleThreadTaskRunner
>& media_task_runner
,
33 const scoped_refptr
<base::TaskRunner
>& worker_task_runner
,
34 ::media::AudioRendererSink
* audio_renderer_sink
,
35 ::media::VideoRendererSink
* video_renderer_sink
) final
;
39 scoped_refptr
<::media::GpuVideoAcceleratorFactories
> gpu_factories_
;
40 scoped_refptr
<::media::MediaLog
> media_log_
;
41 scoped_ptr
<::media::DefaultRendererFactory
> default_render_factory_
;
43 // Audio config for the default media renderer.
44 scoped_ptr
<::media::AudioHardwareConfig
> audio_config_
;
46 DISALLOW_COPY_AND_ASSIGN(ChromecastMediaRendererFactory
);
50 } // namespace chromecast
52 #endif // CHROMECAST_RENDERER_MEDIA_CHROMECAST_MEDIA_RENDERER_FACTORY_H_