ScummVM API documentation
4xm_decoder.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 #include "common/ptr.h"
23 #include "video/video_decoder.h"
24 
25 namespace Video {
26 
34 public:
35  ~FourXMDecoder();
36 
37  bool loadStream(Common::SeekableReadStream *stream) override;
38  bool useAudioSync() const override { return false; }
39 
40 private:
41  struct Frame {
42  int64 offset;
43  int64 end;
44  };
45 
46  class FourXMVideoTrack;
47  class FourXMAudioTrack;
48 
49  void readList(uint32 size);
50  void decodeNextFrameImpl();
51 
52  uint32 _dataRate = 0;
53  Common::Rational _frameRate;
55  Common::Array<Frame> _frames;
56  uint _curFrame = 0;
57  FourXMVideoTrack *_video = nullptr;
58  FourXMAudioTrack *_audio = nullptr;
59 };
60 
61 } // namespace Video
bool loadStream(Common::SeekableReadStream *stream) override
Definition: stream.h:745
bool useAudioSync() const override
Definition: 4xm_decoder.h:38
Definition: rational.h:40
Definition: 4xm_decoder.h:33
Definition: video_decoder.h:53
Definition: animation.h:37