OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_H_ | |
6 #define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 | |
11 namespace chromecast { | |
12 namespace media { | |
13 class AudioPipelineDevice; | |
14 class MediaClockDevice; | |
15 class VideoPipelineDevice; | |
16 | |
17 // MediaPipelineDevice is the owner of the underlying audio/video/clock | |
18 // devices. | |
19 class MediaPipelineDevice { | |
20 public: | |
21 struct CreateParameters { | |
damienv1
2014/10/03 22:19:42
I would rather have sth like: MediaPipelineDeviceP
gunsch
2014/10/03 23:08:44
Done.
| |
22 CreateParameters(); | |
23 ~CreateParameters(); | |
24 | |
25 // When set to true, synchronization is disabled and audio/video frames are | |
26 // rendered "right away": | |
27 // - for audio, frames are still rendered based on the sampling frequency | |
28 // - for video, frames are rendered as soon as available at the output of | |
29 // the video decoder. | |
30 // The assumption is that no B frames are used when synchronization is | |
31 // disabled, otherwise B frames would always be skipped. | |
32 bool disable_synchronization; | |
33 }; | |
34 | |
35 MediaPipelineDevice(); | |
36 virtual ~MediaPipelineDevice(); | |
37 | |
38 virtual AudioPipelineDevice* GetAudioPipelineDevice() const = 0; | |
39 | |
40 virtual VideoPipelineDevice* GetVideoPipelineDevice() const = 0; | |
41 | |
42 virtual MediaClockDevice* GetMediaClockDevice() const = 0; | |
43 | |
44 private: | |
45 DISALLOW_COPY_AND_ASSIGN(MediaPipelineDevice); | |
46 }; | |
47 | |
48 // Factory to create a MediaPipelineDevice. | |
49 scoped_ptr<MediaPipelineDevice> CreateMediaPipelineDevice( | |
50 const MediaPipelineDevice::CreateParameters& params); | |
51 | |
52 } // namespace media | |
53 } // namespace chromecast | |
54 | |
55 #endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_H_ | |
OLD | NEW |