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 ACCESS_VIDEO_H
23 #define ACCESS_VIDEO_H
24 
25 #include "common/scummsys.h"
26 #include "common/memstream.h"
27 #include "access/data.h"
28 #include "access/asurface.h"
29 #include "access/files.h"
30 
31 namespace Access {
32 
33 enum VideoFlags { VIDEOFLAG_NONE = 0, VIDEOFLAG_BG = 1 };
34 
35 class VideoPlayer : public Manager {
36  struct VideoHeader {
37  int _frameCount;
38  int _width, _height;
39  VideoFlags _flags;
40  };
41 private:
42  BaseSurface *_vidSurface;
43  Resource *_videoData;
44  VideoHeader _header;
45  byte *_startCoord;
46  int _frameCount;
47  int _xCount;
48  int _scanCount;
49  int _frameSize;
50  Common::Rect _videoBounds;
51 
52  void getFrame();
53  void setVideo(BaseSurface *vidSurface, const Common::Point &pt, int rate);
54 public:
55  int _videoFrame;
56  bool _soundFlag;
57  int _soundFrame;
58  bool _videoEnd;
59 public:
61  ~VideoPlayer();
62 
66  void setVideo(BaseSurface *vidSurface, const Common::Point &pt, const FileIdent &videoFile, int rate);
67  void setVideo(BaseSurface *vidSurface, const Common::Point &pt, const Common::Path &filename, int rate);
68 
72  void playVideo();
73 
74  void copyVideo();
78  void closeVideo();
79 };
80 
81 } // End of namespace Access
82 
83 #endif /* ACCESS_VIDEO_H */
Definition: video.h:35
Definition: files.h:35
Definition: data.h:37
Definition: access.h:84
Definition: rect.h:144
Definition: path.h:52
Definition: asurface.h:42
Definition: files.h:54
Definition: rect.h:45
Definition: access.h:62