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

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: Fix build warnings Created 6 years, 11 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 unified diff | Download patch
« no previous file with comments | « ppapi/c/ppb_media_stream_video_track.h ('k') | ppapi/cpp/media_stream_video_track.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Fri Dec 27 17:21:52 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" /* dev */
19 /**
20 * @file
21 * Defines the <code>PPB_VideoFrame</code> interface.
22 */
23
24
25 /**
26 * @addtogroup Enums
27 * @{
28 */
29 typedef enum {
30 /**
31 * Unknown format value.
32 */
33 PP_VIDEOFRAME_FORMAT_UNKNOWN = 0,
34 /**
35 * 12bpp YVU planar 1x1 Y, 2x2 VU samples.
36 */
37 PP_VIDEOFRAME_FORMAT_YV12 = 1,
38 /**
39 * 16bpp YVU planar 1x1 Y, 2x1 VU samples.
40 */
41 PP_VIDEOFRAME_FORMAT_YV16 = 2,
42 /**
43 * 12bpp YVU planar 1x1 Y, 2x2 VU samples.
44 */
45 PP_VIDEOFRAME_FORMAT_I420 = 3,
46 /**
47 * 20bpp YVU planar 1x1 Y, 2x2 VU, 1x1 A samples.
48 */
49 PP_VIDEOFRAME_FORMAT_YV12A = 4,
50 /**
51 * JPEG color range version of YV12.
52 */
53 PP_VIDEOFRAME_FORMAT_YV12J = 5
54 } PP_VideoFrame_Format;
55 /**
56 * @}
57 */
58
59 /**
60 * @addtogroup Interfaces
61 * @{
62 */
63 struct PPB_VideoFrame_0_1 { /* dev */
64 /**
65 * Determines if a resource is a VideoFrame resource.
66 *
67 * @param[in] resource The <code>PP_Resource</code> to test.
68 *
69 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> if the given
70 * resource is a VideoFrame resource or <code>PP_FALSE</code> otherwise.
71 */
72 PP_Bool (*IsVideoFrame)(PP_Resource resource);
73 /**
74 * Gets the timestamp of the video frame.
75 *
76 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
77 * resource.
78 *
79 * @return A <code>PP_TimeDelta</code> containing the timestamp of the video
80 * frame. Given in seconds since the start of the containing video stream.
81 */
82 PP_TimeDelta (*GetTimestamp)(PP_Resource frame);
83 /**
84 * Sets the timestamp of the video frame. Given in seconds since the
85 * start of the containing video stream.
86 *
87 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
88 * resource.
89 * @param[in] timestamp A <code>PP_TimeDelta</code> containing the timestamp
90 * of the video frame. Given in seconds since the start of the containing
91 * video stream.
92 */
93 void (*SetTimestamp)(PP_Resource frame, PP_TimeDelta timestamp);
94 /**
95 * Gets the format of the video frame.
96 *
97 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
98 * resource.
99 *
100 * @return A <code>PP_VideoFrame_Format</code> containing the format of the
101 * video frame.
102 */
103 PP_VideoFrame_Format (*GetFormat)(PP_Resource frame);
104 /**
105 * Gets the size of the video frame.
106 *
107 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
108 * resource.
109 * @param[out] size A <code>PP_Size</code>.
110 *
111 * @return A <code>PP_Bool</code> with <code>PP_TRUE</code> on success or
112 * <code>PP_FALSE</code> on failure.
113 */
114 PP_Bool (*GetSize)(PP_Resource frame, struct PP_Size* size);
115 /**
116 * Gets the data buffer for video frame pixels.
117 *
118 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
119 * resource.
120 *
121 * @return A pointer to the beginning of the data buffer.
122 */
123 void* (*GetDataBuffer)(PP_Resource frame);
124 /**
125 * Gets the size of data buffer.
126 *
127 * @param[in] frame A <code>PP_Resource</code> corresponding to a video frame
128 * resource.
129 *
130 * @return The size of the data buffer.
131 */
132 uint32_t (*GetDataBufferSize)(PP_Resource frame);
133 };
134 /**
135 * @}
136 */
137
138 #endif /* PPAPI_C_PPB_VIDEO_FRAME_H_ */
139
OLDNEW
« no previous file with comments | « ppapi/c/ppb_media_stream_video_track.h ('k') | ppapi/cpp/media_stream_video_track.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698