OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DECODER_STREAM_H_ | 5 #ifndef MEDIA_FILTERS_DECODER_STREAM_H_ |
6 #define MEDIA_FILTERS_DECODER_STREAM_H_ | 6 #define MEDIA_FILTERS_DECODER_STREAM_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 scoped_ptr<Decoder> decoder_; | 176 scoped_ptr<Decoder> decoder_; |
177 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; | 177 scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream_; |
178 | 178 |
179 SpliceObserverCB splice_observer_cb_; | 179 SpliceObserverCB splice_observer_cb_; |
180 ConfigChangeObserverCB config_change_observer_cb_; | 180 ConfigChangeObserverCB config_change_observer_cb_; |
181 | 181 |
182 // If a splice_timestamp() has been seen, this is true until a | 182 // If a splice_timestamp() has been seen, this is true until a |
183 // splice_timestamp() of kNoTimestamp() is encountered. | 183 // splice_timestamp() of kNoTimestamp() is encountered. |
184 bool active_splice_; | 184 bool active_splice_; |
185 | 185 |
| 186 // An end-of-stream buffer has been sent for decoding, no more buffers should |
| 187 // be sent for decoding until it completes. |
| 188 // TODO(sandersd): Turn this into a State. http://crbug.com/408316 |
| 189 bool decoding_eos_; |
| 190 |
186 // Decoded buffers that haven't been read yet. Used when the decoder supports | 191 // Decoded buffers that haven't been read yet. Used when the decoder supports |
187 // parallel decoding. | 192 // parallel decoding. |
188 std::list<scoped_refptr<Output> > ready_outputs_; | 193 std::list<scoped_refptr<Output> > ready_outputs_; |
189 | 194 |
190 // Number of outstanding decode requests sent to the |decoder_|. | 195 // Number of outstanding decode requests sent to the |decoder_|. |
191 int pending_decode_requests_; | 196 int pending_decode_requests_; |
192 | 197 |
193 // NOTE: Weak pointers must be invalidated before all other member variables. | 198 // NOTE: Weak pointers must be invalidated before all other member variables. |
194 base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_; | 199 base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_; |
195 | 200 |
196 // This is required so the VideoFrameStream can access private members in | 201 // This is required so the VideoFrameStream can access private members in |
197 // FinishInitialization() and ReportStatistics(). | 202 // FinishInitialization() and ReportStatistics(). |
198 DISALLOW_IMPLICIT_CONSTRUCTORS(DecoderStream); | 203 DISALLOW_IMPLICIT_CONSTRUCTORS(DecoderStream); |
199 }; | 204 }; |
200 | 205 |
201 template <> | 206 template <> |
202 bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const; | 207 bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const; |
203 | 208 |
204 template <> | 209 template <> |
205 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; | 210 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; |
206 | 211 |
207 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; | 212 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; |
208 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; | 213 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; |
209 | 214 |
210 } // namespace media | 215 } // namespace media |
211 | 216 |
212 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ | 217 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ |
OLD | NEW |