| Index: media/filters/decoder_stream.h
|
| diff --git a/media/filters/decoder_stream.h b/media/filters/decoder_stream.h
|
| index 8f4658b34ddbe0e3ab1da13d0483e4e166108047..6eb2d9c352e29e4e2faf0959d63072e9835eff90 100644
|
| --- a/media/filters/decoder_stream.h
|
| +++ b/media/filters/decoder_stream.h
|
| @@ -11,6 +11,7 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_vector.h"
|
| #include "base/memory/weak_ptr.h"
|
| +#include "media/base/audio_decoder.h"
|
| #include "media/base/decryptor.h"
|
| #include "media/base/demuxer_stream.h"
|
| #include "media/base/media_export.h"
|
| @@ -34,6 +35,7 @@ class MEDIA_EXPORT DecoderStream {
|
| typedef typename StreamTraits::DecoderType Decoder;
|
| typedef typename StreamTraits::OutputType Output;
|
| typedef typename StreamTraits::StreamInitCB InitCB;
|
| + typedef typename Decoder::Status DecoderStatus;
|
|
|
| enum Status {
|
| OK, // Everything went as planned.
|
| @@ -82,6 +84,8 @@ class MEDIA_EXPORT DecoderStream {
|
| // an Output.
|
| bool CanReadWithoutStalling() const;
|
|
|
| + Decoder* decoder() {return decoder_.get();}
|
| +
|
| private:
|
| enum State {
|
| STATE_UNINITIALIZED,
|
| @@ -102,7 +106,8 @@ class MEDIA_EXPORT DecoderStream {
|
| scoped_ptr<DecryptingDemuxerStream> decrypting_demuxer_stream);
|
|
|
| // Satisfy pending |read_cb_| with |status| and |output|.
|
| - void SatisfyRead(Status status, const scoped_refptr<Output>& output);
|
| + void SatisfyRead(Status status,
|
| + const scoped_refptr<Output>& output);
|
|
|
| // Abort pending |read_cb_|.
|
| void AbortRead();
|
| @@ -116,7 +121,7 @@ class MEDIA_EXPORT DecoderStream {
|
|
|
| // Callback for Decoder::Decode().
|
| void OnDecodeOutputReady(int buffer_size,
|
| - typename Decoder::Status status,
|
| + DecoderStatus status,
|
| const scoped_refptr<Output>& output);
|
|
|
| // Reads a buffer from |stream_| and returns the result via OnBufferReady().
|
| @@ -162,7 +167,11 @@ class MEDIA_EXPORT DecoderStream {
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(DecoderStream);
|
| };
|
|
|
| +template <>
|
| +void DecoderStream<DemuxerStream::AUDIO>::ReadFromDemuxerStream();
|
| +
|
| typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream;
|
| +typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream;
|
|
|
| } // namespace media
|
|
|
|
|