Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chromecast / renderer / media / chromecast_media_renderer_factory.h
blobd4da512735009635e0e489acd30dccc8d39c49fa
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"
12 namespace media {
13 class AudioHardwareConfig;
14 class GpuVideoAcceleratorFactories;
15 class MediaLog;
16 class DefaultRendererFactory;
19 namespace chromecast {
20 namespace media {
22 class ChromecastMediaRendererFactory : public ::media::RendererFactory {
23 public:
24 ChromecastMediaRendererFactory(
25 const scoped_refptr<::media::GpuVideoAcceleratorFactories>& gpu_factories,
26 const scoped_refptr<::media::MediaLog>& media_log,
27 int render_frame_id);
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;
37 private:
38 int render_frame_id_;
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);
49 } // namespace media
50 } // namespace chromecast
52 #endif // CHROMECAST_RENDERER_MEDIA_CHROMECAST_MEDIA_RENDERER_FACTORY_H_