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

Side by Side Diff: ppapi/c/ppb_video_decoder.h

Issue 703753002: Pepper: Expose visible_rect to PPB_VideoDecoder.GetPicture. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 6 years, 1 month 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
1 /* Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2014 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 5
6 /* From ppb_video_decoder.idl modified Mon Sep 8 16:40:15 2014. */ 6 /* From ppb_video_decoder.idl modified Wed Nov 5 14:04:14 2014. */
7 7
8 #ifndef PPAPI_C_PPB_VIDEO_DECODER_H_ 8 #ifndef PPAPI_C_PPB_VIDEO_DECODER_H_
9 #define PPAPI_C_PPB_VIDEO_DECODER_H_ 9 #define PPAPI_C_PPB_VIDEO_DECODER_H_
10 10
11 #include "ppapi/c/pp_bool.h" 11 #include "ppapi/c/pp_bool.h"
12 #include "ppapi/c/pp_codecs.h" 12 #include "ppapi/c/pp_codecs.h"
13 #include "ppapi/c/pp_completion_callback.h" 13 #include "ppapi/c/pp_completion_callback.h"
14 #include "ppapi/c/pp_instance.h" 14 #include "ppapi/c/pp_instance.h"
15 #include "ppapi/c/pp_macros.h" 15 #include "ppapi/c/pp_macros.h"
16 #include "ppapi/c/pp_point.h"
17 #include "ppapi/c/pp_rect.h"
dmichael (off chromium) 2014/11/05 23:06:04 Any idea why the IDL generator added these? Seems
bbudge 2014/11/06 00:26:36 Seems like a bug. They are added to pp_codecs.h so
16 #include "ppapi/c/pp_resource.h" 18 #include "ppapi/c/pp_resource.h"
17 #include "ppapi/c/pp_size.h" 19 #include "ppapi/c/pp_size.h"
18 #include "ppapi/c/pp_stdint.h" 20 #include "ppapi/c/pp_stdint.h"
19 21
20 #define PPB_VIDEODECODER_INTERFACE_0_1 "PPB_VideoDecoder;0.1" 22 #define PPB_VIDEODECODER_INTERFACE_0_1 "PPB_VideoDecoder;0.1"
21 #define PPB_VIDEODECODER_INTERFACE_0_2 "PPB_VideoDecoder;0.2" 23 #define PPB_VIDEODECODER_INTERFACE_0_2 "PPB_VideoDecoder;0.2"
22 #define PPB_VIDEODECODER_INTERFACE PPB_VIDEODECODER_INTERFACE_0_2 24 #define PPB_VIDEODECODER_INTERFACE_1_0 "PPB_VideoDecoder;1.0"
25 #define PPB_VIDEODECODER_INTERFACE PPB_VIDEODECODER_INTERFACE_1_0
23 26
24 /** 27 /**
25 * @file 28 * @file
26 * This file defines the <code>PPB_VideoDecoder</code> interface. 29 * This file defines the <code>PPB_VideoDecoder</code> interface.
27 */ 30 */
28 31
29 32
30 /** 33 /**
31 * @addtogroup Interfaces 34 * @addtogroup Interfaces
32 * @{ 35 * @{
(...skipping 14 matching lines...) Expand all
47 * - Call Reset() to quickly stop the decoder (e.g. to implement Seek) and wait 50 * - Call Reset() to quickly stop the decoder (e.g. to implement Seek) and wait
48 * for the callback before restarting decoding at another point. 51 * for the callback before restarting decoding at another point.
49 * - To destroy the decoder, the plugin should release all of its references to 52 * - To destroy the decoder, the plugin should release all of its references to
50 * it. Any pending callbacks will abort before the decoder is destroyed. 53 * it. Any pending callbacks will abort before the decoder is destroyed.
51 * 54 *
52 * Available video codecs vary by platform. 55 * Available video codecs vary by platform.
53 * All: theora, vorbis, vp8. 56 * All: theora, vorbis, vp8.
54 * Chrome and ChromeOS: aac, h264. 57 * Chrome and ChromeOS: aac, h264.
55 * ChromeOS: mpeg4. 58 * ChromeOS: mpeg4.
56 */ 59 */
57 struct PPB_VideoDecoder_0_2 { 60 struct PPB_VideoDecoder_1_0 {
58 /** 61 /**
59 * Creates a new video decoder resource. 62 * Creates a new video decoder resource.
60 * 63 *
61 * @param[in] instance A <code>PP_Instance</code> identifying the instance 64 * @param[in] instance A <code>PP_Instance</code> identifying the instance
62 * with the video decoder. 65 * with the video decoder.
63 * 66 *
64 * @return A <code>PP_Resource</code> corresponding to a video decoder if 67 * @return A <code>PP_Resource</code> corresponding to a video decoder if
65 * successful or 0 otherwise. 68 * successful or 0 otherwise.
66 */ 69 */
67 PP_Resource (*Create)(PP_Instance instance); 70 PP_Resource (*Create)(PP_Instance instance);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on 213 * @param[in] callback A <code>PP_CompletionCallback</code> to be called on
211 * completion. 214 * completion.
212 * 215 *
213 * @return An int32_t containing an error code from <code>pp_errors.h</code>. 216 * @return An int32_t containing an error code from <code>pp_errors.h</code>.
214 * Returns PP_ERROR_FAILED if the decoder isn't initialized. 217 * Returns PP_ERROR_FAILED if the decoder isn't initialized.
215 */ 218 */
216 int32_t (*Reset)(PP_Resource video_decoder, 219 int32_t (*Reset)(PP_Resource video_decoder,
217 struct PP_CompletionCallback callback); 220 struct PP_CompletionCallback callback);
218 }; 221 };
219 222
220 typedef struct PPB_VideoDecoder_0_2 PPB_VideoDecoder; 223 typedef struct PPB_VideoDecoder_1_0 PPB_VideoDecoder;
221 224
222 struct PPB_VideoDecoder_0_1 { 225 struct PPB_VideoDecoder_0_1 {
223 PP_Resource (*Create)(PP_Instance instance); 226 PP_Resource (*Create)(PP_Instance instance);
224 PP_Bool (*IsVideoDecoder)(PP_Resource resource); 227 PP_Bool (*IsVideoDecoder)(PP_Resource resource);
225 int32_t (*Initialize)(PP_Resource video_decoder, 228 int32_t (*Initialize)(PP_Resource video_decoder,
226 PP_Resource graphics3d_context, 229 PP_Resource graphics3d_context,
227 PP_VideoProfile profile, 230 PP_VideoProfile profile,
228 PP_Bool allow_software_fallback, 231 PP_Bool allow_software_fallback,
229 struct PP_CompletionCallback callback); 232 struct PP_CompletionCallback callback);
230 int32_t (*Decode)(PP_Resource video_decoder, 233 int32_t (*Decode)(PP_Resource video_decoder,
231 uint32_t decode_id, 234 uint32_t decode_id,
232 uint32_t size, 235 uint32_t size,
233 const void* buffer, 236 const void* buffer,
234 struct PP_CompletionCallback callback); 237 struct PP_CompletionCallback callback);
235 int32_t (*GetPicture)(PP_Resource video_decoder, 238 int32_t (*GetPicture)(PP_Resource video_decoder,
236 struct PP_VideoPicture* picture, 239 struct PP_VideoPicture_0_1* picture,
237 struct PP_CompletionCallback callback); 240 struct PP_CompletionCallback callback);
238 void (*RecyclePicture)(PP_Resource video_decoder, 241 void (*RecyclePicture)(PP_Resource video_decoder,
239 const struct PP_VideoPicture* picture); 242 const struct PP_VideoPicture* picture);
243 int32_t (*Flush)(PP_Resource video_decoder,
244 struct PP_CompletionCallback callback);
245 int32_t (*Reset)(PP_Resource video_decoder,
246 struct PP_CompletionCallback callback);
247 };
248
249 struct PPB_VideoDecoder_0_2 {
250 PP_Resource (*Create)(PP_Instance instance);
251 PP_Bool (*IsVideoDecoder)(PP_Resource resource);
252 int32_t (*Initialize)(PP_Resource video_decoder,
253 PP_Resource graphics3d_context,
254 PP_VideoProfile profile,
255 PP_HardwareAcceleration acceleration,
256 struct PP_CompletionCallback callback);
257 int32_t (*Decode)(PP_Resource video_decoder,
258 uint32_t decode_id,
259 uint32_t size,
260 const void* buffer,
261 struct PP_CompletionCallback callback);
262 int32_t (*GetPicture)(PP_Resource video_decoder,
263 struct PP_VideoPicture_0_1* picture,
264 struct PP_CompletionCallback callback);
265 void (*RecyclePicture)(PP_Resource video_decoder,
266 const struct PP_VideoPicture* picture);
240 int32_t (*Flush)(PP_Resource video_decoder, 267 int32_t (*Flush)(PP_Resource video_decoder,
241 struct PP_CompletionCallback callback); 268 struct PP_CompletionCallback callback);
242 int32_t (*Reset)(PP_Resource video_decoder, 269 int32_t (*Reset)(PP_Resource video_decoder,
243 struct PP_CompletionCallback callback); 270 struct PP_CompletionCallback callback);
244 }; 271 };
245 /** 272 /**
246 * @} 273 * @}
247 */ 274 */
248 275
249 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */ 276 #endif /* PPAPI_C_PPB_VIDEO_DECODER_H_ */
250 277
OLDNEW
« no previous file with comments | « ppapi/c/pp_macros.h ('k') | ppapi/cpp/video_decoder.h » ('j') | ppapi/cpp/video_decoder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698