OLD | NEW |
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; | 70 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; |
71 virtual void PictureReady(const media::Picture& picture) OVERRIDE; | 71 virtual void PictureReady(const media::Picture& picture) OVERRIDE; |
72 virtual void NotifyInitializeDone() OVERRIDE; | 72 virtual void NotifyInitializeDone() OVERRIDE; |
73 virtual void NotifyEndOfStream() OVERRIDE; | 73 virtual void NotifyEndOfStream() OVERRIDE; |
74 virtual void NotifyError( | 74 virtual void NotifyError( |
75 media::VideoDecodeAccelerator::Error error) OVERRIDE; | 75 media::VideoDecodeAccelerator::Error error) OVERRIDE; |
76 virtual void NotifyFlushDone() OVERRIDE; | 76 virtual void NotifyFlushDone() OVERRIDE; |
77 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE; | 77 virtual void NotifyEndOfBitstreamBuffer(int32 buffer_id) OVERRIDE; |
78 virtual void NotifyResetDone() OVERRIDE; | 78 virtual void NotifyResetDone() OVERRIDE; |
79 | 79 |
80 protected: | |
81 // VideoDecoderImpl implementation. | |
82 virtual bool Init(PP_Resource context3d_id, | |
83 ::ppapi::thunk::PPB_Context3D_API* context, | |
84 const PP_VideoConfigElement* dec_config) OVERRIDE; | |
85 | |
86 private: | 80 private: |
87 explicit PPB_VideoDecoder_Impl(PP_Instance instance); | 81 explicit PPB_VideoDecoder_Impl(PP_Instance instance); |
| 82 bool Init(PP_Resource context3d_id, |
| 83 PluginDelegate::PlatformContext3D* context, |
| 84 gpu::gles2::GLES2Implementation* gles2_impl, |
| 85 const PP_VideoConfigElement* config); |
88 | 86 |
89 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is | 87 // This is NULL before initialization, and if this PPB_VideoDecoder_Impl is |
90 // swapped with another. | 88 // swapped with another. |
91 scoped_refptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_; | 89 scoped_refptr<PluginDelegate::PlatformVideoDecoder> platform_video_decoder_; |
92 | 90 |
93 // Reference to the plugin requesting this interface. | 91 // Reference to the plugin requesting this interface. |
94 const PPP_VideoDecoder_Dev* ppp_videodecoder_; | 92 const PPP_VideoDecoder_Dev* ppp_videodecoder_; |
95 | 93 |
96 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); | 94 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); |
97 }; | 95 }; |
98 | 96 |
99 } // namespace ppapi | 97 } // namespace ppapi |
100 } // namespace webkit | 98 } // namespace webkit |
101 | 99 |
102 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ | 100 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ |
OLD | NEW |