29 #ifndef VIDEO_SMK_PLAYER_H 30 #define VIDEO_SMK_PLAYER_H 32 #include "common/bitarray.h" 33 #include "common/bitstream.h" 34 #include "common/rational.h" 35 #include "common/rect.h" 36 #include "graphics/palette.h" 37 #include "graphics/pixelformat.h" 38 #include "graphics/surface.h" 39 #include "video/video_decoder.h" 40 #include "audio/mixer.h" 43 class QueuingAudioStream;
47 class SeekableReadStream;
92 void readNextPacket();
96 virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize);
98 virtual uint32 getSignatureVersion(uint32 signature)
const;
105 bool isRewindable()
const {
return true; }
106 bool rewind() { _curFrame = -1;
return true; }
108 uint16 getWidth()
const;
109 uint16 getHeight()
const;
111 int getCurFrame()
const {
return _curFrame; }
112 int getFrameCount()
const {
return _frameCount; }
114 const byte *getPalette()
const { _dirtyPalette =
false;
return _palette.data(); }
115 bool hasDirtyPalette()
const {
return _dirtyPalette; }
117 void readTrees(SmackerBitStream &bs, uint32 mMapSize, uint32 mClrSize, uint32 fullSize, uint32 typeSize);
118 void increaseCurFrame() { _curFrame++; }
119 void decodeFrame(SmackerBitStream &bs);
131 uint32 _flags, _version;
134 mutable bool _dirtyPalette;
139 BigHuffmanTree *_MMapTree;
140 BigHuffmanTree *_MClrTree;
141 BigHuffmanTree *_FullTree;
142 BigHuffmanTree *_TypeTree;
148 static uint getBlockRun(
int index) {
return (index <= 58) ? index + 1 : 128 << (index - 59); }
151 virtual SmackerVideoTrack *createVideoTrack(uint32 width, uint32 height, uint32 frameCount,
const Common::Rational &frameRate, uint32 flags, uint32 version)
const;
155 enum AudioCompression {
163 AudioCompression compression;
190 ~SmackerAudioTrack();
192 bool isRewindable()
const {
return true; }
195 void queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize);
196 void queuePCM(byte *buffer, uint32 bufferSize);
206 class SmackerEmptyTrack :
public Track {
209 bool endOfTrack()
const {
return true; }
211 bool isSeekable()
const {
return true; }
224 uint32 _firstFrameStart;
Definition: video_decoder.h:505
Definition: video_decoder.h:698
Definition: video_decoder.h:723
Definition: timestamp.h:83
Definition: smk_decoder.h:77
Definition: rational.h:40
SoundType
Definition: mixer.h:62
Definition: smk_decoder.h:100
Definition: video_decoder.h:53
Definition: smk_decoder.h:162
Definition: bitstream.h:55
Definition: algorithm.h:29
TrackType
Definition: video_decoder.h:513
Definition: bitarray.h:29
Definition: audiostream.h:50
Definition: audiostream.h:370
bool supportsAudioTrackSwitching() const
Definition: smk_decoder.h:93
Simple class for handling a palette data.
Definition: palette.h:51
Definition: avi_frames.h:36