ScummVM API documentation
riven_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 MOHAWK_RIVEN_VIDEO_H
23#define MOHAWK_RIVEN_VIDEO_H
24
25#include "common/list.h"
26#include "common/noncopyable.h"
27
28namespace Video {
29class QuickTimeDecoder;
30}
31
32namespace Mohawk {
33
34class MohawkEngine_Riven;
35
40public:
41 RivenVideo(MohawkEngine_Riven *vm, uint16 code);
43
45 void load(uint16 id);
46
48 void close();
49
51 void play();
52
54 void playBlocking(int32 endTime = -1);
55
57 bool endOfVideo() const;
58
60 bool isLooping() const { return _loop; }
61
63 bool isEnabled() const { return _enabled; }
64
66 uint16 getId() const { return _id; }
67
69 uint16 getSlot() const { return _slot; }
70
72 int getCurFrame() const;
73
75 uint32 getFrameCount() const;
76
78 uint32 getTime() const;
79
81 uint32 getDuration() const;
82
84 void moveTo(uint16 x, uint16 y) { _x = x; _y = y; }
85
87 void setLooping(bool loop) { _loop = loop; }
88
90 void enable();
91
93 void disable();
94
96 void seek(uint32 time);
97
99 void pause(bool isPaused);
100
102 void stop();
103
105 bool isPlaying() const;
106
108 void setVolume(int volume);
109
111 bool needsUpdate() const;
112
115private:
116 // Non-changing variables
119 uint16 _id;
120 uint16 _slot;
121
122 // Playback variables
123 uint16 _x;
124 uint16 _y;
125 bool _loop;
126 bool _enabled;
127 bool _playing;
128};
129
131public:
134
135 void updateMovies();
136 void pauseVideos();
137 void resumeVideos();
138 void closeVideos();
139 void removeVideos();
140 void disableAllMovies();
141
142 RivenVideo *openSlot(uint16 slot);
143 RivenVideo *getSlot(uint16 slot);
144
145private:
147
148 // Keep tabs on any videos playing
150 VideoList _videos;
151};
152
153} // End of namespace Mohawk
154
155#endif
Definition: noncopyable.h:39
Definition: riven.h:91
Definition: riven_video.h:39
bool isPlaying() const
void playBlocking(int32 endTime=-1)
bool needsUpdate() const
void seek(uint32 time)
void moveTo(uint16 x, uint16 y)
Definition: riven_video.h:84
bool isLooping() const
Definition: riven_video.h:60
uint16 getId() const
Definition: riven_video.h:66
uint32 getTime() const
void setLooping(bool loop)
Definition: riven_video.h:87
bool isEnabled() const
Definition: riven_video.h:63
uint16 getSlot() const
Definition: riven_video.h:69
uint32 getDuration() const
void pause(bool isPaused)
uint32 getFrameCount() const
int getCurFrame() const
void load(uint16 id)
bool endOfVideo() const
void setVolume(int volume)
Definition: riven_video.h:130
Definition: qt_decoder.h:66
Definition: bitmap.h:32