OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 5 #ifndef MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 6 #define MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 23 matching lines...) Expand all Loading... |
34 // but must be accessed and destroyed on GpuVideoAcceleratorFactories's | 34 // but must be accessed and destroyed on GpuVideoAcceleratorFactories's |
35 // GetMessageLoop(). | 35 // GetMessageLoop(). |
36 class MEDIA_EXPORT GpuVideoDecoder | 36 class MEDIA_EXPORT GpuVideoDecoder |
37 : public VideoDecoder, | 37 : public VideoDecoder, |
38 public VideoDecodeAccelerator::Client { | 38 public VideoDecodeAccelerator::Client { |
39 public: | 39 public: |
40 explicit GpuVideoDecoder( | 40 explicit GpuVideoDecoder( |
41 const scoped_refptr<GpuVideoAcceleratorFactories>& factories); | 41 const scoped_refptr<GpuVideoAcceleratorFactories>& factories); |
42 | 42 |
43 // VideoDecoder implementation. | 43 // VideoDecoder implementation. |
44 virtual std::string GetDisplayName() const OVERRIDE; | 44 virtual std::string GetDisplayName() const override; |
45 virtual void Initialize(const VideoDecoderConfig& config, | 45 virtual void Initialize(const VideoDecoderConfig& config, |
46 bool low_delay, | 46 bool low_delay, |
47 const PipelineStatusCB& status_cb, | 47 const PipelineStatusCB& status_cb, |
48 const OutputCB& output_cb) OVERRIDE; | 48 const OutputCB& output_cb) override; |
49 virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer, | 49 virtual void Decode(const scoped_refptr<DecoderBuffer>& buffer, |
50 const DecodeCB& decode_cb) OVERRIDE; | 50 const DecodeCB& decode_cb) override; |
51 virtual void Reset(const base::Closure& closure) OVERRIDE; | 51 virtual void Reset(const base::Closure& closure) override; |
52 virtual bool NeedsBitstreamConversion() const OVERRIDE; | 52 virtual bool NeedsBitstreamConversion() const override; |
53 virtual bool CanReadWithoutStalling() const OVERRIDE; | 53 virtual bool CanReadWithoutStalling() const override; |
54 virtual int GetMaxDecodeRequests() const OVERRIDE; | 54 virtual int GetMaxDecodeRequests() const override; |
55 | 55 |
56 // VideoDecodeAccelerator::Client implementation. | 56 // VideoDecodeAccelerator::Client implementation. |
57 virtual void ProvidePictureBuffers(uint32 count, | 57 virtual void ProvidePictureBuffers(uint32 count, |
58 const gfx::Size& size, | 58 const gfx::Size& size, |
59 uint32 texture_target) OVERRIDE; | 59 uint32 texture_target) override; |
60 virtual void DismissPictureBuffer(int32 id) OVERRIDE; | 60 virtual void DismissPictureBuffer(int32 id) override; |
61 virtual void PictureReady(const media::Picture& picture) OVERRIDE; | 61 virtual void PictureReady(const media::Picture& picture) override; |
62 virtual void NotifyEndOfBitstreamBuffer(int32 id) OVERRIDE; | 62 virtual void NotifyEndOfBitstreamBuffer(int32 id) override; |
63 virtual void NotifyFlushDone() OVERRIDE; | 63 virtual void NotifyFlushDone() override; |
64 virtual void NotifyResetDone() OVERRIDE; | 64 virtual void NotifyResetDone() override; |
65 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) OVERRIDE; | 65 virtual void NotifyError(media::VideoDecodeAccelerator::Error error) override; |
66 | 66 |
67 protected: | 67 protected: |
68 virtual ~GpuVideoDecoder(); | 68 virtual ~GpuVideoDecoder(); |
69 | 69 |
70 private: | 70 private: |
71 enum State { | 71 enum State { |
72 kNormal, | 72 kNormal, |
73 kDrainingDecoder, | 73 kDrainingDecoder, |
74 kDecoderDrained, | 74 kDecoderDrained, |
75 kError | 75 kError |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 // Bound to factories_->GetMessageLoop(). | 187 // Bound to factories_->GetMessageLoop(). |
188 // NOTE: Weak pointers must be invalidated before all other member variables. | 188 // NOTE: Weak pointers must be invalidated before all other member variables. |
189 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; | 189 base::WeakPtrFactory<GpuVideoDecoder> weak_factory_; |
190 | 190 |
191 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 191 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
192 }; | 192 }; |
193 | 193 |
194 } // namespace media | 194 } // namespace media |
195 | 195 |
196 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 196 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
OLD | NEW |