aboutsummaryrefslogtreecommitdiff
path: root/video/avi_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/avi_decoder.h')
-rw-r--r--video/avi_decoder.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/video/avi_decoder.h b/video/avi_decoder.h
index 4461e537c5..6c1ce1a4b9 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -179,11 +179,14 @@ protected:
int getCurFrame() const { return _curFrame; }
int getFrameCount() const { return _frameCount; }
const Graphics::Surface *decodeNextFrame() { return _lastFrame; }
- const byte *getPalette() const { _dirtyPalette = false; return _palette; }
- bool hasDirtyPalette() const { return _dirtyPalette; }
+
+ const byte *getPalette() const;
+ bool hasDirtyPalette() const;
void setCurFrame(int frame) { _curFrame = frame; }
void loadPaletteFromChunk(Common::SeekableReadStream *chunk);
void useInitialPalette();
+ bool canDither() const;
+ void setDither(const byte *palette);
bool isTruemotion1() const;
void forceDimensions(uint16 width, uint16 height);
@@ -215,7 +218,9 @@ protected:
virtual void queueSound(Common::SeekableReadStream *stream);
Audio::Mixer::SoundType getSoundType() const { return _soundType; }
void skipAudio(const Audio::Timestamp &time, const Audio::Timestamp &frameTime);
- void resetStream();
+ virtual void resetStream();
+ uint32 getCurChunk() const { return _curChunk; }
+ void setCurChunk(uint32 chunk) { _curChunk = chunk; }
bool isRewindable() const { return true; }
bool rewind();
@@ -238,6 +243,15 @@ protected:
Audio::Mixer::SoundType _soundType;
Audio::QueuingAudioStream *_audStream;
Audio::QueuingAudioStream *createAudioStream();
+ uint32 _curChunk;
+ };
+
+ struct TrackStatus {
+ TrackStatus();
+
+ Track *track;
+ uint32 index;
+ uint32 chunkSearchOffset;
};
AVIHeader _header;
@@ -260,9 +274,12 @@ protected:
void handleStreamHeader(uint32 size);
uint16 getStreamType(uint32 tag) const { return tag & 0xFFFF; }
byte getStreamIndex(uint32 tag) const;
- void forceVideoEnd();
void checkTruemotion1();
+ void handleNextPacket(TrackStatus& status);
+ bool shouldQueueAudio(TrackStatus& status);
+ Common::Array<TrackStatus> _videoTracks, _audioTracks;
+
public:
virtual AVIAudioTrack *createAudioTrack(AVIStreamHeader sHeader, PCMWaveFormat wvInfo);
};