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

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

Issue 7058061: Revert 87905 (broke PPAPITest.Scrollbar on win) - PPAPI: Fix interface functions that take PP_Com... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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/ppb_layer_compositor_dev.h ('k') | ppapi/cpp/dev/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
===================================================================
--- ppapi/c/dev/ppb_video_decoder_dev.h (revision 87917)
+++ ppapi/c/dev/ppb_video_decoder_dev.h (working copy)
@@ -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 @@
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 @@
// 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 @@
// 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 @@
// 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 @@
// 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 @@
// 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 @@
// 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);
};
« no previous file with comments | « ppapi/c/dev/ppb_layer_compositor_dev.h ('k') | ppapi/cpp/dev/video_decoder_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698