| 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 <utility> | 10 #include <utility> |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 // actually corresponds to VideoDecodeAccelerator::Reset(), confusingly | 95 // actually corresponds to VideoDecodeAccelerator::Reset(), confusingly |
| 96 // enough). | 96 // enough). |
| 97 kDrainingDecoder, | 97 kDrainingDecoder, |
| 98 kDecoderDrained, | 98 kDecoderDrained, |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 // If no demuxer read is in flight and no bitstream buffers are in the | 101 // If no demuxer read is in flight and no bitstream buffers are in the |
| 102 // decoder, kick some off demuxing/decoding. | 102 // decoder, kick some off demuxing/decoding. |
| 103 void EnsureDemuxOrDecode(); | 103 void EnsureDemuxOrDecode(); |
| 104 | 104 |
| 105 // Return true if more decode work can be piled on to the VDA. |
| 106 bool CanMoreDecodeWorkBeDone(); |
| 107 |
| 105 // Callback to pass to demuxer_stream_->Read() for receiving encoded bits. | 108 // Callback to pass to demuxer_stream_->Read() for receiving encoded bits. |
| 106 void RequestBufferDecode(DemuxerStream::Status status, | 109 void RequestBufferDecode(DemuxerStream::Status status, |
| 107 const scoped_refptr<DecoderBuffer>& buffer); | 110 const scoped_refptr<DecoderBuffer>& buffer); |
| 108 | 111 |
| 109 // Enqueue a frame for later delivery (or drop it on the floor if a | 112 // Enqueue a frame for later delivery (or drop it on the floor if a |
| 110 // vda->Reset() is in progress) and trigger out-of-line delivery of the oldest | 113 // vda->Reset() is in progress) and trigger out-of-line delivery of the oldest |
| 111 // ready frame to the client if there is a pending read. A NULL |frame| | 114 // ready frame to the client if there is a pending read. A NULL |frame| |
| 112 // merely triggers delivery, and requires the ready_video_frames_ queue not be | 115 // merely triggers delivery, and requires the ready_video_frames_ queue not be |
| 113 // empty. | 116 // empty. |
| 114 void EnqueueFrameAndTriggerFrameDelivery( | 117 void EnqueueFrameAndTriggerFrameDelivery( |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 219 |
| 217 // Indicates decoding error occurred. | 220 // Indicates decoding error occurred. |
| 218 bool error_occured_; | 221 bool error_occured_; |
| 219 | 222 |
| 220 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 223 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
| 221 }; | 224 }; |
| 222 | 225 |
| 223 } // namespace media | 226 } // namespace media |
| 224 | 227 |
| 225 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 228 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
| OLD | NEW |