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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 kNormal, | 105 kNormal, |
106 // Avoid the use of "flush" in these enums because the term is overloaded: | 106 // Avoid the use of "flush" in these enums because the term is overloaded: |
107 // Filter::Flush() means drop pending data on the floor, but | 107 // Filter::Flush() means drop pending data on the floor, but |
108 // VideoDecodeAccelerator::Flush() means drain pending data (Filter::Flush() | 108 // VideoDecodeAccelerator::Flush() means drain pending data (Filter::Flush() |
109 // actually corresponds to VideoDecodeAccelerator::Reset(), confusingly | 109 // actually corresponds to VideoDecodeAccelerator::Reset(), confusingly |
110 // enough). | 110 // enough). |
111 kDrainingDecoder, | 111 kDrainingDecoder, |
112 kDecoderDrained, | 112 kDecoderDrained, |
113 }; | 113 }; |
114 | 114 |
| 115 void ReadFromDemuxerStream(); |
| 116 |
115 // If no demuxer read is in flight and no bitstream buffers are in the | 117 // If no demuxer read is in flight and no bitstream buffers are in the |
116 // decoder, kick some off demuxing/decoding. | 118 // decoder, kick some off demuxing/decoding. |
117 void EnsureDemuxOrDecode(); | 119 void EnsureDemuxOrDecode(); |
118 | 120 |
119 // Return true if more decode work can be piled on to the VDA. | 121 // Return true if more decode work can be piled on to the VDA. |
120 bool CanMoreDecodeWorkBeDone(); | 122 bool CanMoreDecodeWorkBeDone(); |
121 | 123 |
122 // Callback to pass to demuxer_stream_->Read() for receiving encoded bits. | 124 // Callback to pass to demuxer_stream_->Read() for receiving encoded bits. |
123 void RequestBufferDecode(DemuxerStream::Status status, | 125 void RequestBufferDecode(DemuxerStream::Status status, |
124 const scoped_refptr<DecoderBuffer>& buffer); | 126 const scoped_refptr<DecoderBuffer>& buffer); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 // Set during ProvidePictureBuffers(), used for checking and implementing | 239 // Set during ProvidePictureBuffers(), used for checking and implementing |
238 // HasAvailableOutputFrames(). | 240 // HasAvailableOutputFrames(). |
239 int available_pictures_; | 241 int available_pictures_; |
240 | 242 |
241 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); | 243 DISALLOW_COPY_AND_ASSIGN(GpuVideoDecoder); |
242 }; | 244 }; |
243 | 245 |
244 } // namespace media | 246 } // namespace media |
245 | 247 |
246 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ | 248 #endif // MEDIA_FILTERS_GPU_VIDEO_DECODER_H_ |
OLD | NEW |