Roll src/third_party/WebKit d9c6159:8139f33 (svn 201974:201975)
[chromium-blink-merge.git] / chromecast / media / cma / backend / media_pipeline_backend_default.cc
blob498c5be257b58ad781fdf6a94cc97ae6d8e0cc80
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 #include "chromecast/media/cma/backend/media_pipeline_backend_default.h"
7 #include "chromecast/media/cma/backend/audio_pipeline_device_default.h"
8 #include "chromecast/media/cma/backend/media_clock_device_default.h"
9 #include "chromecast/media/cma/backend/video_pipeline_device_default.h"
11 namespace chromecast {
12 namespace media {
14 MediaPipelineBackendDefault::MediaPipelineBackendDefault(
15 const MediaPipelineDeviceParams& params)
16 : params_(params) {}
18 MediaPipelineBackendDefault::~MediaPipelineBackendDefault() {}
20 MediaClockDevice* MediaPipelineBackendDefault::GetClock() {
21 if (!clock_)
22 clock_.reset(new MediaClockDeviceDefault());
23 return clock_.get();
26 AudioPipelineDevice* MediaPipelineBackendDefault::GetAudio() {
27 if (!audio_)
28 audio_.reset(new AudioPipelineDeviceDefault(params_, GetClock()));
29 return audio_.get();
32 VideoPipelineDevice* MediaPipelineBackendDefault::GetVideo() {
33 if (!video_)
34 video_.reset(new VideoPipelineDeviceDefault(params_, GetClock()));
35 return video_.get();
38 } // namespace media
39 } // namespace chromecast