ozone: evdev: Sync caps lock LED state to evdev
[chromium-blink-merge.git] / chromecast / renderer / media / cma_media_renderer_factory.cc
blob2a3814939d0830128afa088d068576a4fc9039ed
1 // Copyright 2014 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 #include "chromecast/renderer/media/cma_media_renderer_factory.h"
7 #include "base/command_line.h"
8 #include "chromecast/media/cma/filters/cma_renderer.h"
9 #include "chromecast/renderer/media/media_pipeline_proxy.h"
10 #include "content/public/renderer/render_thread.h"
12 namespace chromecast {
13 namespace media {
15 CmaMediaRendererFactory::CmaMediaRendererFactory(int render_frame_id)
16 : render_frame_id_(render_frame_id) {
19 CmaMediaRendererFactory::~CmaMediaRendererFactory() {
22 scoped_ptr< ::media::Renderer> CmaMediaRendererFactory::CreateRenderer(
23 const scoped_refptr<base::SingleThreadTaskRunner>& media_task_runner,
24 ::media::AudioRendererSink* audio_renderer_sink) {
25 // TODO(erickung): crbug.com/443956. Need to provide right LoadType.
26 LoadType cma_load_type = kLoadTypeMediaSource;
27 scoped_ptr<MediaPipeline> cma_media_pipeline(
28 new MediaPipelineProxy(
29 render_frame_id_,
30 content::RenderThread::Get()->GetIOMessageLoopProxy(),
31 cma_load_type));
32 return scoped_ptr< ::media::Renderer>(
33 new CmaRenderer(cma_media_pipeline.Pass()));
36 } // namespace media
37 } // namespace chromecast