Chromium Code Reviews| Index: media/filters/decoder_stream.h |
| diff --git a/media/filters/decoder_stream.h b/media/filters/decoder_stream.h |
| index 4992141443b3410d71c050318fb2b160807a870b..f719d876b9253048f68de2f61223e553c379c9aa 100644 |
| --- a/media/filters/decoder_stream.h |
| +++ b/media/filters/decoder_stream.h |
| @@ -87,6 +87,9 @@ class MEDIA_EXPORT DecoderStream { |
| // behavior. |
| bool CanReadWithoutStalling() const; |
| + // Returns true if one more decode request can be submitted to the decoder. |
| + bool CanDecodeAnotherBuffer() const; |
|
xhwang
2014/04/25 00:36:03
nit: how about CanDecodeMore()?
Sergey Ulanov
2014/04/26 00:59:29
Done.
|
| + |
| // Allows callers to register for notification of splice buffers from the |
| // demuxer. I.e., DecoderBuffer::splice_timestamp() is not kNoTimestamp(). |
| // |
| @@ -129,9 +132,6 @@ class MEDIA_EXPORT DecoderStream { |
| void SatisfyRead(Status status, |
| const scoped_refptr<Output>& output); |
| - // Abort pending |read_cb_|. |
| - void AbortRead(); |
| - |
| // Decodes |buffer| and returns the result via OnDecodeOutputReady(). |
| void Decode(const scoped_refptr<DecoderBuffer>& buffer); |
| @@ -165,6 +165,9 @@ class MEDIA_EXPORT DecoderStream { |
| State state_; |
| + // Error code when state_ == STATE_ERROR. |
| + Status error_; |
|
xhwang
2014/04/25 00:36:03
DECRYPT_ERROR is going to be deprecated. When stat
Sergey Ulanov
2014/04/26 00:59:29
Done.
|
| + |
| StatisticsCB statistics_cb_; |
| InitCB init_cb_; |
| @@ -187,6 +190,11 @@ class MEDIA_EXPORT DecoderStream { |
| // splice_timestamp() of kNoTimestamp() is encountered. |
| bool active_splice_; |
| + // Decoded buffers that haven't been read yet. Used when the decoder supports |
| + // parallel decoding. |
| + std::list<scoped_refptr<Output> > ready_outputs_; |
| + int pending_decode_requests_; |
|
xhwang
2014/04/25 00:36:03
This worth a separate comment.
Sergey Ulanov
2014/04/26 00:59:29
Done.
|
| + |
| // NOTE: Weak pointers must be invalidated before all other member variables. |
| base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_; |
| @@ -198,6 +206,9 @@ class MEDIA_EXPORT DecoderStream { |
| template <> |
| bool DecoderStream<DemuxerStream::AUDIO>::CanReadWithoutStalling() const; |
| +template <> |
| +bool DecoderStream<DemuxerStream::AUDIO>::CanDecodeAnotherBuffer() const; |
| + |
| typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; |
| typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; |