Index: chromecast/media/cma/backend/media_pipeline_device.h |
diff --git a/chromecast/media/cma/backend/media_pipeline_device.h b/chromecast/media/cma/backend/media_pipeline_device.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b2abd9425da5146e548b25f29c07f16c5148a46a |
--- /dev/null |
+++ b/chromecast/media/cma/backend/media_pipeline_device.h |
@@ -0,0 +1,55 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_H_ |
+#define CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/scoped_ptr.h" |
+ |
+namespace chromecast { |
+namespace media { |
+class AudioPipelineDevice; |
+class MediaClockDevice; |
+class VideoPipelineDevice; |
+ |
+// MediaPipelineDevice is the owner of the underlying audio/video/clock |
+// devices. |
+class MediaPipelineDevice { |
+ public: |
+ struct CreateParameters { |
damienv1
2014/10/03 22:19:42
I would rather have sth like: MediaPipelineDeviceP
gunsch
2014/10/03 23:08:44
Done.
|
+ CreateParameters(); |
+ ~CreateParameters(); |
+ |
+ // When set to true, synchronization is disabled and audio/video frames are |
+ // rendered "right away": |
+ // - for audio, frames are still rendered based on the sampling frequency |
+ // - for video, frames are rendered as soon as available at the output of |
+ // the video decoder. |
+ // The assumption is that no B frames are used when synchronization is |
+ // disabled, otherwise B frames would always be skipped. |
+ bool disable_synchronization; |
+ }; |
+ |
+ MediaPipelineDevice(); |
+ virtual ~MediaPipelineDevice(); |
+ |
+ virtual AudioPipelineDevice* GetAudioPipelineDevice() const = 0; |
+ |
+ virtual VideoPipelineDevice* GetVideoPipelineDevice() const = 0; |
+ |
+ virtual MediaClockDevice* GetMediaClockDevice() const = 0; |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(MediaPipelineDevice); |
+}; |
+ |
+// Factory to create a MediaPipelineDevice. |
+scoped_ptr<MediaPipelineDevice> CreateMediaPipelineDevice( |
+ const MediaPipelineDevice::CreateParameters& params); |
+ |
+} // namespace media |
+} // namespace chromecast |
+ |
+#endif // CHROMECAST_MEDIA_CMA_BACKEND_MEDIA_PIPELINE_DEVICE_H_ |