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

Unified Diff: ppapi/c/ppb_video_frame.h

Issue 107083004: [PPAPI] API definition for video media stream artifacts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Update Created 7 years 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: ppapi/c/ppb_video_frame.h
diff --git a/ppapi/c/ppb_video_frame.h b/ppapi/c/ppb_video_frame.h
new file mode 100644
index 0000000000000000000000000000000000000000..d45280dc4ba6159a5fa9a7421fca6178823c7528
--- /dev/null
+++ b/ppapi/c/ppb_video_frame.h
@@ -0,0 +1,109 @@
+/* Copyright (c) 2013 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.
+ */
+
+/* From ppb_video_frame.idl modified Thu Dec 19 16:13:45 2013. */
+
+#ifndef PPAPI_C_PPB_VIDEO_FRAME_H_
+#define PPAPI_C_PPB_VIDEO_FRAME_H_
+
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_macros.h"
+#include "ppapi/c/pp_resource.h"
+#include "ppapi/c/pp_size.h"
+#include "ppapi/c/pp_stdint.h"
+#include "ppapi/c/pp_time.h"
+
+#define PPB_VIDEOFRAME_INTERFACE_0_1 "PPB_VideoFrame;0.1"
+#define PPB_VIDEOFRAME_INTERFACE PPB_VIDEOFRAME_INTERFACE_0_1
+
+/**
+ * @file
+ * Defines the <code>PPB_VideoFrame</code> interface.
+ */
+
+
+/**
+ * @addtogroup Enums
+ * @{
+ */
+typedef enum {
+ /**
+ * Unknown format value.
+ */
+ PP_VIDEOFRAME_FORMAT_UNKNOWN = 0,
+ /**
+ * 12bpp YVU planar 1x1 Y, 2x2 VU samples
+ */
+ PP_VIDEOFRAME_FORMAT_YV12 = 1,
+ /**
+ * 16bpp YVU planar 1x1 Y, 2x1 VU samples
+ */
+ PP_VIDEOFRAME_FORMAT_YV16 = 2,
+ /**
+ * 12bpp YVU planar 1x1 Y, 2x2 VU samples
+ */
+ PP_VIDEOFRAME_FORMAT_I420 = 3,
+ /**
+ * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples
+ */
+ PP_VIDEOFRAME_FORMAT_YV12A = 4,
+ /**
+ * JPEG color range version of YV12
+ */
+ PP_VIDEOFRAME_FORMAT_YV12J = 7
+} PP_VideoFrame_Format;
+/**
+ * @}
+ */
+
+/**
+ * @addtogroup Interfaces
+ * @{
+ */
+struct PPB_VideoFrame_0_1 {
+ /**
+ * Determines if a resource is a VideoFrame resource.
+ *
+ * @param[in] resource The <code>PP_Resource</code> to test.
+ *
+ * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
+ * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise.
+ */
+ PP_Bool (*IsVideoFrame)(PP_Resource resource);
+ /**
+ * Get timestamp of the video frame. Given in seconds since the
+ * start of the containing video stream.
+ */
+ PP_TimeDelta (*GetTimestamp)(PP_Resource resource);
+ /**
+ * Set the timestamp of the video frame. Given in seconds since the
+ * start of the containing video stream.
+ */
+ void (*SetTimestamp)(PP_Resource resource, PP_TimeDelta timestamp);
+ /**
+ * Get format of the video frame.
+ */
+ PP_VideoFrame_Format (*GetFormat)(PP_Resource resource);
+ /**
+ * Get size of the video frame.
+ */
+ PP_Bool (*GetSize)(PP_Resource resource, struct PP_Size* size);
+ /**
+ * Get data buffer for video frame pixels.
+ */
+ void* (*GetDataBuffer)(PP_Resource resource);
+ /**
+ * Get size of data buffer.
+ */
+ uint32_t (*GetDataBufferSize)(PP_Resource resource);
+};
+
+typedef struct PPB_VideoFrame_0_1 PPB_VideoFrame;
+/**
+ * @}
+ */
+
+#endif /* PPAPI_C_PPB_VIDEO_FRAME_H_ */
+

Powered by Google App Engine
This is Rietveld 408576698