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

Unified Diff: webkit/plugins/ppapi/ppb_video_decoder_impl.h

Issue 7474006: PPB_VideoDecoder_Dev::Initialize is now synchronous! (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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: webkit/plugins/ppapi/ppb_video_decoder_impl.h
diff --git a/webkit/plugins/ppapi/ppb_video_decoder_impl.h b/webkit/plugins/ppapi/ppb_video_decoder_impl.h
index b6193e73e4f44a6b42ef8902ed2bd0707dc0631c..6df9db816986e098e77515eb9f4827717d0bd36a 100644
--- a/webkit/plugins/ppapi/ppb_video_decoder_impl.h
+++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.h
@@ -38,16 +38,15 @@ class PPB_VideoDecoder_Impl : public Resource,
public ::ppapi::thunk::PPB_VideoDecoder_API,
public media::VideoDecodeAccelerator::Client {
public:
- explicit PPB_VideoDecoder_Impl(PluginInstance* instance);
virtual ~PPB_VideoDecoder_Impl();
+ static PP_Resource Create(PluginInstance* instance,
vrk (LEFT CHROMIUM) 2011/07/29 18:11:02 comment? Perhaps mention that it returns 0 if it f
Ami GONE FROM CHROMIUM 2011/07/29 18:20:41 Done.
+ PP_Resource context3d_id,
+ const PP_VideoConfigElement* config);
// ResourceObjectBase overrides.
virtual PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE;
// PPB_VideoDecoder_API implementation.
- virtual int32_t Initialize(PP_Resource context_id,
- const PP_VideoConfigElement* dec_config,
- PP_CompletionCallback callback) OVERRIDE;
virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
PP_CompletionCallback callback) OVERRIDE;
virtual void AssignPictureBuffers(
@@ -75,6 +74,11 @@ class PPB_VideoDecoder_Impl : public Resource,
// done.
typedef std::map<int32, PP_CompletionCallback> CallbackById;
+ explicit PPB_VideoDecoder_Impl(PluginInstance* instance);
+
+ // Initialize the underlying decoder and return success status.
+ bool Init(PP_Resource context_id, const PP_VideoConfigElement* dec_config);
+
// Tell command buffer to process all commands it has received so far.
void FlushCommandBuffer();
@@ -89,7 +93,6 @@ class PPB_VideoDecoder_Impl : public Resource,
// for reference counting to keep it alive for the lifetime of |*this|.
PP_Resource context3d_id_;
- PP_CompletionCallback initialization_callback_;
PP_CompletionCallback flush_callback_;
PP_CompletionCallback reset_callback_;
CallbackById bitstream_buffer_callbacks_;

Powered by Google App Engine
This is Rietveld 408576698