diff options
author | Matthew Hoops | 2013-08-05 23:24:00 -0400 |
---|---|---|
committer | Matthew Hoops | 2013-08-05 23:29:22 -0400 |
commit | 043bd1b9f91719e2d80f17cbecb9b2e11ce49ba4 (patch) | |
tree | b1c4e5755111b66b223cb7cb5a1e58a269f62dff /video/avi_decoder.h | |
parent | c5c2fde52e82f30c58b9266b6cf1aa04245ac7b9 (diff) | |
download | scummvm-rg350-043bd1b9f91719e2d80f17cbecb9b2e11ce49ba4.tar.gz scummvm-rg350-043bd1b9f91719e2d80f17cbecb9b2e11ce49ba4.tar.bz2 scummvm-rg350-043bd1b9f91719e2d80f17cbecb9b2e11ce49ba4.zip |
VIDEO: Clean up the AVI decoder
Diffstat (limited to 'video/avi_decoder.h')
-rw-r--r-- | video/avi_decoder.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/video/avi_decoder.h b/video/avi_decoder.h index 6082232464..5d52c7c797 100644 --- a/video/avi_decoder.h +++ b/video/avi_decoder.h @@ -20,10 +20,10 @@ * */ -#ifndef VIDEO_AVI_PLAYER_H -#define VIDEO_AVI_PLAYER_H +#ifndef VIDEO_AVI_DECODER_H +#define VIDEO_AVI_DECODER_H -#include "common/endian.h" +#include "common/array.h" #include "common/rational.h" #include "common/rect.h" #include "common/str.h" @@ -102,13 +102,10 @@ private: }; struct OldIndex { + uint32 id; + uint32 flags; + uint32 offset; uint32 size; - struct Index { - uint32 id; - uint32 flags; - uint32 offset; - uint32 size; - } *indices; }; // Index Flags @@ -218,19 +215,24 @@ private: Audio::QueuingAudioStream *createAudioStream(); }; - OldIndex _ixInfo; + Common::Array<OldIndex> _indexEntries; AVIHeader _header; Common::SeekableReadStream *_fileStream; - bool _decodedHeader, _foundMovieList; + bool _decodedHeader; + bool _foundMovieList; + uint32 _movieListStart; Audio::Mixer::SoundType _soundType; Common::Rational _frameRateOverride; void initCommon(); - void runHandle(uint32 tag); - void handleList(); - void handleStreamHeader(); + bool parseNextChunk(); + void skipChunk(uint32 size); + void handleList(uint32 listSize); + void handleStreamHeader(uint32 size); + uint16 getStreamType(uint32 tag) const { return tag & 0xFFFF; } + byte getStreamIndex(uint32 tag) const; }; } // End of namespace Video |