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

Unified Diff: ppapi/cpp/dev/video_decoder_dev.cc

Issue 6975053: PPAPI: Fix interface functions that take PP_CompletionCallbacks, but don't (Closed) Base URL: svn://chrome-svn/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
Index: ppapi/cpp/dev/video_decoder_dev.cc
===================================================================
--- ppapi/cpp/dev/video_decoder_dev.cc (revision 87397)
+++ ppapi/cpp/dev/video_decoder_dev.cc (working copy)
@@ -24,10 +24,7 @@
} // namespace
-VideoDecoder::VideoDecoder(const Instance* /* instance */,
- const std::vector<uint32_t>& /* config */,
- CompletionCallback /* callback */,
- Client* client)
+VideoDecoder::VideoDecoder(const Instance* /* instance */, Client* client)
: client_(client) {
if (!has_interface<PPB_VideoDecoder_Dev>())
return;
@@ -36,6 +33,12 @@
VideoDecoder::~VideoDecoder() {}
+int32_t VideoDecoder::Init(const std::vector<uint32_t>& /* config */,
+ CompletionCallback /* callback */) {
darin (slow to review) 2011/06/03 17:54:58 nit: indentation int32_t VideoDecoder::Init(a,
polina 2011/06/03 19:35:04 Done.
+ return PP_ERROR_FAILED;
+ // TODO(vmr): Implement.
+}
+
vector<uint32_t> VideoDecoder::GetConfigs(
Instance* /* instance */,
const vector<uint32_t>& /* prototype_config */) {
@@ -57,31 +60,33 @@
// TODO(vmr): Implement.
}
-bool VideoDecoder::Decode(
+int32_t VideoDecoder::Decode(
const PP_VideoBitstreamBuffer_Dev& /* bitstream_buffer */,
CompletionCallback /* callback */) {
// TODO(vmr): Implement.
- if (!has_interface<PPB_VideoDecoder_Dev>() || !pp_resource())
- return false;
- return false;
+ if (!has_interface<PPB_VideoDecoder_Dev>())
+ return PP_ERROR_NOINTERFACE;
+ if (!pp_resource())
+ return PP_ERROR_BADRESOURCE;
+ return PP_ERROR_FAILED;
}
void VideoDecoder::ReusePictureBuffer(int32_t /* picture_buffer_id */) {
// TODO(vmr): Implement.
}
-bool VideoDecoder::Flush(CompletionCallback /* callback */) {
+int32_t VideoDecoder::Flush(CompletionCallback /* callback */) {
// TODO(vmr): Implement.
if (!has_interface<PPB_VideoDecoder_Dev>())
- return false;
- return true;
+ return PP_ERROR_NOINTERFACE;
+ return PP_ERROR_FAILED;
}
-bool VideoDecoder::Abort(CompletionCallback /* callback */) {
+int32_t VideoDecoder::Abort(CompletionCallback /* callback */) {
// TODO(vmr): Implement.
if (!has_interface<PPB_VideoDecoder_Dev>())
- return false;
- return true;
+ return PP_ERROR_NOINTERFACE;
+ return PP_ERROR_FAILED;
}
} // namespace pp

Powered by Google App Engine
This is Rietveld 408576698