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/pixelformat.h" 37 #include "graphics/surface.h" 38 #include "video/video_decoder.h" 39 #include "audio/mixer.h" 42 class QueuingAudioStream;
46 class SeekableReadStream;
91 void readNextPacket();
95 virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize);
97 virtual uint32 getSignatureVersion(uint32 signature)
const;
104 bool isRewindable()
const {
return true; }
105 bool rewind() { _curFrame = -1;
return true; }
107 uint16 getWidth()
const;
108 uint16 getHeight()
const;
110 int getCurFrame()
const {
return _curFrame; }
111 int getFrameCount()
const {
return _frameCount; }
113 const byte *getPalette()
const { _dirtyPalette =
false;
return _palette; }
114 bool hasDirtyPalette()
const {
return _dirtyPalette; }
116 void readTrees(SmackerBitStream &bs, uint32 mMapSize, uint32 mClrSize, uint32 fullSize, uint32 typeSize);
117 void increaseCurFrame() { _curFrame++; }
118 void decodeFrame(SmackerBitStream &bs);
130 uint32 _flags, _version;
132 byte _palette[3 * 256];
133 mutable bool _dirtyPalette;
138 BigHuffmanTree *_MMapTree;
139 BigHuffmanTree *_MClrTree;
140 BigHuffmanTree *_FullTree;
141 BigHuffmanTree *_TypeTree;
147 static uint getBlockRun(
int index) {
return (index <= 58) ? index + 1 : 128 << (index - 59); }
150 virtual SmackerVideoTrack *createVideoTrack(uint32 width, uint32 height, uint32 frameCount,
const Common::Rational &frameRate, uint32 flags, uint32 version)
const;
154 enum AudioCompression {
162 AudioCompression compression;
189 ~SmackerAudioTrack();
191 bool isRewindable()
const {
return true; }
194 void queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize);
195 void queuePCM(byte *buffer, uint32 bufferSize);
205 class SmackerEmptyTrack :
public Track {
208 bool endOfTrack()
const {
return true; }
210 bool isSeekable()
const {
return true; }
223 uint32 _firstFrameStart;
Definition: video_decoder.h:493
Definition: video_decoder.h:686
Definition: video_decoder.h:711
Definition: timestamp.h:83
Definition: smk_decoder.h:76
Definition: rational.h:40
SoundType
Definition: mixer.h:62
Definition: smk_decoder.h:99
Definition: video_decoder.h:53
Definition: smk_decoder.h:161
Definition: bitstream.h:55
Definition: algorithm.h:29
TrackType
Definition: video_decoder.h:501
Definition: bitarray.h:29
Definition: audiostream.h:50
Definition: audiostream.h:370
bool supportsAudioTrackSwitching() const
Definition: smk_decoder.h:92
Definition: avi_frames.h:36