ScummVM API documentation
pmvplayer.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 MADE_PMVPLAYER_H
23#define MADE_PMVPLAYER_H
24
25#include "audio/mixer.h"
26#include "made/sound.h"
27
28namespace Common {
29class File;
30}
31
32namespace Graphics {
33struct Surface;
34}
35
36namespace Audio {
37class QueuingAudioStream;
38}
39
40namespace Made {
41
42class MadeEngine;
43
44class PmvPlayer {
45public:
47 ~PmvPlayer();
48
49 // individual file actions
50 bool load(const char *filename);
51 bool decode_frame();
52 void close();
53
54 // wrapper for all three above - Returns true if the movie was played till the end
55 bool play(const char *filename);
56
57 // currently open file
58 Common::File *_fd;
59 // info about currently playing movie
60 uint32 frameCount, frameNumber;
61 uint16 frameDelay, soundFreq;
62
63protected:
64 // ptrs to caller objects
65 MadeEngine *_vm;
66 Audio::Mixer *_mixer;
67
68 // decode destination objects
69 // image
70 byte _paletteRGB[768];
71 Graphics::Surface *_surface;
72 byte *frameData;
73 uint32 frameDataSize;
74 // audio
75 Audio::QueuingAudioStream *_audioStream;
76 Audio::SoundHandle _audioStreamHandle;
77 SoundDecoderData *soundDecoderData;
78
79 // helper funcs
80 void readChunk(uint32 &chunkType, uint32 &chunkSize);
81 void decompressPalette(byte *palData, byte *outPal, uint32 palDataSize);
82};
83
84}
85
86#endif /* MADE_PMVPLAYER_H */
Definition: mixer.h:70
Definition: audiostream.h:370
Definition: mixer.h:49
Definition: file.h:47
Definition: made.h:69
Definition: pmvplayer.h:44
Definition: sound.h:59
Definition: system.h:39
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: console.h:27
Definition: surface.h:67