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/media/cma/backend/media_pipeline_device.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/media_pipeline_device_factory.h"
10 #include "chromecast/media/cma/backend/video_pipeline_device_default.h"
12 namespace chromecast
{
15 MediaPipelineDevice::MediaPipelineDevice(
16 scoped_ptr
<MediaPipelineDeviceFactory
> factory
)
17 : media_clock_device_(factory
->CreateMediaClockDevice()),
18 audio_pipeline_device_(factory
->CreateAudioPipelineDevice()),
19 video_pipeline_device_(factory
->CreateVideoPipelineDevice()) {
22 MediaPipelineDevice::MediaPipelineDevice(
23 scoped_ptr
<MediaClockDevice
> media_clock_device
,
24 scoped_ptr
<AudioPipelineDevice
> audio_pipeline_device
,
25 scoped_ptr
<VideoPipelineDevice
> video_pipeline_device
)
26 : media_clock_device_(media_clock_device
.Pass()),
27 audio_pipeline_device_(audio_pipeline_device
.Pass()),
28 video_pipeline_device_(video_pipeline_device
.Pass()) {
31 MediaPipelineDevice::~MediaPipelineDevice() {
35 } // namespace chromecast