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 <list> | 8 #include <list> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 class DecryptingDemuxerStream; | 32 class DecryptingDemuxerStream; |
33 | 33 |
34 // Wraps a DemuxerStream and a list of Decoders and provides decoded | 34 // Wraps a DemuxerStream and a list of Decoders and provides decoded |
35 // output to its client (e.g. Audio/VideoRendererImpl). | 35 // output to its client (e.g. Audio/VideoRendererImpl). |
36 template<DemuxerStream::Type StreamType> | 36 template<DemuxerStream::Type StreamType> |
37 class MEDIA_EXPORT DecoderStream { | 37 class MEDIA_EXPORT DecoderStream { |
38 public: | 38 public: |
39 typedef DecoderStreamTraits<StreamType> StreamTraits; | 39 typedef DecoderStreamTraits<StreamType> StreamTraits; |
40 typedef typename StreamTraits::DecoderType Decoder; | 40 typedef typename StreamTraits::DecoderType Decoder; |
41 typedef typename StreamTraits::OutputType Output; | 41 typedef typename StreamTraits::OutputType Output; |
42 typedef typename Decoder::Status DecoderStatus; | |
xhwang
2016/03/29 19:42:28
nice!
| |
43 | 42 |
44 enum Status { | 43 enum Status { |
45 OK, // Everything went as planned. | 44 OK, // Everything went as planned. |
46 ABORTED, // Read aborted due to Reset() during pending read. | 45 ABORTED, // Read aborted due to Reset() during pending read. |
47 DEMUXER_READ_ABORTED, // Demuxer returned aborted read. | 46 DEMUXER_READ_ABORTED, // Demuxer returned aborted read. |
48 DECODE_ERROR, // Decoder returned decode error. | 47 DECODE_ERROR, // Decoder returned decode error. |
49 }; | 48 }; |
50 | 49 |
51 // Indicates completion of a DecoderStream initialization. | 50 // Indicates completion of a DecoderStream initialization. |
52 typedef base::Callback<void(bool success)> InitCB; | 51 typedef base::Callback<void(bool success)> InitCB; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
235 | 234 |
236 template <> | 235 template <> |
237 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; | 236 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; |
238 | 237 |
239 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; | 238 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; |
240 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; | 239 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; |
241 | 240 |
242 } // namespace media | 241 } // namespace media |
243 | 242 |
244 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ | 243 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ |
OLD | NEW |