summaryrefslogtreecommitdiffstats
path: root/ppapi/cpp/dev/video_decoder_dev.h
diff options
context:
space:
mode:
authorpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-04 01:33:11 +0000
committerpolina@google.com <polina@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-04 01:33:11 +0000
commitb47815f17b42a73d3da78364bd10b501450db00b (patch)
tree2158508cbe879ac10076191e31681347eabf8ef2 /ppapi/cpp/dev/video_decoder_dev.h
parent1b576261ac143b13a290be9b2c3be0f246a6e466 (diff)
downloadchromium_src-b47815f17b42a73d3da78364bd10b501450db00b.zip
chromium_src-b47815f17b42a73d3da78364bd10b501450db00b.tar.gz
chromium_src-b47815f17b42a73d3da78364bd10b501450db00b.tar.bz2
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 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/cpp/dev/video_decoder_dev.h')
-rw-r--r--ppapi/cpp/dev/video_decoder_dev.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/ppapi/cpp/dev/video_decoder_dev.h b/ppapi/cpp/dev/video_decoder_dev.h
index 51aa594..e6558b1 100644
--- a/ppapi/cpp/dev/video_decoder_dev.h
+++ b/ppapi/cpp/dev/video_decoder_dev.h
@@ -54,15 +54,21 @@ class VideoDecoder : public Resource {
//
// Parameters:
// |instance| is the pointer to the plug-in instance.
- // |config| is the configuration on which the decoder should be initialized.
// |callback| will be called when decoder is initialized.
// |client| is the pointer to the client object. Ownership of the object is
// not transferred and it must outlive the lifetime of this class.
- VideoDecoder(const Instance* instance,
- const PP_VideoConfigElement* config,
- CompletionCallback callback, Client* client);
+ VideoDecoder(const Instance* instance, Client* client);
~VideoDecoder();
+ // Initializates the video decoder with a requested configuration.
+ // Calls Init() on PPB_VideoDecoder_Dev interface.
+ //
+ // Parameters:
+ // |config| is the configuration on which the decoder should be initialized.
+ // |callback| will be called when decoder is initialized.
+ int32_t Initialize(const PP_VideoConfigElement* config,
+ CompletionCallback callback);
+
// GetConfigs returns supported configurations that are subsets of given
// |prototype_config|.
bool GetConfigs(Instance* instance,
@@ -79,19 +85,19 @@ class VideoDecoder : public Resource {
// Decodes given bitstream buffer. Once decoder is done with processing
// |bitstream_buffer| is will call |callback| with provided user data.
- bool Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer,
- CompletionCallback callback);
+ int32_t Decode(const PP_VideoBitstreamBuffer_Dev& bitstream_buffer,
+ CompletionCallback callback);
// Tells the decoder to reuse given picture buffer.
void ReusePictureBuffer(int32_t picture_buffer_id);
// Flushes the decoder. |callback| will be called as soon as Flush has been
// finished.
- bool Flush(CompletionCallback callback);
+ int32_t Flush(CompletionCallback callback);
// Dispatches abortion request to the decoder to abort decoding as soon as
// possible. |callback| will be called as soon as abortion has been finished.
- bool Abort(CompletionCallback callback);
+ int32_t Abort(CompletionCallback callback);
private:
// Pointer to the plugin's video decoder support interface for providing the