| OLD | NEW | 
|    1 // Copyright 2014 The Chromium Authors. All rights reserved. |    1 // Copyright 2014 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 CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ |    5 #ifndef CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ | 
|    6 #define CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ |    6 #define CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ | 
|    7  |    7  | 
|    8 #include <queue> |    8 #include <queue> | 
|    9 #include <vector> |    9 #include <vector> | 
|   10  |   10  | 
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   43 // This class is a shim to wrap a media::VideoDecoder so that it can be used |   43 // This class is a shim to wrap a media::VideoDecoder so that it can be used | 
|   44 // by PepperVideoDecoderHost in place of a media::VideoDecodeAccelerator. |   44 // by PepperVideoDecoderHost in place of a media::VideoDecodeAccelerator. | 
|   45 // This class should be constructed, used, and destructed on the main (render) |   45 // This class should be constructed, used, and destructed on the main (render) | 
|   46 // thread. |   46 // thread. | 
|   47 class VideoDecoderShim : public media::VideoDecodeAccelerator { |   47 class VideoDecoderShim : public media::VideoDecodeAccelerator { | 
|   48  public: |   48  public: | 
|   49   VideoDecoderShim(PepperVideoDecoderHost* host, uint32_t texture_pool_size); |   49   VideoDecoderShim(PepperVideoDecoderHost* host, uint32_t texture_pool_size); | 
|   50   ~VideoDecoderShim() override; |   50   ~VideoDecoderShim() override; | 
|   51  |   51  | 
|   52   // media::VideoDecodeAccelerator implementation. |   52   // media::VideoDecodeAccelerator implementation. | 
|   53   bool Initialize(media::VideoCodecProfile profile, |   53   bool Initialize(const media::VideoDecodeAccelerator::InitParams& params, | 
|   54                   media::VideoDecodeAccelerator::Client* client) override; |   54                   media::VideoDecodeAccelerator::Client* client) override; | 
|   55   void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |   55   void Decode(const media::BitstreamBuffer& bitstream_buffer) override; | 
|   56   void AssignPictureBuffers( |   56   void AssignPictureBuffers( | 
|   57       const std::vector<media::PictureBuffer>& buffers) override; |   57       const std::vector<media::PictureBuffer>& buffers) override; | 
|   58   void ReusePictureBuffer(int32 picture_buffer_id) override; |   58   void ReusePictureBuffer(int32 picture_buffer_id) override; | 
|   59   void Flush() override; |   59   void Flush() override; | 
|   60   void Reset() override; |   60   void Reset() override; | 
|   61   void Destroy() override; |   61   void Destroy() override; | 
|   62  |   62  | 
|   63  private: |   63  private: | 
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  121   scoped_ptr<YUVConverter> yuv_converter_; |  121   scoped_ptr<YUVConverter> yuv_converter_; | 
|  122  |  122  | 
|  123   base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_; |  123   base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_; | 
|  124  |  124  | 
|  125   DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim); |  125   DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim); | 
|  126 }; |  126 }; | 
|  127  |  127  | 
|  128 }  // namespace content |  128 }  // namespace content | 
|  129  |  129  | 
|  130 #endif  // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ |  130 #endif  // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ | 
| OLD | NEW |