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

Side by Side 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, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 28 matching lines...) Expand all
39 public media::VideoDecodeAccelerator::Client { 39 public media::VideoDecodeAccelerator::Client {
40 public: 40 public:
41 explicit PPB_VideoDecoder_Impl(PluginInstance* instance); 41 explicit PPB_VideoDecoder_Impl(PluginInstance* instance);
42 virtual ~PPB_VideoDecoder_Impl(); 42 virtual ~PPB_VideoDecoder_Impl();
43 43
44 // ResourceObjectBase overrides. 44 // ResourceObjectBase overrides.
45 virtual PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE; 45 virtual PPB_VideoDecoder_API* AsPPB_VideoDecoder_API() OVERRIDE;
46 46
47 // PPB_VideoDecoder_API implementation. 47 // PPB_VideoDecoder_API implementation.
48 virtual int32_t Initialize(PP_Resource context_id, 48 virtual int32_t Initialize(PP_Resource context_id,
49 const PP_VideoConfigElement* dec_config, 49 const PP_VideoConfigElement* dec_config) OVERRIDE;
50 PP_CompletionCallback callback) OVERRIDE;
51 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, 50 virtual int32_t Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer,
52 PP_CompletionCallback callback) OVERRIDE; 51 PP_CompletionCallback callback) OVERRIDE;
53 virtual void AssignPictureBuffers( 52 virtual void AssignPictureBuffers(
54 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE; 53 uint32_t no_of_buffers, const PP_PictureBuffer_Dev* buffers) OVERRIDE;
55 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE; 54 virtual void ReusePictureBuffer(int32_t picture_buffer_id) OVERRIDE;
56 virtual int32_t Flush(PP_CompletionCallback callback) OVERRIDE; 55 virtual int32_t Flush(PP_CompletionCallback callback) OVERRIDE;
57 virtual int32_t Reset(PP_CompletionCallback callback) OVERRIDE; 56 virtual int32_t Reset(PP_CompletionCallback callback) OVERRIDE;
58 virtual void Destroy() OVERRIDE; 57 virtual void Destroy() OVERRIDE;
59 58
60 // media::VideoDecodeAccelerator::Client implementation. 59 // media::VideoDecodeAccelerator::Client implementation.
(...skipping 21 matching lines...) Expand all
82 // swapped with another. 81 // swapped with another.
83 scoped_refptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_; 82 scoped_refptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_;
84 83
85 // Factory to produce our callbacks. 84 // Factory to produce our callbacks.
86 base::ScopedCallbackFactory<PPB_VideoDecoder_Impl> callback_factory_; 85 base::ScopedCallbackFactory<PPB_VideoDecoder_Impl> callback_factory_;
87 86
88 // The resource ID of the underlying Context3d object being used. Used only 87 // The resource ID of the underlying Context3d object being used. Used only
89 // for reference counting to keep it alive for the lifetime of |*this|. 88 // for reference counting to keep it alive for the lifetime of |*this|.
90 PP_Resource context3d_id_; 89 PP_Resource context3d_id_;
91 90
92 PP_CompletionCallback initialization_callback_;
93 PP_CompletionCallback flush_callback_; 91 PP_CompletionCallback flush_callback_;
94 PP_CompletionCallback reset_callback_; 92 PP_CompletionCallback reset_callback_;
95 CallbackById bitstream_buffer_callbacks_; 93 CallbackById bitstream_buffer_callbacks_;
96 94
97 // Reference to the plugin requesting this interface. 95 // Reference to the plugin requesting this interface.
98 const PPP_VideoDecoder_Dev* ppp_videodecoder_; 96 const PPP_VideoDecoder_Dev* ppp_videodecoder_;
99 97
100 // Reference to the GLES2Implementation owned by PPB_Context3D_Impl. 98 // Reference to the GLES2Implementation owned by PPB_Context3D_Impl.
101 // PPB_Context3D_Impl is guaranteed to be alive for the lifetime of this 99 // PPB_Context3D_Impl is guaranteed to be alive for the lifetime of this
102 // class. 100 // class.
103 // In the out-of-process case, Context3D's gles2_impl() exists in the plugin 101 // In the out-of-process case, Context3D's gles2_impl() exists in the plugin
104 // process only, so gles2_impl_ is NULL in that case. 102 // process only, so gles2_impl_ is NULL in that case.
105 gpu::gles2::GLES2Implementation* gles2_impl_; 103 gpu::gles2::GLES2Implementation* gles2_impl_;
106 104
107 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); 105 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl);
108 }; 106 };
109 107
110 } // namespace ppapi 108 } // namespace ppapi
111 } // namespace webkit 109 } // namespace webkit
112 110
113 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ 111 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698