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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // This class should be constructed, used, and destructed on the main (render) | 48 // This class should be constructed, used, and destructed on the main (render) |
49 // thread. | 49 // thread. |
50 class VideoDecoderShim : public media::VideoDecodeAccelerator { | 50 class VideoDecoderShim : public media::VideoDecodeAccelerator { |
51 public: | 51 public: |
52 explicit VideoDecoderShim(PepperVideoDecoderHost* host); | 52 explicit VideoDecoderShim(PepperVideoDecoderHost* host); |
53 virtual ~VideoDecoderShim(); | 53 virtual ~VideoDecoderShim(); |
54 | 54 |
55 // media::VideoDecodeAccelerator implementation. | 55 // media::VideoDecodeAccelerator implementation. |
56 virtual bool Initialize( | 56 virtual bool Initialize( |
57 media::VideoCodecProfile profile, | 57 media::VideoCodecProfile profile, |
58 media::VideoDecodeAccelerator::Client* client) OVERRIDE; | 58 media::VideoDecodeAccelerator::Client* client) override; |
59 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) OVERRIDE; | 59 virtual void Decode(const media::BitstreamBuffer& bitstream_buffer) override; |
60 virtual void AssignPictureBuffers( | 60 virtual void AssignPictureBuffers( |
61 const std::vector<media::PictureBuffer>& buffers) OVERRIDE; | 61 const std::vector<media::PictureBuffer>& buffers) override; |
62 virtual void ReusePictureBuffer(int32 picture_buffer_id) OVERRIDE; | 62 virtual void ReusePictureBuffer(int32 picture_buffer_id) override; |
63 virtual void Flush() OVERRIDE; | 63 virtual void Flush() override; |
64 virtual void Reset() OVERRIDE; | 64 virtual void Reset() override; |
65 virtual void Destroy() OVERRIDE; | 65 virtual void Destroy() override; |
66 | 66 |
67 private: | 67 private: |
68 enum State { | 68 enum State { |
69 UNINITIALIZED, | 69 UNINITIALIZED, |
70 DECODING, | 70 DECODING, |
71 FLUSHING, | 71 FLUSHING, |
72 RESETTING, | 72 RESETTING, |
73 }; | 73 }; |
74 | 74 |
75 struct PendingDecode; | 75 struct PendingDecode; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 uint32_t num_pending_decodes_; | 123 uint32_t num_pending_decodes_; |
124 | 124 |
125 base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_; | 125 base::WeakPtrFactory<VideoDecoderShim> weak_ptr_factory_; |
126 | 126 |
127 DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim); | 127 DISALLOW_COPY_AND_ASSIGN(VideoDecoderShim); |
128 }; | 128 }; |
129 | 129 |
130 } // namespace content | 130 } // namespace content |
131 | 131 |
132 #endif // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ | 132 #endif // CONTENT_RENDERER_PEPPER_VIDEO_DECODER_SHIM_H_ |
OLD | NEW |