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;
82 void forceSeekToFrame(uint frame);
90 void readNextPacket();
94 virtual void handleAudioTrack(byte track, uint32 chunkSize, uint32 unpackedSize);
96 virtual uint32 getSignatureVersion(uint32 signature)
const;
103 bool isRewindable()
const {
return true; }
104 bool rewind() { _curFrame = -1;
return true; }
106 uint16 getWidth()
const;
107 uint16 getHeight()
const;
109 int getCurFrame()
const {
return _curFrame; }
110 int getFrameCount()
const {
return _frameCount; }
112 const byte *getPalette()
const { _dirtyPalette =
false;
return _palette; }
113 bool hasDirtyPalette()
const {
return _dirtyPalette; }
115 void readTrees(SmackerBitStream &bs, uint32 mMapSize, uint32 mClrSize, uint32 fullSize, uint32 typeSize);
116 void increaseCurFrame() { _curFrame++; }
117 void decodeFrame(SmackerBitStream &bs);
129 uint32 _flags, _version;
131 byte _palette[3 * 256];
132 mutable bool _dirtyPalette;
137 BigHuffmanTree *_MMapTree;
138 BigHuffmanTree *_MClrTree;
139 BigHuffmanTree *_FullTree;
140 BigHuffmanTree *_TypeTree;
146 static uint getBlockRun(
int index) {
return (index <= 58) ? index + 1 : 128 << (index - 59); }
149 virtual SmackerVideoTrack *createVideoTrack(uint32 width, uint32 height, uint32 frameCount,
const Common::Rational &frameRate, uint32 flags, uint32 version)
const;
153 enum AudioCompression {
161 AudioCompression compression;
188 ~SmackerAudioTrack();
190 bool isRewindable()
const {
return true; }
193 void queueCompressedBuffer(byte *buffer, uint32 bufferSize, uint32 unpackedSize);
194 void queuePCM(byte *buffer, uint32 bufferSize);
204 class SmackerEmptyTrack :
public Track {
207 bool endOfTrack()
const {
return true; }
209 bool isSeekable()
const {
return true; }
222 uint32 _firstFrameStart;
Definition: video_decoder.h:476
Definition: video_decoder.h:664
Definition: video_decoder.h:689
Definition: timestamp.h:83
Definition: smk_decoder.h:75
Definition: rational.h:40
SoundType
Definition: mixer.h:62
Definition: smk_decoder.h:98
Definition: video_decoder.h:52
Definition: smk_decoder.h:160
Definition: bitstream.h:55
Definition: algorithm.h:29
TrackType
Definition: video_decoder.h:484
Definition: bitarray.h:29
Definition: audiostream.h:50
Definition: audiostream.h:370
bool supportsAudioTrackSwitching() const
Definition: smk_decoder.h:91
Definition: avi_frames.h:36