diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-04 04:44:48 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-04 04:44:48 +0000 |
commit | 9f9fee6343b8e96ab2a345bc66251e4b8f182547 (patch) | |
tree | ef37950362454ed5ef74ad4263d08312033df831 /ppapi/c/dev/ppb_video_decoder_dev.h | |
parent | 1e16ac0f958d5bcc0012c68ad3c04908e3a64788 (diff) | |
download | chromium_src-9f9fee6343b8e96ab2a345bc66251e4b8f182547.zip chromium_src-9f9fee6343b8e96ab2a345bc66251e4b8f182547.tar.gz chromium_src-9f9fee6343b8e96ab2a345bc66251e4b8f182547.tar.bz2 |
Revert 87905 (broke PPAPITest.Scrollbar on win) - PPAPI: Fix interface functions that take PP_CompletionCallbacks, but don't
return codes from pp_errors.h
BUG=none
TEST=compile + manually run ppapi_tests::VideoDecoder
Review URL: http://codereview.chromium.org/6975053
TBR=polina@google.com
Review URL: http://codereview.chromium.org/7058061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c/dev/ppb_video_decoder_dev.h')
-rw-r--r-- | ppapi/c/dev/ppb_video_decoder_dev.h | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/ppapi/c/dev/ppb_video_decoder_dev.h b/ppapi/c/dev/ppb_video_decoder_dev.h index 4ec65df..12f6d5f 100644 --- a/ppapi/c/dev/ppb_video_decoder_dev.h +++ b/ppapi/c/dev/ppb_video_decoder_dev.h @@ -52,7 +52,7 @@ // |###########################| // | GetConfigs | // |-------------------------->| -// | Create + Initialize | +// | Create | // |-------------------------->| Decoder will ask for certain number // | (Decode) | of PictureBuffers. This may happen // |- - - - - - - - - - - - - >| either directly after constructor or @@ -121,16 +121,7 @@ struct PPB_VideoDecoder_Dev { uint32_t matching_configs_size, uint32_t* num_of_matching_configs); - // Creates a video decoder. Initialize() must be called afterwards to - // set its configuration. - // - // Parameters: - // |instance| pointer to the plugin instance. - // - // The created decoder is returned as PP_Resource. 0 means failure. - PP_Resource (*Create)(PP_Instance instance); - - // Initializes the video decoder with requested configuration. + // Creates a video decoder with requested |decoder_config|. // |input_format| in |decoder_config| specifies the format of input access // unit, with PP_VIDEOKEY_CODECID and PP_VIDEOKEY_PAYLOADFORMAT required. // Plugin has the option to specify codec profile/level and other @@ -138,13 +129,13 @@ struct PPB_VideoDecoder_Dev { // the most appropriate decoder. // // Parameters: - // |video_decoder| is the previously created handle to the decoder resource. - // |decoder_config| the configuration to use to initialize the decoder. - // |callback| called after initialization is complete. + // |instance| pointer to the plugin instance. + // |dec_config| the configuration which to use to initialize the decoder. + // |callback| called after initialize is complete. // - // Returns an error code from pp_errors.h. - int32_t (*Initialize)(PP_Resource video_decoder, - const PP_VideoConfigElement* decoder_config, + // The created decoder is returned as PP_Resource. NULL means failure. + PP_Resource (*Create)(PP_Instance instance, + const PP_VideoConfigElement* dec_config, struct PP_CompletionCallback callback); // Tests whether |resource| is a video decoder created through Create @@ -160,13 +151,14 @@ struct PPB_VideoDecoder_Dev { // non-blocking function. // // Parameters: - // |video_decoder| is the previously created handle to the decoder resource. + // |video_decoder| is the previously created handle to the decoder instance. // |bitstream_buffer| is the bitstream buffer that contains the input data. // |callback| will be called when |bitstream_buffer| has been processed by // the decoder. // - // Returns an error code from pp_errors.h. - int32_t (*Decode)(PP_Resource video_decoder, + // Returns PP_TRUE on decoder successfully accepting buffer, PP_FALSE + // otherwise. + PP_Bool (*Decode)(PP_Resource video_decoder, const struct PP_VideoBitstreamBuffer_Dev* bitstream_buffer, struct PP_CompletionCallback callback); @@ -193,7 +185,7 @@ struct PPB_VideoDecoder_Dev { // PPB API. // // Parameters: - // |video_decoder| is the previously created handle to the decoder resource. + // |video_decoder| is the previously created handle to the decoder instance. // |no_of_buffers| how many buffers are behind picture buffer pointer. // |buffers| contains the reference to the picture buffer that was // allocated. @@ -218,7 +210,7 @@ struct PPB_VideoDecoder_Dev { // the GL textures for writing output again. // // Parameters: - // |video_decoder| is the previously created handle to the decoder resource. + // |video_decoder| is the previously created handle to the decoder instance. // |picture_buffer_id| contains the id of the picture buffer that was // processed. void (*ReusePictureBuffer)(PP_Resource video_decoder, @@ -231,12 +223,13 @@ struct PPB_VideoDecoder_Dev { // decode will call the |callback|. // // Parameters: - // |video_decoder| is the previously created handle to the decoder resource. + // |video_decoder| is the previously created handle to the decoder instance. // |callback| is one-time callback that will be called once the flushing // request has been completed. // - // Returns an error code from pp_errors.h. - int32_t (*Flush)(PP_Resource video_decoder, + // Returns PP_TRUE on acceptance of flush request and PP_FALSE if request to + // flush is rejected by the decoder. + PP_Bool (*Flush)(PP_Resource video_decoder, struct PP_CompletionCallback callback); // Dispatches abortion request to the decoder to abort decoding as soon as @@ -246,12 +239,13 @@ struct PPB_VideoDecoder_Dev { // to dismiss them. // // Parameters: - // |video_decoder| is the previously created handle to the decoder resource. + // |video_decoder| is the previously created handle to the decoder instance. // |callback| is one-time callback that will be called once the abortion // request has been completed. // - // Returns an error code from pp_errors.h. - int32_t (*Abort)(PP_Resource video_decoder, + // Returns PP_TRUE on acceptance of abort request and PP_FALSE if request to + // abort is rejected by the decoder. + PP_Bool (*Abort)(PP_Resource video_decoder, struct PP_CompletionCallback callback); }; |