| 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 <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 const scoped_refptr<Factories>& factories); | 63 const scoped_refptr<Factories>& factories); |
| 64 | 64 |
| 65 // VideoDecoder implementation. | 65 // VideoDecoder implementation. |
| 66 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, | 66 virtual void Initialize(const scoped_refptr<DemuxerStream>& stream, |
| 67 const PipelineStatusCB& status_cb, | 67 const PipelineStatusCB& status_cb, |
| 68 const StatisticsCB& statistics_cb) OVERRIDE; | 68 const StatisticsCB& statistics_cb) OVERRIDE; |
| 69 virtual void Read(const ReadCB& read_cb) OVERRIDE; | 69 virtual void Read(const ReadCB& read_cb) OVERRIDE; |
| 70 virtual void Reset(const base::Closure& closure) OVERRIDE; | 70 virtual void Reset(const base::Closure& closure) OVERRIDE; |
| 71 virtual void Stop(const base::Closure& closure) OVERRIDE; | 71 virtual void Stop(const base::Closure& closure) OVERRIDE; |
| 72 virtual bool HasAlpha() const OVERRIDE; | 72 virtual bool HasAlpha() const OVERRIDE; |
| 73 virtual void PrepareForShutdownHack() OVERRIDE; | |
| 74 | 73 |
| 75 // VideoDecodeAccelerator::Client implementation. | 74 // VideoDecodeAccelerator::Client implementation. |
| 76 virtual void NotifyInitializeDone() OVERRIDE; | 75 virtual void NotifyInitializeDone() OVERRIDE; |
| 77 virtual void ProvidePictureBuffers(uint32 count, | 76 virtual void ProvidePictureBuffers(uint32 count, |
| 78 const gfx::Size& size, | 77 const gfx::Size& size, |
| 79 uint32 texture_target) OVERRIDE; | 78 uint32 texture_target) OVERRIDE; |
| 80 virtual void DismissPictureBuffer(int32 id) OVERRIDE; | 79 virtual void DismissPictureBuffer(int32 id) OVERRIDE; |
| 81 virtual void PictureReady(const media::Picture& picture) OVERRIDE; | 80 virtual void PictureReady(const media::Picture& picture) OVERRIDE; |
| 82 virtual void NotifyEndOfBitstreamBuffer(int32 id) OVERRIDE; | 81 virtual void NotifyEndOfBitstreamBuffer(int32 id) OVERRIDE; |
| 83 virtual void NotifyFlushDone() OVERRIDE; | 82 virtual void NotifyFlushDone() OVERRIDE; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 gfx::Size natural_size; | 207 gfx::Size natural_size; |
| 209 }; | 208 }; |
| 210 std::list<BufferData> input_buffer_data_; | 209 std::list<BufferData> input_buffer_data_; |
| 211 | 210 |
| 212 // picture_buffer_id and the frame wrapping the corresponding Picture, for | 211 // picture_buffer_id and the frame wrapping the corresponding Picture, for |
| 213 // frames that have been decoded but haven't been requested by a Read() yet. | 212 // frames that have been decoded but haven't been requested by a Read() yet. |
| 214 std::list<scoped_refptr<VideoFrame> > ready_video_frames_; | 213 std::list<scoped_refptr<VideoFrame> > ready_video_frames_; |
| 215 int64 next_picture_buffer_id_; | 214 int64 next_picture_buffer_id_; |
| 216 int64 next_bitstream_buffer_id_; | 215 int64 next_bitstream_buffer_id_; |
| 217 | 216 |
| 218 // Indicates PrepareForShutdownHack()'s been called. Makes further calls to | |
| 219 // this class not require the render thread's loop to be processing. | |
| 220 bool shutting_down_; | |
| 221 | |
| 222 // Indicates decoding error occurred. | 217 // Indicates decoding error occurred. |
| 223 bool error_occured_; | 218 bool error_occured_; |
| 224 | 219 |
| 225 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 220 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
| 226 }; | 221 }; |
| 227 | 222 |
| 228 } // namespace media | 223 } // namespace media |
| 229 | 224 |
| 230 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 225 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
| OLD | NEW |