22 #ifndef VIDEO_AVI_DECODER_H 23 #define VIDEO_AVI_DECODER_H 25 #include "common/array.h" 26 #include "common/rational.h" 27 #include "common/rect.h" 28 #include "common/str.h" 29 #include "graphics/palette.h" 31 #include "video/video_decoder.h" 32 #include "audio/mixer.h" 36 class PacketizedAudioStream;
40 class SeekableReadStream;
73 uint16
getWidth()
const {
return _header.width; }
78 bool isSeekable()
const;
103 void readNextPacket();
116 void addTrack(
Track *track,
bool isExternal =
false);
126 uint32 xPelsPerMeter;
127 uint32 yPelsPerMeter;
135 uint32 samplesPerSec;
136 uint32 avgBytesPerSec;
145 uint16 bitsPerSample;
163 uint32 microSecondsPerFrame;
164 uint32 maxBytesPerSecond;
168 uint32 initialFrames;
177 AVIF_HASINDEX = 0x00000010,
178 AVIF_MUSTUSEINDEX = 0x00000020,
179 AVIF_ISINTERLEAVED = 0x00000100,
180 AVIF_TRUSTCKTYPE = 0x00000800,
181 AVIF_WASCAPTUREFILE = 0x00010000,
182 AVIF_WASCOPYRIGHTED = 0x00020000
188 uint32 streamHandler;
192 uint32 initialFrames;
210 void forceTrackEnd();
214 uint16 getBitCount()
const {
return _bmInfo.bitCount; }
217 void setCodecAccuracy(Image::CodecAccuracy accuracy);
223 const byte *getPalette()
const;
224 bool hasDirtyPalette()
const;
225 void setCurFrame(
int frame) { _curFrame = frame; }
228 void useInitialPalette();
229 bool canDither()
const;
230 void setDither(
const byte *palette);
231 bool isValid()
const {
return _videoCodec !=
nullptr; }
233 bool isTruemotion1()
const;
234 void forceDimensions(uint16 width, uint16 height);
247 virtual bool setReverse(
bool reverse);
257 virtual bool endOfTrack()
const;
268 _vidsHeader.rate = r.getNumerator();
269 _vidsHeader.scale = r.getDenominator();
275 byte *_initialPalette;
276 mutable bool _dirtyPalette;
277 int _frameCount, _curFrame;
282 Image::CodecAccuracy _accuracy;
292 virtual void createAudioStream();
295 virtual void resetStream();
296 uint32 getCurChunk()
const {
return _curChunk; }
298 void setCurChunk(uint32 chunk) { _curChunk = chunk; }
300 bool isRewindable()
const {
return true; }
318 uint32 chunkSearchOffset;
328 void readOldIndex(uint32 size);
333 bool _foundMovieList;
334 uint32 _movieListStart, _movieListEnd;
338 int _videoTrackCounter, _audioTrackCounter;
339 Track *_lastAddedTrack;
343 bool parseNextChunk();
344 void skipChunk(uint32 size);
345 void handleList(uint32 listSize);
346 void handleStreamHeader(uint32 size);
347 void readStreamName(uint32 size);
348 void readPalette8(uint32 size);
349 uint16 getStreamType(uint32 tag)
const {
return tag & 0xFFFF; }
350 static byte getStreamIndex(uint32 tag);
351 void checkTruemotion1();
352 uint getVideoTrackOffset(uint trackIndex, uint frameNumber = 0);
356 void seekTransparencyFrame(
int frame);
370 virtual bool seekToFrame(uint frame);
Definition: video_decoder.h:505
Definition: video_decoder.h:698
Definition: avi_decoder.h:65
In find(In first, In last, const T &v)
Definition: algorithm.h:225
Definition: video_decoder.h:723
Definition: avi_decoder.h:321
Common::Rational getFrameRate() const
Definition: avi_decoder.h:262
bool isRewindable() const
Definition: avi_decoder.h:77
Definition: timestamp.h:83
uint16 getHeight() const
Definition: avi_decoder.h:213
Definition: audiostream.h:446
const Graphics::Surface * decodeNextFrame()
Definition: avi_decoder.h:221
Definition: rational.h:40
Definition: avi_decoder.h:287
Graphics::Surface * scale(const Graphics::Surface &srcImage, int xSize, int ySize)
SoundType
Definition: mixer.h:62
Definition: avi_decoder.h:204
Definition: video_decoder.h:53
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: avi_decoder.h:149
Definition: audiostream.h:50
bool supportsAudioTrackSwitching() const
Definition: avi_decoder.h:105
uint16 getWidth() const
Definition: avi_decoder.h:73
bool isRewindable() const
Definition: avi_decoder.h:236
int getCurFrame() const
Definition: avi_decoder.h:218
Definition: avi_decoder.h:313
uint16 getHeight() const
Definition: avi_decoder.h:74
Simple class for handling a palette data.
Definition: palette.h:51
Definition: avi_frames.h:36
Definition: movie_decoder.h:32
void setFrameRate(const Common::Rational &r)
Definition: avi_decoder.h:267
int getFrameCount() const
Definition: avi_decoder.h:219
uint16 getWidth() const
Definition: avi_decoder.h:212
virtual bool isReversed() const
Definition: avi_decoder.h:252