aboutsummaryrefslogtreecommitdiff
path: root/video/avi_decoder.h
diff options
context:
space:
mode:
authorPaul Gilbert2016-07-11 21:49:11 -0400
committerPaul Gilbert2016-07-17 13:09:20 -0400
commitbb2d290dcaae8d29f56066ac92330c59862012a7 (patch)
tree6e58ce48d71c314383ba160fc4a5ae62750e69b1 /video/avi_decoder.h
parent8a6bba0fec0718f9c9fc9b69478b8aa6ff0bd791 (diff)
downloadscummvm-rg350-bb2d290dcaae8d29f56066ac92330c59862012a7.tar.gz
scummvm-rg350-bb2d290dcaae8d29f56066ac92330c59862012a7.tar.bz2
scummvm-rg350-bb2d290dcaae8d29f56066ac92330c59862012a7.zip
VIDEO: Handle STRN chunks in AVI file streams to set stream name
Diffstat (limited to 'video/avi_decoder.h')
-rw-r--r--video/avi_decoder.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/video/avi_decoder.h b/video/avi_decoder.h
index 04e6a1847e..8b9fcbd9a3 100644
--- a/video/avi_decoder.h
+++ b/video/avi_decoder.h
@@ -83,6 +83,16 @@ protected:
bool supportsAudioTrackSwitching() const { return true; }
AudioTrack *getAudioTrack(int index);
+ /**
+ * Define a track to be used by this class.
+ *
+ * The pointer is then owned by this base class.
+ *
+ * @param track The track to add
+ * @param isExternal Is this an external track not found by loadStream()?
+ */
+ void addTrack(Track *track, bool isExternal = false);
+
struct BitmapInfoHeader {
uint32 size;
uint32 width;
@@ -166,6 +176,7 @@ protected:
uint32 quality;
uint32 sampleSize;
Common::Rect frame;
+ Common::String name;
};
class AVIVideoTrack : public FixedRateVideoTrack {
@@ -181,6 +192,7 @@ protected:
Graphics::PixelFormat getPixelFormat() const;
int getCurFrame() const { return _curFrame; }
int getFrameCount() const { return _frameCount; }
+ Common::String &getName() { return _vidsHeader.name; }
const Graphics::Surface *decodeNextFrame() { return _lastFrame; }
const byte *getPalette() const;
@@ -224,6 +236,7 @@ protected:
void skipAudio(const Audio::Timestamp &time, const Audio::Timestamp &frameTime);
virtual void resetStream();
uint32 getCurChunk() const { return _curChunk; }
+ Common::String &getName() { return _audsHeader.name; }
void setCurChunk(uint32 chunk) { _curChunk = chunk; }
bool isRewindable() const { return true; }
@@ -272,6 +285,7 @@ protected:
Common::Rational _frameRateOverride;
int _videoTrackCounter, _audioTrackCounter;
+ Track *_lastAddedTrack;
SelectTrackFn _selectTrackFn;
void initCommon();
@@ -280,6 +294,7 @@ protected:
void skipChunk(uint32 size);
void handleList(uint32 listSize);
void handleStreamHeader(uint32 size);
+ void readStreamName(uint32 size);
uint16 getStreamType(uint32 tag) const { return tag & 0xFFFF; }
byte getStreamIndex(uint32 tag) const;
void checkTruemotion1();