Index: media/filters/ffmpeg_audio_decoder.h |
diff --git a/media/filters/ffmpeg_audio_decoder.h b/media/filters/ffmpeg_audio_decoder.h |
index 8dcbf92e36acce81e54b70581aa5fd17cb60b5c4..be6e4ab85f774525fa3f9b226418e56838e1a7a0 100644 |
--- a/media/filters/ffmpeg_audio_decoder.h |
+++ b/media/filters/ffmpeg_audio_decoder.h |
@@ -45,6 +45,26 @@ class MEDIA_EXPORT FFmpegAudioDecoder : public AudioDecoder { |
virtual void Stop() OVERRIDE; |
private: |
+ // There are four states the decoder can be in: |
+ // |
+ // - kUninitialized: The decoder is not initialized. |
+ // - kNormal: This is the normal state. The decoder is idle and ready to |
+ // decode input buffers, or is decoding an input buffer. |
+ // - kDecodeFinished: EOS buffer received, codec flushed and decode finished. |
+ // No further Decode() call should be made. |
+ // - kError: Unexpected error happened. |
+ // |
+ // These are the possible state transitions. |
+ // |
+ // kkUninitialized -> kNormal: |
DaleCurtis
2014/06/17 20:48:19
Extra kk
xhwang
2014/06/17 22:43:09
Done.
|
+ // The decoder is successfully initialized and is ready to decode buffers. |
+ // kNormal -> kDecodeFinished: |
+ // When buffer->end_of_stream() is true and avcodec_decode_audio4() |
+ // returns 0 data. |
+ // kNormal -> kError: |
+ // A decoding error occurs and decoding needs to stop. |
+ // (any state) -> kNormal: |
+ // Any time Reset() is called. |
enum DecoderState { |
kUninitialized, |
kNormal, |