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 the resulting flush completes. | |
xhwang
2014/08/21 16:37:07
nit: s/until .../unless the decoder is reset or re
sandersd (OOO until July 31)
2014/08/23 00:49:15
Updated to reflect the final logic I implemented.
| |
188 bool decoding_eos_; | |
189 | |
186 // Decoded buffers that haven't been read yet. Used when the decoder supports | 190 // Decoded buffers that haven't been read yet. Used when the decoder supports |
187 // parallel decoding. | 191 // parallel decoding. |
188 std::list<scoped_refptr<Output> > ready_outputs_; | 192 std::list<scoped_refptr<Output> > ready_outputs_; |
189 | 193 |
190 // Number of outstanding decode requests sent to the |decoder_|. | 194 // Number of outstanding decode requests sent to the |decoder_|. |
191 int pending_decode_requests_; | 195 int pending_decode_requests_; |
192 | 196 |
193 // NOTE: Weak pointers must be invalidated before all other member variables. | 197 // NOTE: Weak pointers must be invalidated before all other member variables. |
194 base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_; | 198 base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_; |
195 | 199 |
196 // This is required so the VideoFrameStream can access private members in | 200 // This is required so the VideoFrameStream can access private members in |
197 // FinishInitialization() and ReportStatistics(). | 201 // FinishInitialization() and ReportStatistics(). |
198 DISALLOW_IMPLICIT_CONSTRUCTORS(DecoderStream); | 202 DISALLOW_IMPLICIT_CONSTRUCTORS(DecoderStream); |
199 }; | 203 }; |
200 | 204 |
201 template <> | 205 template <> |
202 bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const; | 206 bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const; |
203 | 207 |
204 template <> | 208 template <> |
205 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; | 209 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; |
206 | 210 |
207 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; | 211 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; |
208 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; | 212 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; |
209 | 213 |
210 } // namespace media | 214 } // namespace media |
211 | 215 |
212 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ | 216 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ |
OLD | NEW |