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

Side by Side Diff: ppapi/c/dev/pp_video_dev.h

Issue 5340003: Make a new test to enforce the sizes of all structs and enums in the C API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/c/dev/pp_file_info_dev.h ('k') | ppapi/c/dev/ppb_audio_config_dev.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_C_DEV_PP_VIDEO_DEV_H_ 5 #ifndef PPAPI_C_DEV_PP_VIDEO_DEV_H_
6 #define PPAPI_C_DEV_PP_VIDEO_DEV_H_ 6 #define PPAPI_C_DEV_PP_VIDEO_DEV_H_
7 7
8 #include "ppapi/c/pp_bool.h" 8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h" 10 #include "ppapi/c/pp_resource.h"
(...skipping 21 matching lines...) Expand all
32 PP_VIDEOKEY_FRAMEINFOFLAG, 32 PP_VIDEOKEY_FRAMEINFOFLAG,
33 33
34 // Subset for H.264 features, value of 1 means supported. This is needed in 34 // Subset for H.264 features, value of 1 means supported. This is needed in
35 // case decoder has partial support for certain profile. 35 // case decoder has partial support for certain profile.
36 PP_VIDEOKEY_H264FEATURE_FMO = 0x100, 36 PP_VIDEOKEY_H264FEATURE_FMO = 0x100,
37 PP_VIDEOKEY_H264FEATURE_ASO, 37 PP_VIDEOKEY_H264FEATURE_ASO,
38 PP_VIDEOKEY_H264FEATURE_INTERLACE, 38 PP_VIDEOKEY_H264FEATURE_INTERLACE,
39 PP_VIDEOKEY_H264FEATURE_CABAC, 39 PP_VIDEOKEY_H264FEATURE_CABAC,
40 PP_VIDEOKEY_H264FEATURE_WEIGHTEDPREDICTION 40 PP_VIDEOKEY_H264FEATURE_WEIGHTEDPREDICTION
41 }; 41 };
42 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoKey_Dev, 4);
42 43
43 enum PP_VideoDecoderEvent_Dev { 44 enum PP_VideoDecoderEvent_Dev {
44 PP_VIDEODECODEREVENT_NONE = 0, 45 PP_VIDEODECODEREVENT_NONE = 0,
45 // Signaling that an error has been hit. 46 // Signaling that an error has been hit.
46 PP_VIDEODECODEREVENT_ERROR, 47 PP_VIDEODECODEREVENT_ERROR,
47 // Signaling new width/height of video frame 48 // Signaling new width/height of video frame
48 PP_VIDEODECODEREVENT_NEWDIMENSION, 49 PP_VIDEODECODEREVENT_NEWDIMENSION,
49 // Signaling new cropping rectangle 50 // Signaling new cropping rectangle
50 PP_VIDEODECODEREVENT_NEWCROP 51 PP_VIDEODECODEREVENT_NEWCROP
51 }; 52 };
53 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoDecoderEvent_Dev, 4);
52 54
53 enum PP_VideoDecodeError_Dev { 55 enum PP_VideoDecodeError_Dev {
54 PP_VIDEODECODEERROR_NONE = 0, 56 PP_VIDEODECODEERROR_NONE = 0,
55 PP_VIDEODECODEERROR_NOTSUPPORTED, 57 PP_VIDEODECODEERROR_NOTSUPPORTED,
56 PP_VIDEODECODEERROR_INSUFFICIENTRESOURCES, 58 PP_VIDEODECODEERROR_INSUFFICIENTRESOURCES,
57 PP_VIDEODECODEERROR_UNDEFINED, 59 PP_VIDEODECODEERROR_UNDEFINED,
58 PP_VIDEODECODEERROR_BADINPUT, 60 PP_VIDEODECODEERROR_BADINPUT,
59 PP_VIDEODECODEERROR_HARDWARE 61 PP_VIDEODECODEERROR_HARDWARE
60 }; 62 };
63 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoDecodeError_Dev, 4);
61 64
62 enum PP_VideoCodecId_Dev { 65 enum PP_VideoCodecId_Dev {
63 PP_VIDEODECODECID_NONE = 0, 66 PP_VIDEODECODECID_NONE = 0,
64 PP_VIDEODECODECID_H264, 67 PP_VIDEODECODECID_H264,
65 PP_VIDEODECODECID_VC1, 68 PP_VIDEODECODECID_VC1,
66 PP_VIDEODECODECID_MPEG2, 69 PP_VIDEODECODECID_MPEG2,
67 PP_VIDEODECODECID_VP8 70 PP_VIDEODECODECID_VP8
68 }; 71 };
72 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoCodecId_Dev, 4);
69 73
70 enum PP_VideoOperation_Dev { 74 enum PP_VideoOperation_Dev {
71 PP_VIDEOOPERATION_NONE = 0, 75 PP_VIDEOOPERATION_NONE = 0,
72 PP_VIDEOOPERATION_DECODE, 76 PP_VIDEOOPERATION_DECODE,
73 PP_VIDEOOPERATION_ENCODE 77 PP_VIDEOOPERATION_ENCODE
74 }; 78 };
79 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoOperation_Dev, 4);
75 80
76 enum PP_VideoCodecProfile_Dev { 81 enum PP_VideoCodecProfile_Dev {
77 PP_VIDEOCODECPROFILE_NONE = 0, 82 PP_VIDEOCODECPROFILE_NONE = 0,
78 PP_VIDEOCODECPROFILE_H264_BASELINE, 83 PP_VIDEOCODECPROFILE_H264_BASELINE,
79 PP_VIDEOCODECPROFILE_H264_MAIN, 84 PP_VIDEOCODECPROFILE_H264_MAIN,
80 PP_VIDEOCODECPROFILE_H264_EXTENDED, 85 PP_VIDEOCODECPROFILE_H264_EXTENDED,
81 PP_VIDEOCODECPROFILE_H264_HIGH, 86 PP_VIDEOCODECPROFILE_H264_HIGH,
82 PP_VIDEOCODECPROFILE_H264_SCALABLEBASELINE, 87 PP_VIDEOCODECPROFILE_H264_SCALABLEBASELINE,
83 PP_VIDEOCODECPROFILE_H264_SCALABLEHIGH, 88 PP_VIDEOCODECPROFILE_H264_SCALABLEHIGH,
84 PP_VIDEOCODECPROFILE_H264_STEREOHIGH, 89 PP_VIDEOCODECPROFILE_H264_STEREOHIGH,
85 PP_VIDEOCODECPROFILE_H264_MULTIVIEWHIGH, 90 PP_VIDEOCODECPROFILE_H264_MULTIVIEWHIGH,
86 91
87 PP_VIDEOCODECPROFILE_VC1_SIMPLE = 0x40, 92 PP_VIDEOCODECPROFILE_VC1_SIMPLE = 0x40,
88 PP_VIDEOCODECPROFILE_VC1_MAIN, 93 PP_VIDEOCODECPROFILE_VC1_MAIN,
89 PP_VIDEOCODECPROFILE_VC1_ADVANCED, 94 PP_VIDEOCODECPROFILE_VC1_ADVANCED,
90 95
91 PP_VIDEOCODECPROFILE_MPEG2_SIMPLE = 0x80, 96 PP_VIDEOCODECPROFILE_MPEG2_SIMPLE = 0x80,
92 PP_VIDEOCODECPROFILE_MPEG2_MAIN, 97 PP_VIDEOCODECPROFILE_MPEG2_MAIN,
93 PP_VIDEOCODECPROFILE_MPEG2_SNR, 98 PP_VIDEOCODECPROFILE_MPEG2_SNR,
94 PP_VIDEOCODECPROFILE_MPEG2_SPATIAL, 99 PP_VIDEOCODECPROFILE_MPEG2_SPATIAL,
95 PP_VIDEOCODECPROFILE_MPEG2_HIGH 100 PP_VIDEOCODECPROFILE_MPEG2_HIGH
96 }; 101 };
102 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoCodecProfile_Dev, 4);
97 103
98 enum PP_VideoCodecLevel_Dev { 104 enum PP_VideoCodecLevel_Dev {
99 PP_VIDEOCODECLEVEL_NONE = 0, 105 PP_VIDEOCODECLEVEL_NONE = 0,
100 PP_VIDEOCODECLEVEL_H264_10, 106 PP_VIDEOCODECLEVEL_H264_10,
101 PP_VIDEOCODECLEVEL_H264_1B, 107 PP_VIDEOCODECLEVEL_H264_1B,
102 PP_VIDEOCODECLEVEL_H264_11, 108 PP_VIDEOCODECLEVEL_H264_11,
103 PP_VIDEOCODECLEVEL_H264_12, 109 PP_VIDEOCODECLEVEL_H264_12,
104 PP_VIDEOCODECLEVEL_H264_13, 110 PP_VIDEOCODECLEVEL_H264_13,
105 PP_VIDEOCODECLEVEL_H264_20, 111 PP_VIDEOCODECLEVEL_H264_20,
106 PP_VIDEOCODECLEVEL_H264_21, 112 PP_VIDEOCODECLEVEL_H264_21,
(...skipping 14 matching lines...) Expand all
121 PP_VIDEOCODECLEVEL_VC1_L1, 127 PP_VIDEOCODECLEVEL_VC1_L1,
122 PP_VIDEOCODECLEVEL_VC1_L2, 128 PP_VIDEOCODECLEVEL_VC1_L2,
123 PP_VIDEOCODECLEVEL_VC1_L3, 129 PP_VIDEOCODECLEVEL_VC1_L3,
124 PP_VIDEOCODECLEVEL_VC1_L4, 130 PP_VIDEOCODECLEVEL_VC1_L4,
125 131
126 PP_VIDEOCODECLEVEL_MPEG2_LOW = 0x80, 132 PP_VIDEOCODECLEVEL_MPEG2_LOW = 0x80,
127 PP_VIDEOCODECLEVEL_MPEG2_MAIN, 133 PP_VIDEOCODECLEVEL_MPEG2_MAIN,
128 PP_VIDEOCODECLEVEL_MPEG2_HIGH1440, 134 PP_VIDEOCODECLEVEL_MPEG2_HIGH1440,
129 PP_VIDEOCODECLEVEL_MPEG2_HIGH 135 PP_VIDEOCODECLEVEL_MPEG2_HIGH
130 }; 136 };
137 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoCodecLevel_Dev, 4);
131 138
132 enum PP_VideoPayloadFormat_Dev { 139 enum PP_VideoPayloadFormat_Dev {
133 PP_VIDEOPAYLOADFORMAT_NONE = 0, 140 PP_VIDEOPAYLOADFORMAT_NONE = 0,
134 PP_VIDEOPAYLOADFORMAT_BYTESTREAM, 141 PP_VIDEOPAYLOADFORMAT_BYTESTREAM,
135 PP_VIDEOPAYLOADFORMAT_RTPPAYLOAD 142 PP_VIDEOPAYLOADFORMAT_RTPPAYLOAD
136 }; 143 };
144 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoPayloadFormat_Dev, 4);
137 145
138 enum PP_VideoFrameColorType_Dev { 146 enum PP_VideoFrameColorType_Dev {
139 PP_VIDEOFRAMECOLORTYPE_NONE = 0, 147 PP_VIDEOFRAMECOLORTYPE_NONE = 0,
140 PP_VIDEOFRAMECOLORTYPE_RGB565, 148 PP_VIDEOFRAMECOLORTYPE_RGB565,
141 PP_VIDEOFRAMECOLORTYPE_ARGB8888, 149 PP_VIDEOFRAMECOLORTYPE_ARGB8888,
142 PP_VIDEOFRAMECOLORTYPE_YUV, 150 PP_VIDEOFRAMECOLORTYPE_YUV,
143 PP_VIDEOFRAMECOLORTYPE_Monochrome, 151 PP_VIDEOFRAMECOLORTYPE_Monochrome,
144 PP_VIDEOFRAMECOLORTYPE_YUV420PLANAR, 152 PP_VIDEOFRAMECOLORTYPE_YUV420PLANAR,
145 PP_VIDEOFRAMECOLORTYPE_YUV422PLANAR, 153 PP_VIDEOFRAMECOLORTYPE_YUV422PLANAR,
146 PP_VIDEOFRAMECOLORTYPE_YUV444PLANAR 154 PP_VIDEOFRAMECOLORTYPE_YUV444PLANAR
147 }; 155 };
156 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoFrameColorType_Dev, 4);
148 157
149 enum PP_VideoFrameSurfaceType_Dev { 158 enum PP_VideoFrameSurfaceType_Dev {
150 PP_VIDEOFRAMESURFACETYPE_NONE = 0, 159 PP_VIDEOFRAMESURFACETYPE_NONE = 0,
151 PP_VIDEOFRAMESURFACETYPE_SYSTEMMEMORY, 160 PP_VIDEOFRAMESURFACETYPE_SYSTEMMEMORY,
152 PP_VIDEOFRAMESURFACETYPE_GLTEXTURE, 161 PP_VIDEOFRAMESURFACETYPE_GLTEXTURE,
153 PP_VIDEOFRAMESURFACETYPE_PIXMAP 162 PP_VIDEOFRAMESURFACETYPE_PIXMAP
154 }; 163 };
164 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoFrameSurfaceType_Dev, 4);
155 165
156 enum PP_VideoFrameInfoFlag_Dev { 166 enum PP_VideoFrameInfoFlag_Dev {
157 PP_VIDEOFRAMEINFOFLAG_NONE = 0, 167 PP_VIDEOFRAMEINFOFLAG_NONE = 0,
158 // Indicate this is the end of stream. Used by both plugin and browser. 168 // Indicate this is the end of stream. Used by both plugin and browser.
159 PP_VIDEOFRAMEINFOFLAG_EOS = 1 << 0, 169 PP_VIDEOFRAMEINFOFLAG_EOS = 1 << 0,
160 // Decode the frame only, don't return decoded frame. Used by plugin. 170 // Decode the frame only, don't return decoded frame. Used by plugin.
161 PP_VIDEOFRAMEINFOFLAG_NOEMIT = 1 << 1, 171 PP_VIDEOFRAMEINFOFLAG_NOEMIT = 1 << 1,
162 // Indicate this is an anchor frame. Used by plugin. 172 // Indicate this is an anchor frame. Used by plugin.
163 PP_VIDEOFRAMEINFOFLAG_SYNCFRAME = 1 << 2, 173 PP_VIDEOFRAMEINFOFLAG_SYNCFRAME = 1 << 2,
164 // Indicate the decoded frame has data corruption. Used by browser. 174 // Indicate the decoded frame has data corruption. Used by browser.
165 PP_VIDEOFRAMEINFOFLAG_DATACORRUPT = 1 << 3 175 PP_VIDEOFRAMEINFOFLAG_DATACORRUPT = 1 << 3
166 }; 176 };
177 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoFrameInfoFlag_Dev, 4);
167 178
168 enum PP_VideoFrameBufferConst_Dev { 179 enum PP_VideoFrameBufferConst_Dev {
169 // YUV formats 180 // YUV formats
170 PP_VIDEOFRAMEBUFFER_YPLANE = 0, 181 PP_VIDEOFRAMEBUFFER_YPLANE = 0,
171 PP_VIDEOFRAMEBUFFER_UPLANE = 1, 182 PP_VIDEOFRAMEBUFFER_UPLANE = 1,
172 PP_VIDEOFRAMEBUFFER_VPLANE = 2, 183 PP_VIDEOFRAMEBUFFER_VPLANE = 2,
173 PP_VIDEOFRAMEBUFFER_NUMBERYUVPLANES = 3, 184 PP_VIDEOFRAMEBUFFER_NUMBERYUVPLANES = 3,
174 185
175 // RGBA formats 186 // RGBA formats
176 PP_VIDEOFRAMEBUFFER_RGBAPLANE = 0, 187 PP_VIDEOFRAMEBUFFER_RGBAPLANE = 0,
177 PP_VIDEOFRAMEBUFFER_NUMBERRGBAPLANES = 1, 188 PP_VIDEOFRAMEBUFFER_NUMBERRGBAPLANES = 1,
178 189
179 PP_VIDEOFRAMEBUFFER_MAXNUMBERPLANES = 4 190 PP_VIDEOFRAMEBUFFER_MAXNUMBERPLANES = 4
180 }; 191 };
192 PP_COMPILE_ASSERT_ENUM_SIZE_IN_BYTES(PP_VideoFrameBufferConst_Dev, 4);
181 193
182 typedef int64_t PP_VideoDecodeData_Dev; 194 typedef int64_t PP_VideoDecodeData_Dev;
195 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoDecodeData_Dev, 8);
183 196
184 // Array of key/value pairs describing video configuration. 197 // Array of key/value pairs describing video configuration.
185 // It could include any keys from PP_VideoKey. Its last element shall be 198 // It could include any keys from PP_VideoKey. Its last element shall be
186 // PP_VIDEOKEY_NONE with no corresponding value. 199 // PP_VIDEOKEY_NONE with no corresponding value.
187 // An example: 200 // An example:
188 // { 201 // {
189 // PP_VIDEOKEY_CODECID, PP_VIDEODECODECID_H264, 202 // PP_VIDEOKEY_CODECID, PP_VIDEODECODECID_H264,
190 // PP_VIDEOKEY_OPERATION, PP_VIDEOOPERATION_DECODE, 203 // PP_VIDEOKEY_OPERATION, PP_VIDEOOPERATION_DECODE,
191 // PP_VIDEOKEY_CODECPROFILE, PP_VIDEOCODECPROFILE_H264_HIGH, 204 // PP_VIDEOKEY_CODECPROFILE, PP_VIDEOCODECPROFILE_H264_HIGH,
192 // PP_VIDEOKEY_CODECLEVEL, PP_VIDEOCODECLEVEL_H264_41, 205 // PP_VIDEOKEY_CODECLEVEL, PP_VIDEOCODECLEVEL_H264_41,
193 // PP_VIDEOKEY_ACCELERATION, 1 206 // PP_VIDEOKEY_ACCELERATION, 1
194 // PP_VIDEOKEY_NONE, 207 // PP_VIDEOKEY_NONE,
195 // }; 208 // };
196 typedef int32_t* PP_VideoConfig_Dev; 209 typedef int32_t* PP_VideoConfig_Dev;
197 typedef int32_t PP_VideoConfigElement_Dev; 210 typedef int32_t PP_VideoConfigElement_Dev;
211 PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_VideoConfigElement_Dev, 4);
198 212
199 // The data structure for compressed data buffer. 213 // The data structure for compressed data buffer.
200 struct PP_VideoCompressedDataBuffer_Dev { 214 struct PP_VideoCompressedDataBuffer_Dev {
201 // The buffer is created through PPB_Buffer API. 215 // The buffer is created through PPB_Buffer API.
202 // TODO(wjia): would uint8_t* be good, too? 216 // TODO(wjia): would uint8_t* be good, too?
203 PP_Resource buffer; 217 PP_Resource buffer;
218
204 // number of bytes with real data in the buffer. 219 // number of bytes with real data in the buffer.
205 int32_t filled_size; 220 int32_t filled_size;
206 221
222 // Bit mask of PP_VideoFrameInfoFlag.
223 uint32_t flags;
224
207 // Time stamp of the frame in microsecond. 225 // Time stamp of the frame in microsecond.
208 uint64_t time_stamp_us; 226 uint64_t time_stamp_us;
209
210 // Bit mask of PP_VideoFrameInfoFlag.
211 uint32_t flags;
212 }; 227 };
228 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_VideoCompressedDataBuffer_Dev, 24);
213 229
214 struct PP_VideoFrameBuffer_Dev { 230 struct PP_VideoFrameBuffer_Dev {
215 union { 231 union {
216 struct { 232 struct {
217 int32_t planes;
218 struct { 233 struct {
219 int32_t width; 234 int32_t width;
220 int32_t height; 235 int32_t height;
221 int32_t stride; 236 int32_t stride;
222 237
238 // Padding to ensure the PP_Resource is 8-byte aligned relative to the
239 // start of the struct. This helps ensure PP_VideoFrameBuffer_Dev has
240 // consistent size and alignment across compilers.
241 int32_t padding;
242
223 // TODO(wjia): uint8* would be better for some cases. 243 // TODO(wjia): uint8* would be better for some cases.
224 PP_Resource buffer; 244 PP_Resource buffer;
225 } data_plane[PP_VIDEOFRAMEBUFFER_MAXNUMBERPLANES]; 245 } data_plane[PP_VIDEOFRAMEBUFFER_MAXNUMBERPLANES];
246
247 int32_t planes;
248 int32_t padding;
226 } sys_mem; 249 } sys_mem;
227 250
228 // Handle for pixmap, gl texture, etc. 251 // Handle for pixmap, gl texture, etc.
229 void* handle; 252 void* handle;
230 } buffer; 253 } buffer;
231 254
232 // Storage for decoder to save some private data. It could be useful when 255 // Storage for decoder to save some private data. It could be useful when
233 // plugin returns frame buffer to decoder. 256 // plugin returns frame buffer to decoder.
234 void* private_handle; 257 void* private_handle;
258
259 // In some 32-bit platforms (NaCl and Win32), this struct is 8-byte aligned
260 // due to the PP_Resource above. That causes the compiler to pad it an extra
261 // 4 bytes on the end. In other 32-bit platforms, there is no such pad. This
262 // padding ensures that the size is consistent on 32-bit platforms (and it
263 // is still consistent on 64-bit platforms, just bigger than it would be
264 // without the padding).
265 int32_t padding;
235 }; 266 };
236 267
237 struct PP_VideoUncompressedDataBuffer_Dev { 268 struct PP_VideoUncompressedDataBuffer_Dev {
238 PP_VideoConfig_Dev format; 269 PP_VideoConfig_Dev format;
239 struct PP_VideoFrameBuffer_Dev buffer; 270
271 // Bit mask of PP_VideoFrameInfoFlag.
272 uint32_t flags;
240 273
241 // Time stamp of the frame in microsecond. 274 // Time stamp of the frame in microsecond.
242 uint64_t time_stamp_us; 275 uint64_t time_stamp_us;
243 276
244 // Bit mask of PP_VideoFrameInfoFlag. 277 struct PP_VideoFrameBuffer_Dev buffer;
245 uint32_t flags;
246 278
247 // Output from decoder, indicating the decoded frame has error pixels. This 279 // Output from decoder, indicating the decoded frame has error pixels. This
248 // could be resulted from corrupted input bit stream and error concealment 280 // could be resulted from corrupted input bit stream and error concealment
249 // in decoding. PP_TRUE indicates error. 281 // in decoding. PP_TRUE indicates error.
250 // TODO(wjia): add more info about error pixels, such as error MB map, etc. 282 // TODO(wjia): add more info about error pixels, such as error MB map, etc.
251 PP_Bool error; 283 PP_Bool error;
284
285 // TODO(dmichael): document
286 int32_t padding;
252 }; 287 };
253 288
254 // Plugin callback for decoder to deliver decoded frame buffers. 289 // Plugin callback for decoder to deliver decoded frame buffers.
255 // |format| in |buffer| specifies the format of decoded frame, with 290 // |format| in |buffer| specifies the format of decoded frame, with
256 // PP_VIDEOKEY_COLORTYPE and PP_VIDEOKEY_SURFACETYPE required. 291 // PP_VIDEOKEY_COLORTYPE and PP_VIDEOKEY_SURFACETYPE required.
257 typedef void (*PP_VideoDecodeOutputCallback_Func_Dev)( 292 typedef void (*PP_VideoDecodeOutputCallback_Func_Dev)(
258 PP_Instance instance, 293 PP_Instance instance,
259 struct PP_VideoUncompressedDataBuffer_Dev* buffer); 294 struct PP_VideoUncompressedDataBuffer_Dev* buffer);
260 295
261 // Plugin callback for decoder to return input data buffers. 296 // Plugin callback for decoder to return input data buffers.
(...skipping 20 matching lines...) Expand all
282 // Requested decoder configuration and callback from plugin. 317 // Requested decoder configuration and callback from plugin.
283 struct PP_VideoDecoderConfig_Dev { 318 struct PP_VideoDecoderConfig_Dev {
284 PP_VideoConfig_Dev input_format; 319 PP_VideoConfig_Dev input_format;
285 PP_VideoConfig_Dev output_format; 320 PP_VideoConfig_Dev output_format;
286 PP_VideoDecodeOutputCallback_Func_Dev output_callback; 321 PP_VideoDecodeOutputCallback_Func_Dev output_callback;
287 PP_VideoDecodeInputCallback_Func_Dev input_callback; 322 PP_VideoDecodeInputCallback_Func_Dev input_callback;
288 PP_VideoDecodeEventHandler_Func_Dev event_handler; 323 PP_VideoDecodeEventHandler_Func_Dev event_handler;
289 }; 324 };
290 325
291 #endif // PPAPI_C_DEV_PP_VIDEO_DEV_H_ 326 #endif // PPAPI_C_DEV_PP_VIDEO_DEV_H_
OLDNEW
« no previous file with comments | « ppapi/c/dev/pp_file_info_dev.h ('k') | ppapi/c/dev/ppb_audio_config_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698