OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_COMMON_GPU_MEDIA_VP8_DECODER_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_VP8_DECODER_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_VP8_DECODER_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_VP8_DECODER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/common/gpu/media/accelerated_video_decoder.h" | 10 #include "content/common/gpu/media/accelerated_video_decoder.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 }; | 59 }; |
60 | 60 |
61 VP8Decoder(VP8Accelerator* accelerator); | 61 VP8Decoder(VP8Accelerator* accelerator); |
62 ~VP8Decoder() override; | 62 ~VP8Decoder() override; |
63 | 63 |
64 // content::AcceleratedVideoDecoder implementation. | 64 // content::AcceleratedVideoDecoder implementation. |
65 bool Flush() override WARN_UNUSED_RESULT; | 65 bool Flush() override WARN_UNUSED_RESULT; |
66 void Reset() override; | 66 void Reset() override; |
67 void SetStream(const uint8_t* ptr, size_t size) override; | 67 void SetStream(const uint8_t* ptr, size_t size) override; |
68 DecodeResult Decode() override WARN_UNUSED_RESULT; | 68 DecodeResult Decode() override WARN_UNUSED_RESULT; |
69 gfx::Size GetPicSize() const override { return pic_size_; } | 69 gfx::Size GetPicSize() const override; |
70 size_t GetRequiredNumOfPictures() const override; | 70 size_t GetRequiredNumOfPictures() const override; |
71 | 71 |
72 private: | 72 private: |
73 bool DecodeAndOutputCurrentFrame(); | 73 bool DecodeAndOutputCurrentFrame(); |
74 void RefreshReferenceFrames(); | 74 void RefreshReferenceFrames(); |
75 | 75 |
76 enum State { | 76 enum State { |
77 kNeedStreamMetadata, // After initialization, need a keyframe. | 77 kNeedStreamMetadata, // After initialization, need a keyframe. |
78 kDecoding, // Ready to decode from any point. | 78 kDecoding, // Ready to decode from any point. |
79 kAfterReset, // After Reset(), need a resume point. | 79 kAfterReset, // After Reset(), need a resume point. |
(...skipping 18 matching lines...) Expand all Loading... |
98 int vertical_scale_; | 98 int vertical_scale_; |
99 | 99 |
100 VP8Accelerator* accelerator_; | 100 VP8Accelerator* accelerator_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(VP8Decoder); | 102 DISALLOW_COPY_AND_ASSIGN(VP8Decoder); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace content | 105 } // namespace content |
106 | 106 |
107 #endif // CONTENT_COMMON_GPU_MEDIA_VP8_DECODER_H_ | 107 #endif // CONTENT_COMMON_GPU_MEDIA_VP8_DECODER_H_ |
OLD | NEW |