ScummVM API documentation
avi_player.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 ULTIMA8_GFX_AVIPLAYER_H
23 #define ULTIMA8_GFX_AVIPLAYER_H
24 
25 #include "ultima/ultima8/gfx/movie_player.h"
26 #include "graphics/managed_surface.h"
27 
28 namespace Video {
29 class AVIDecoder;
30 }
31 
32 namespace Ultima {
33 namespace Ultima8 {
34 
35 class AVIPlayer : public MoviePlayer {
36 public:
43  AVIPlayer(Common::SeekableReadStream *rs, int width, int height, const byte *overridePal, bool noScale);
44  ~AVIPlayer();
45 
46  void run() override;
47  void paint(RenderSurface *surf, int lerp) override;
48 
49  void start() override;
50  void stop() override;
51  bool isPlaying() const override {
52  return _playing;
53  }
54 
55  int getFrameNo() const;
56 
57  // Adjust the offsets by the given values
58  void setOffset(int xoff, int yoff) override;
59 
60 private:
61 
62  bool _playing;
63  Video::AVIDecoder *_decoder;
64  Graphics::ManagedSurface _currentFrame;
65  // Width and height of the area we've been given to play back in
66  uint32 _width;
67  uint32 _height;
68  // Xoff and Yoff into that playback area
69  uint32 _xoff;
70  uint32 _yoff;
71  bool _doubleSize;
72  const byte *_overridePal;
73  bool _pausedMusic;
74 
75 };
76 
77 } // End of namespace Ultima8
78 } // End of namespace Ultima
79 
80 #endif
Definition: managed_surface.h:51
Definition: movie_player.h:30
Definition: avi_player.h:35
Definition: avi_decoder.h:64
Definition: render_surface.h:40
Definition: stream.h:745
Definition: detection.h:27
Definition: avi_frames.h:36