| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // |read_cb| is always called asynchronously. This method should only be | 76 // |read_cb| is always called asynchronously. This method should only be |
| 77 // called after initialization has succeeded and must not be called during | 77 // called after initialization has succeeded and must not be called during |
| 78 // pending Reset(). | 78 // pending Reset(). |
| 79 void Read(const ReadCB& read_cb); | 79 void Read(const ReadCB& read_cb); |
| 80 | 80 |
| 81 // Resets the decoder, flushes all decoded outputs and/or internal buffers, | 81 // Resets the decoder, flushes all decoded outputs and/or internal buffers, |
| 82 // fires any existing pending read callback and calls |closure| on completion. | 82 // fires any existing pending read callback and calls |closure| on completion. |
| 83 // Note that |closure| is always called asynchronously. This method should | 83 // Note that |closure| is always called asynchronously. This method should |
| 84 // only be called after initialization has succeeded and must not be called | 84 // only be called after initialization has succeeded and must not be called |
| 85 // during pending Reset(). | 85 // during pending Reset(). |
| 86 // N.B: If the decoder stream has run into an error, calling this method does |
| 87 // not 'reset' it to a normal state. |
| 86 void Reset(const base::Closure& closure); | 88 void Reset(const base::Closure& closure); |
| 87 | 89 |
| 88 // Returns true if the decoder currently has the ability to decode and return | 90 // Returns true if the decoder currently has the ability to decode and return |
| 89 // an Output. | 91 // an Output. |
| 90 // TODO(rileya): Remove the need for this by refactoring Decoder queueing | 92 // TODO(rileya): Remove the need for this by refactoring Decoder queueing |
| 91 // behavior. | 93 // behavior. |
| 92 bool CanReadWithoutStalling() const; | 94 bool CanReadWithoutStalling() const; |
| 93 | 95 |
| 94 // Returns maximum concurrent decode requests for the current |decoder_|. | 96 // Returns maximum concurrent decode requests for the current |decoder_|. |
| 95 int GetMaxDecodeRequests() const; | 97 int GetMaxDecodeRequests() const; |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 264 |
| 263 template <> | 265 template <> |
| 264 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; | 266 int DecoderStream<DemuxerStream::AUDIO>::GetMaxDecodeRequests() const; |
| 265 | 267 |
| 266 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; | 268 typedef DecoderStream<DemuxerStream::VIDEO> VideoFrameStream; |
| 267 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; | 269 typedef DecoderStream<DemuxerStream::AUDIO> AudioBufferStream; |
| 268 | 270 |
| 269 } // namespace media | 271 } // namespace media |
| 270 | 272 |
| 271 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ | 273 #endif // MEDIA_FILTERS_DECODER_STREAM_H_ |
| OLD | NEW |