| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 const scoped_refptr<Output>& output); | 134 const scoped_refptr<Output>& output); |
| 135 | 135 |
| 136 // Decodes |buffer| and returns the result via OnDecodeOutputReady(). | 136 // Decodes |buffer| and returns the result via OnDecodeOutputReady(). |
| 137 void Decode(const scoped_refptr<DecoderBuffer>& buffer); | 137 void Decode(const scoped_refptr<DecoderBuffer>& buffer); |
| 138 | 138 |
| 139 // Flushes the decoder with an EOS buffer to retrieve internally buffered | 139 // Flushes the decoder with an EOS buffer to retrieve internally buffered |
| 140 // decoder output. | 140 // decoder output. |
| 141 void FlushDecoder(); | 141 void FlushDecoder(); |
| 142 | 142 |
| 143 // Callback for Decoder::Decode(). | 143 // Callback for Decoder::Decode(). |
| 144 void OnDecodeOutputReady(int buffer_size, | 144 void OnDecodeDone(int buffer_size, bool end_of_stream, DecoderStatus status); |
| 145 DecoderStatus status, | 145 |
| 146 const scoped_refptr<Output>& output); | 146 // Output callback passed to Decoder::Initialize(). |
| 147 void OnDecodeOutputReady(const scoped_refptr<Output>& output); |
| 147 | 148 |
| 148 // Reads a buffer from |stream_| and returns the result via OnBufferReady(). | 149 // Reads a buffer from |stream_| and returns the result via OnBufferReady(). |
| 149 void ReadFromDemuxerStream(); | 150 void ReadFromDemuxerStream(); |
| 150 | 151 |
| 151 // Callback for DemuxerStream::Read(). | 152 // Callback for DemuxerStream::Read(). |
| 152 void OnBufferReady(DemuxerStream::Status status, | 153 void OnBufferReady(DemuxerStream::Status status, |
| 153 const scoped_refptr<DecoderBuffer>& buffer); | 154 const scoped_refptr<DecoderBuffer>& buffer); |
| 154 | 155 |
| 155 void ReinitializeDecoder(); | 156 void ReinitializeDecoder(); |
| 156 | 157 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 | 210 |
| 210 template <> | 211 template <> |
| 211 bool DecoderStream<DemuxerStream::AUDIO>::CanDecodeMore() const; | 212 bool DecoderStream<DemuxerStream::AUDIO>::CanDecodeMore() const; |
| 212 | 213 |
| 213 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; | 214 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; |
| 214 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; | 215 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; |
| 215 | 216 |
| 216 } // namespace media | 217 } // namespace media |
| 217 | 218 |
| 218 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ | 219 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ |
| OLD | NEW |