ScummVM API documentation
video.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef TRECISION_VIDEO_H
23#define TRECISION_VIDEO_H
24
25#include "common/stream.h"
26#include "common/serializer.h"
27#include "video/smk_decoder.h"
28
29#include "trecision/struct.h"
30
31namespace Trecision {
32
33class TrecisionEngine;
34
36public:
37 void muteTrack(uint track, bool mute);
38 void setMute(bool mute);
39 virtual bool forceSeekToFrame(uint frame) { return false; }
40 virtual bool endOfFrames() const { return false; }
41};
42
44public:
45 bool loadStream(Common::SeekableReadStream *stream) override;
46 bool forceSeekToFrame(uint frame) override;
47 bool endOfFrames() const override;
48};
49
51public:
52 bool loadStream(Common::SeekableReadStream *stream) override;
53 bool addAudioSideTrack(const Common::Path &path);
54 bool forceSeekToFrame(uint frame) override;
55 bool endOfFrames() const override;
56 const Common::Rect *getNextDirtyRect() override;
57
58private:
59 Common::Rect _lastDirtyRect;
60
61 void readNextPacket() override;
62
63 class AmigaVideoTrack : public VideoTrack {
64 public:
65 AmigaVideoTrack(Common::SeekableReadStream *stream);
66
67 private:
68 byte _palette[3 * 256];
69 int _curFrame;
70 uint32 _frameCount;
71
72 uint16 getWidth() const override;
73 uint16 getHeight() const override;
75 int getCurFrame() const override { return _curFrame; }
76 uint32 getNextFrameStartTime() const override;
77 const Graphics::Surface *decodeNextFrame() override;
78 int getFrameCount() const override { return _frameCount; }
79 const byte *getPalette() const override { return _palette; }
80 bool hasDirtyPalette() const override { return true; }
81 };
82
83 class AmigaAudioTrack : public AudioTrack {
84 public:
85 AmigaAudioTrack(Common::SeekableReadStream *stream);
86 private:
87 Audio::AudioStream *getAudioStream() const override { return _audioStream; }
88 Audio::AudioStream *_audioStream;
89 };
90};
91
92} // End of namespace Trecision
93#endif
Definition: audiostream.h:50
Definition: path.h:52
Definition: stream.h:745
Definition: video.h:50
bool loadStream(Common::SeekableReadStream *stream) override
bool loadStream(Common::SeekableReadStream *stream) override
Definition: video.h:35
Definition: smk_decoder.h:77
Definition: video_decoder.h:616
Graphics::PixelFormat getPixelFormat() const
bool hasDirtyPalette() const
Definition: video_decoder.h:337
virtual uint16 getHeight() const
const byte * getPalette()
virtual const Graphics::Surface * decodeNextFrame()
int getCurFrame() const
uint32 getFrameCount() const
virtual uint16 getWidth() const
Definition: rect.h:536
Definition: pixelformat.h:138
Definition: surface.h:67