Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10167)

Unified Diff: chromecast/media/cma/backend/video_pipeline_device.h

Issue 622853002: Chromecast: adds interfaces for hardware layer of CMA pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cma-decrypt-context
Patch Set: damien comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromecast/media/cma/backend/video_pipeline_device.h
diff --git a/chromecast/media/cma/backend/video_pipeline_device.h b/chromecast/media/cma/backend/video_pipeline_device.h
new file mode 100644
index 0000000000000000000000000000000000000000..eda48e206f46f83157e465cb8116740e4bbc17cf
--- /dev/null
+++ b/chromecast/media/cma/backend/video_pipeline_device.h
@@ -0,0 +1,63 @@
+// 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_VIDEO_PIPELINE_DEVICE_H_
+#define CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "chromecast/media/cma/backend/media_component_device.h"
+
+namespace gfx {
+class Size;
+}
+
+namespace media {
+class VideoDecoderConfig;
+}
+
+namespace chromecast {
+namespace media {
+class DecoderBufferBase;
+
+// VideoPipelineDevice -
+//
+// Notes:
+// - Like a regular MediaComponentDevice, frames are possibly rendered only
+// in the kRunning state.
+// However, the first frame must be rendered regardless of the clock state:
+// - no synchronization needed to display the first frame,
+// - the clock rate has no impact on the presentation of the first frame.
+//
+class VideoPipelineDevice : public MediaComponentDevice {
+ public:
+ struct VideoClient {
+ VideoClient();
+ ~VideoClient();
+
+ // Invoked each time the natural size is updated.
+ base::Callback<void(const gfx::Size& natural_size)>
+ natural_size_changed_cb;
+ };
+
+ VideoPipelineDevice();
+ virtual ~VideoPipelineDevice();
+
+ // Registers |client| as the video specific event handler.
+ virtual void SetVideoClient(const VideoClient& client) = 0;
+
+ // Provide the video configuration.
+ // Must be called before switching from |kStateUninitialized| to |kStateIdle|.
+ // Afterwards, this can be invoked any time the configuration changes.
+ // Returns true if the configuration is a supported configuration.
+ virtual bool SetConfig(const ::media::VideoDecoderConfig& config) = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(VideoPipelineDevice);
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_BACKEND_VIDEO_PIPELINE_DEVICE_H_
« no previous file with comments | « chromecast/media/cma/backend/media_pipeline_device_params.cc ('k') | chromecast/media/cma/backend/video_pipeline_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698