| 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 24 matching lines...) Expand all Loading... |
| 35 virtual ~PPB_VideoDecoder_Impl(); | 35 virtual ~PPB_VideoDecoder_Impl(); |
| 36 | 36 |
| 37 // Returns a pointer to the interface implementing PPB_VideoDecoder that is | 37 // Returns a pointer to the interface implementing PPB_VideoDecoder that is |
| 38 // exposed to the plugin. | 38 // exposed to the plugin. |
| 39 static const PPB_VideoDecoder_Dev* GetInterface(); | 39 static const PPB_VideoDecoder_Dev* GetInterface(); |
| 40 | 40 |
| 41 // Resource overrides. | 41 // Resource overrides. |
| 42 virtual PPB_VideoDecoder_Impl* AsPPB_VideoDecoder_Impl(); | 42 virtual PPB_VideoDecoder_Impl* AsPPB_VideoDecoder_Impl(); |
| 43 | 43 |
| 44 // PPB_VideoDecoder implementation. | 44 // PPB_VideoDecoder implementation. |
| 45 bool GetConfigs(PP_VideoConfigElement* requested_configs, | 45 bool GetConfigs(const PP_VideoConfigElement* requested_configs, |
| 46 PP_VideoConfigElement* matching_configs, | 46 PP_VideoConfigElement* matching_configs, |
| 47 uint32_t matching_configs_size, | 47 uint32_t matching_configs_size, |
| 48 uint32_t* num_of_matching_configs); | 48 uint32_t* num_of_matching_configs); |
| 49 bool Init(PP_VideoConfigElement* dec_config, PP_CompletionCallback callback); | 49 bool Init(const PP_VideoConfigElement* dec_config, |
| 50 bool Decode(PP_VideoBitstreamBuffer_Dev* bitstream_buffer, | 50 PP_CompletionCallback callback); |
| 51 bool Decode(const PP_VideoBitstreamBuffer_Dev* bitstream_buffer, |
| 51 PP_CompletionCallback callback); | 52 PP_CompletionCallback callback); |
| 52 void AssignGLESBuffers(uint32_t no_of_buffers, | 53 void AssignGLESBuffers(uint32_t no_of_buffers, |
| 53 PP_GLESBuffer_Dev* buffers); | 54 const PP_GLESBuffer_Dev* buffers); |
| 54 void AssignSysmemBuffers(uint32_t no_of_buffers, | 55 void AssignSysmemBuffers(uint32_t no_of_buffers, |
| 55 PP_SysmemBuffer_Dev* buffers); | 56 const PP_SysmemBuffer_Dev* buffers); |
| 56 void ReusePictureBuffer(int32_t picture_buffer_id); | 57 void ReusePictureBuffer(int32_t picture_buffer_id); |
| 57 bool Flush(PP_CompletionCallback callback); | 58 bool Flush(PP_CompletionCallback callback); |
| 58 bool Abort(PP_CompletionCallback callback); | 59 bool Abort(PP_CompletionCallback callback); |
| 59 | 60 |
| 60 // media::VideoDecodeAccelerator::Client implementation. | 61 // media::VideoDecodeAccelerator::Client implementation. |
| 61 virtual void ProvidePictureBuffers( | 62 virtual void ProvidePictureBuffers( |
| 62 uint32 requested_num_of_buffers, | 63 uint32 requested_num_of_buffers, |
| 63 const gfx::Size& dimensions, | 64 const gfx::Size& dimensions, |
| 64 media::VideoDecodeAccelerator::MemoryType type) OVERRIDE; | 65 media::VideoDecodeAccelerator::MemoryType type) OVERRIDE; |
| 65 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; | 66 virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 88 // Reference to the plugin requesting this interface. | 89 // Reference to the plugin requesting this interface. |
| 89 const PPP_VideoDecoder_Dev* ppp_videodecoder_; | 90 const PPP_VideoDecoder_Dev* ppp_videodecoder_; |
| 90 | 91 |
| 91 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); | 92 DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace ppapi | 95 } // namespace ppapi |
| 95 } // namespace webkit | 96 } // namespace webkit |
| 96 | 97 |
| 97 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ | 98 #endif // WEBKIT_PLUGINS_PPAPI_PPB_VIDEO_DECODER_IMPL_H_ |
| OLD | NEW |