Chromium Code Reviews| 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 1040923d424dc9a9c7b5206fa77a7067dfb69da3..331533b360dedb23934458ec30dbac1db783d357 100644 |
| --- a/webkit/plugins/ppapi/ppb_video_decoder_impl.h |
| +++ b/webkit/plugins/ppapi/ppb_video_decoder_impl.h |
| @@ -11,14 +11,13 @@ |
| #include "base/compiler_specific.h" |
| #include "base/memory/scoped_callback_factory.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "ppapi/c/dev/pp_video_dev.h" |
| #include "ppapi/c/pp_var.h" |
| #include "webkit/plugins/ppapi/plugin_delegate.h" |
| #include "webkit/plugins/ppapi/resource.h" |
| -union PP_PictureData_Dev; |
| -struct PP_VideoDecoderConfig_Dev; |
| -struct PP_VideoBitstreamBuffer_Dev; |
| struct PPB_VideoDecoder_Dev; |
| +struct PPP_VideoDecoder_Dev; |
| namespace webkit { |
| namespace ppapi { |
| @@ -39,32 +38,44 @@ class PPB_VideoDecoder_Impl : public Resource, |
| virtual PPB_VideoDecoder_Impl* AsPPB_VideoDecoder_Impl(); |
| // PPB_VideoDecoder implementation. |
| - bool GetConfigs(PP_VideoDecoderConfig_Dev* proto_config, |
| - PP_VideoDecoderConfig_Dev* matching_configs, |
| - int32_t matching_configs_size, |
| - int32_t* num_of_matching_configs); |
| - bool Init(PP_VideoDecoderConfig_Dev* dec_config); |
| + bool GetConfigs(PP_VideoConfigElement* proto_configs, |
| + PP_VideoConfigElement* matching_configs, |
| + uint32_t matching_configs_size, |
| + uint32_t* num_of_matching_configs); |
| + bool Init(PP_VideoConfigElement* dec_config); |
| bool Decode(PP_VideoBitstreamBuffer_Dev* bitstream_buffer, |
| PP_CompletionCallback callback); |
| void AssignPictureBuffer(uint32_t no_of_picture_buffers, |
| - PP_PictureData_Dev* picture_buffers); |
| - void ReusePictureBuffer(PP_PictureData_Dev* picture_buffer); |
| + PP_PictureBuffer_Dev* picture_buffers); |
| + void ReusePictureBuffer(int32_t picture_buffer_id); |
| bool Flush(PP_CompletionCallback callback); |
| bool Abort(PP_CompletionCallback callback); |
| // media::VideoDecodeAccelerator::Client implementation. |
| virtual void ProvidePictureBuffers( |
| - uint32_t requested_num_of_buffers, |
| - const std::vector<uint32_t>& buffer_properties) OVERRIDE; |
| - virtual void DismissPictureBuffer( |
| - media::VideoDecodeAccelerator::PictureBuffer* picture_buffer) OVERRIDE; |
| + uint32 requested_num_of_buffers, |
| + gfx::Size dimensions, |
| + media::PictureBuffer::MemoryType type) OVERRIDE; |
| + virtual void DismissPictureBuffer(int32 picture_buffer_id) OVERRIDE; |
| virtual void PictureReady( |
| - media::VideoDecodeAccelerator::Picture* picture) OVERRIDE; |
| + const media::Picture& picture) OVERRIDE; |
| virtual void NotifyEndOfStream() OVERRIDE; |
| virtual void NotifyError( |
| media::VideoDecodeAccelerator::Error error) OVERRIDE; |
| private: |
| + static bool CopyToMediaPictureBuffer(const PP_PictureBuffer_Dev& input, |
| + media::PictureBuffer& output); |
|
Ami GONE FROM CHROMIUM
2011/04/29 18:40:34
per offline convo, you should be able to drop all
vrk (LEFT CHROMIUM)
2011/05/03 18:19:58
Ah, I actually kept the last two because they are
|
| + |
| + static bool CopyToMediaPicture(const PP_Picture_Dev& input, |
| + media::Picture& output); |
| + |
| + static bool CopyToPictureDev(const media::Picture& input, |
| + PP_Picture_Dev& output); |
| + |
| + static bool CopyToConfigList(const PP_VideoConfigElement* configs, |
| + std::vector<uint32>& output); |
| + |
| void OnAbortComplete(); |
| void OnBitstreamBufferProcessed(); |
| void OnFlushComplete(); |
| @@ -80,6 +91,9 @@ class PPB_VideoDecoder_Impl : public Resource, |
| PP_CompletionCallback flush_callback_; |
| PP_CompletionCallback bitstream_buffer_callback_; |
| + // Reference to the plugin requesting this interface. |
| + const PPP_VideoDecoder_Dev* ppp_videodecoder_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(PPB_VideoDecoder_Impl); |
| }; |