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

Unified Diff: ppapi/c/dev/ppb_video_decoder_dev.h

Issue 6901036: Update VideoDecode PPAPI structs to be consistent with media structures, part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make try bots happy Created 9 years, 7 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/dev/pp_video_dev.h ('k') | ppapi/c/dev/ppp_video_decoder_dev.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/dev/ppb_video_decoder_dev.h
diff --git a/ppapi/c/dev/ppb_video_decoder_dev.h b/ppapi/c/dev/ppb_video_decoder_dev.h
index 1aed02db44c1aee4b424e917e0ee0ff3ddc44df0..53869a0eb085e3740bb4a494d4da742ad2356ecb 100644
--- a/ppapi/c/dev/ppb_video_decoder_dev.h
+++ b/ppapi/c/dev/ppb_video_decoder_dev.h
@@ -9,8 +9,8 @@
#include "ppapi/c/pp_completion_callback.h"
#include "ppapi/c/pp_var.h"
-#define PPB_VIDEODECODER_DEV_INTERFACE_0_5 "PPB_VideoDecoder(Dev);0.5"
-#define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_5
+#define PPB_VIDEODECODER_DEV_INTERFACE_0_6 "PPB_VideoDecoder(Dev);0.6"
+#define PPB_VIDEODECODER_DEV_INTERFACE PPB_VIDEODECODER_DEV_INTERFACE_0_6
// Video decoder interface.
//
@@ -70,10 +70,10 @@ struct PPB_VideoDecoder_Dev {
//
// Returns PP_TRUE on success, PP_FALSE otherwise.
PP_Bool (*GetConfigs)(PP_Instance instance,
- struct PP_VideoDecoderConfig_Dev* proto_config,
- struct PP_VideoDecoderConfig_Dev* matching_configs,
- int32_t matching_configs_size,
- int32_t* num_of_matching_configs);
+ PP_VideoConfigElement* proto_config,
+ PP_VideoConfigElement* matching_configs,
+ uint32_t matching_configs_size,
+ uint32_t* num_of_matching_configs);
// Creates a video decoder with requested |decoder_config|.
// |input_format| in |decoder_config| specifies the format of input access
@@ -88,7 +88,7 @@ struct PPB_VideoDecoder_Dev {
//
// The created decoder is returned as PP_Resource. NULL means failure.
PP_Resource (*Create)(PP_Instance instance,
- struct PP_VideoDecoderConfig_Dev* dec_config);
+ PP_VideoConfigElement* dec_config);
// Tests whether |resource| is a video decoder created through Create
// function of this interface.
@@ -114,37 +114,39 @@ struct PPB_VideoDecoder_Dev {
struct PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
struct PP_CompletionCallback callback);
- // Provides the decoder with picture buffers for video decoding. This
- // function should be called when decoder has issued ProvidePictureBuffers
- // callback to the plugin with buffer requirements.
+ // Provides the decoder with picture buffers for video decoding.
+ // AssignGLESBuffers provides texture-backed buffers, whereas
+ // AssignSysmemBuffers provides system memory-backed buffers.
//
- // If the plugin is can determine how many and what kind of buffers are
- // needed by the decoder it can provide them in advance. For this purpose
- // the configuration map can provide how many extra buffers the decoder
- // implementation requires for seamless operation.
+ // This function should be called when decoder has issued the
+ // ProvidePictureBuffers callback to the plugin with buffer requirements.
//
- // The decoder will pause if AssignPictureBuffer hasn't been called with
- // sufficient buffers.
+ // It can also be called in advance or outside of ProvidePictureBuffers calls
+ // to provide the decoder with additional buffers. Additional buffers will be
+ // added to the decoder's buffer pool.
//
- // If the decoder rejects the buffers it will return the buffers and issue
- // ProvidePictureBuffers again.
+ // The decoder will pause in decoding if it has not received enough buffers.
//
- // If AssignPictureBuffer is called multiple times the decoder will add them
- // to its pool of output pictures.
+ // If the buffer is invalid, the decoder will return the buffer and will issue
+ // ProvidePictureBuffers again.
//
- // TODO(vmr): this API feels too flexible... should we make it more strict
- // where the decoder errors on bad buffers/duplicate buffers? Perhaps
- // AssignPictureBuffer should only get called in response to
- // ProvidePictureBuffer?
+ // TODO(vmr/vrk): Decide if the API is too flexible, i.e. stricter rules on
+ // errors/duplicates or requiring Assign*Buffers to only be called in response
+ // to ProvidePictureBuffers... in which case the output buffers should be
+ // callback parameters to ProvidePictureBuffers instead of being part of the
+ // PPB API.
//
// Parameters:
// |video_decoder| is the previously created handle to the decoder instance.
// |no_of_buffers| how many buffers are behind picture buffer pointer.
- // |picture_buffer| contains the reference to the picture buffer that was
- // processed.
- void (*AssignPictureBuffer)(PP_Resource video_decoder,
+ // |buffers| contains the reference to the picture buffer that was
+ // allocated.
+ void (*AssignGLESBuffers)(PP_Resource video_decoder,
+ uint32_t no_of_buffers,
+ struct PP_GLESBuffer_Dev* buffers);
+ void (*AssignSysmemBuffers)(PP_Resource video_decoder,
uint32_t no_of_buffers,
- union PP_PictureData_Dev* picture_buffer);
+ struct PP_SysmemBuffer_Dev* buffers);
// Tells the decoder to reuse given picture buffer. Typical use of this
// function is to call from PictureReady callback to recycle picture buffer
@@ -164,7 +166,7 @@ struct PPB_VideoDecoder_Dev {
// |picture_buffer| contains the reference to the picture buffer that was
// processed.
void (*ReusePictureBuffer)(PP_Resource video_decoder,
- union PP_PictureData_Dev* picture_buffer);
+ int32_t picture_buffer_id);
// Dispatches flushing request to the decoder to flush both input and output
// buffers. Successful flushing will result in output of the pictures and
« no previous file with comments | « ppapi/c/dev/pp_video_dev.h ('k') | ppapi/c/dev/ppp_video_decoder_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698