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

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: vrk CR update. 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
« no previous file with comments | « ppapi/thunk/resource_creation_api.h ('k') | webkit/plugins/ppapi/ppb_video_decoder_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2347c4b84c29246f98a056d7d4a5a4487bedac96 100644
--- a/webkit/plugins/ppapi/ppb_video_decoder_impl.h
+++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.h
@@ -38,16 +38,17 @@ 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();
+ // See PPB_VideoDecoder_Dev::Create. Returns 0 on failure to create &
+ // initialize.
+ static PP_Resource Create(PluginInstance* instance,
+ 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 +76,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 +95,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_;
« no previous file with comments | « ppapi/thunk/resource_creation_api.h ('k') | webkit/plugins/ppapi/ppb_video_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698