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

Unified Diff: ppapi/c/ppb_video_decoder.h

Issue 1207043002: Introduce a client minimum picture pool size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved constant to shared header, validate min_picture_size now in resource proxy as well as host co… Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/c/pp_macros.h ('k') | ppapi/cpp/video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/ppb_video_decoder.h
diff --git a/ppapi/c/ppb_video_decoder.h b/ppapi/c/ppb_video_decoder.h
index 91b200813d565e7bf61400ff2d16b305bdc7339d..f2c4f18e399e10531f1be870d856fcee4c36d000 100644
--- a/ppapi/c/ppb_video_decoder.h
+++ b/ppapi/c/ppb_video_decoder.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From ppb_video_decoder.idl modified Wed Nov 5 14:04:14 2014. */
+/* From ppb_video_decoder.idl modified Thu Aug 6 14:15:48 2015. */
#ifndef PPAPI_C_PPB_VIDEO_DECODER_H_
#define PPAPI_C_PPB_VIDEO_DECODER_H_
@@ -22,6 +22,7 @@
#define PPB_VIDEODECODER_INTERFACE_0_1 "PPB_VideoDecoder;0.1"
#define PPB_VIDEODECODER_INTERFACE_0_2 "PPB_VideoDecoder;0.2"
#define PPB_VIDEODECODER_INTERFACE_1_0 "PPB_VideoDecoder;1.0"
+#define PPB_VIDEODECODER_INTERFACE_1_1 "PPB_VideoDecoder;1.1" /* dev */
#define PPB_VIDEODECODER_INTERFACE PPB_VIDEODECODER_INTERFACE_1_0
/**
@@ -57,7 +58,7 @@
* Chrome and ChromeOS: aac, h264.
* ChromeOS: mpeg4.
*/
-struct PPB_VideoDecoder_1_0 {
+struct PPB_VideoDecoder_1_1 { /* dev */
/**
* Creates a new video decoder resource.
*
@@ -90,6 +91,12 @@ struct PPB_VideoDecoder_1_0 {
* codec profile.
* @param[in] acceleration A <code>PP_HardwareAcceleration</code> specifying
* whether to use a hardware accelerated or a software implementation.
+ * @param[in] min_picture_count A count of pictures the plugin would like to
+ * have in flight. This is effectively the number of times the plugin can
+ * call GetPicture() and get a decoded frame without calling
+ * RecyclePicture(). The decoder has its own internal minimum count, and will
+ * take the larger of its internal and this value. A client that doesn't care
+ * can therefore just pass in zero for this argument.
* @param[in] callback A <code>PP_CompletionCallback</code> to be called upon
* completion.
*
@@ -97,11 +104,14 @@ struct PPB_VideoDecoder_1_0 {
* Returns PP_ERROR_NOTSUPPORTED if video decoding is not available, or the
* requested profile is not supported. In this case, the client may call
* Initialize() again with different parameters to find a good configuration.
+ * Returns PP_ERROR_BADARGUMENT if the requested minimum picture count is
+ * unreasonably large.
*/
int32_t (*Initialize)(PP_Resource video_decoder,
PP_Resource graphics3d_context,
PP_VideoProfile profile,
PP_HardwareAcceleration acceleration,
+ uint32_t min_picture_count,
struct PP_CompletionCallback callback);
/**
* Decodes a bitstream buffer. Copies |size| bytes of data from the plugin's
@@ -220,8 +230,6 @@ struct PPB_VideoDecoder_1_0 {
struct PP_CompletionCallback callback);
};
-typedef struct PPB_VideoDecoder_1_0 PPB_VideoDecoder;
-
struct PPB_VideoDecoder_0_1 {
PP_Resource (*Create)(PP_Instance instance);
PP_Bool (*IsVideoDecoder)(PP_Resource resource);
@@ -269,6 +277,32 @@ struct PPB_VideoDecoder_0_2 {
int32_t (*Reset)(PP_Resource video_decoder,
struct PP_CompletionCallback callback);
};
+
+struct PPB_VideoDecoder_1_0 {
+ PP_Resource (*Create)(PP_Instance instance);
+ PP_Bool (*IsVideoDecoder)(PP_Resource resource);
+ int32_t (*Initialize)(PP_Resource video_decoder,
+ PP_Resource graphics3d_context,
+ PP_VideoProfile profile,
+ PP_HardwareAcceleration acceleration,
+ struct PP_CompletionCallback callback);
+ int32_t (*Decode)(PP_Resource video_decoder,
+ uint32_t decode_id,
+ uint32_t size,
+ const void* buffer,
+ struct PP_CompletionCallback callback);
+ int32_t (*GetPicture)(PP_Resource video_decoder,
+ struct PP_VideoPicture* picture,
+ struct PP_CompletionCallback callback);
+ void (*RecyclePicture)(PP_Resource video_decoder,
+ const struct PP_VideoPicture* picture);
+ int32_t (*Flush)(PP_Resource video_decoder,
+ struct PP_CompletionCallback callback);
+ int32_t (*Reset)(PP_Resource video_decoder,
+ struct PP_CompletionCallback callback);
+};
+
+typedef struct PPB_VideoDecoder_1_0 PPB_VideoDecoder;
/**
* @}
*/
« no previous file with comments | « ppapi/c/pp_macros.h ('k') | ppapi/cpp/video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698