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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 /* Copyright (c) 2013 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
6 /* From ppb_video_frame.idl modified Thu Dec 19 16:13:45 2013. */
7
8 #ifndef PPAPI_C_PPB_VIDEO_FRAME_H_
9 #define PPAPI_C_PPB_VIDEO_FRAME_H_
10
11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_macros.h"
13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_size.h"
15 #include "ppapi/c/pp_stdint.h"
16 #include "ppapi/c/pp_time.h"
17
18 #define PPB_VIDEOFRAME_INTERFACE_0_1 "PPB_VideoFrame;0.1"
19 #define PPB_VIDEOFRAME_INTERFACE PPB_VIDEOFRAME_INTERFACE_0_1
20
21 /**
22 * @file
23 * Defines the <code>PPB_VideoFrame</code> interface.
24 */
25
26
27 /**
28 * @addtogroup Enums
29 * @{
30 */
31 typedef enum {
32 /**
33 * Unknown format value.
34 */
35 PP_VIDEOFRAME_FORMAT_UNKNOWN = 0,
36 /**
37 * 12bpp YVU planar 1x1 Y, 2x2 VU samples
38 */
39 PP_VIDEOFRAME_FORMAT_YV12 = 1,
40 /**
41 * 16bpp YVU planar 1x1 Y, 2x1 VU samples
42 */
43 PP_VIDEOFRAME_FORMAT_YV16 = 2,
44 /**
45 * 12bpp YVU planar 1x1 Y, 2x2 VU samples
46 */
47 PP_VIDEOFRAME_FORMAT_I420 = 3,
48 /**
49 * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples
50 */
51 PP_VIDEOFRAME_FORMAT_YV12A = 4,
52 /**
53 * JPEG color range version of YV12
54 */
55 PP_VIDEOFRAME_FORMAT_YV12J = 7
56 } PP_VideoFrame_Format;
57 /**
58 * @}
59 */
60
61 /**
62 * @addtogroup Interfaces
63 * @{
64 */
65 struct PPB_VideoFrame_0_1 {
66 /**
67 * Determines if a resource is a VideoFrame resource.
68 *
69 * @param[in] resource The <code>PP_Resource</code> to test.
70 *
71 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
72 * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise.
73 */
74 PP_Bool (*IsVideoFrame)(PP_Resource resource);
75 /**
76 * Get timestamp of the video frame. Given in seconds since the
77 * start of the containing video stream.
78 */
79 PP_TimeDelta (*GetTimestamp)(PP_Resource resource);
80 /**
81 * Set the timestamp of the video frame. Given in seconds since the
82 * start of the containing video stream.
83 */
84 void (*SetTimestamp)(PP_Resource resource, PP_TimeDelta timestamp);
85 /**
86 * Get format of the video frame.
87 */
88 PP_VideoFrame_Format (*GetFormat)(PP_Resource resource);
89 /**
90 * Get size of the video frame.
91 */
92 PP_Bool (*GetSize)(PP_Resource resource, struct PP_Size* size);
93 /**
94 * Get data buffer for video frame pixels.
95 */
96 void* (*GetDataBuffer)(PP_Resource resource);
97 /**
98 * Get size of data buffer.
99 */
100 uint32_t (*GetDataBufferSize)(PP_Resource resource);
101 };
102
103 typedef struct PPB_VideoFrame_0_1 PPB_VideoFrame;
104 /**
105 * @}
106 */
107
108 #endif /* PPAPI_C_PPB_VIDEO_FRAME_H_ */
109
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698