ScummVM API documentation
digitalvideo.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 DIRECTOR_CASTMEMBER_DIGITALVIDEO_H
23 #define DIRECTOR_CASTMEMBER_DIGITALVIDEO_H
24 
25 #include "director/castmember/castmember.h"
26 
27 namespace Video {
28 class VideoDecoder;
29 }
30 
31 namespace Director {
32 
34 public:
35  DigitalVideoCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint16 version);
36  DigitalVideoCastMember(Cast *cast, uint16 castId, DigitalVideoCastMember &source);
38 
39  bool isModified() override;
40  Graphics::MacWidget *createWidget(Common::Rect &bbox, Channel *channel, SpriteType spriteType) override;
41 
42  bool loadVideoFromCast();
43  bool loadVideo(Common::String path);
44  void setChannel(Channel *channel) { _channel = channel; }
45  void startVideo();
46  void stopVideo();
47  void rewindVideo();
48 
49  uint getMovieCurrentTime();
50  uint getDuration();
51  uint getMovieTotalTime();
52  void seekMovie(int stamp);
53  void setStopTime(int stamp);
54  void setMovieRate(double rate);
55  void setFrameRate(int rate);
56 
57  bool hasField(int field) override;
58  Datum getField(int field) override;
59  bool setField(int field, const Datum &value) override;
60 
61  Common::String formatInfo() override;
62 
63  Common::Point getRegistrationOffset() override;
64  Common::Point getRegistrationOffset(int16 width, int16 height) override;
65 
66  Common::String _filename;
67 
68  uint32 _vflags;
69  bool _looping;
70  bool _pausedAtStart;
71  bool _enableVideo;
72  bool _enableSound;
73  bool _crop;
74  bool _center;
75  bool _preload;
76  bool _showControls;
77  bool _directToStage;
78  bool _avimovie, _qtmovie;
79  bool _dirty;
80  FrameRateType _frameRateType;
81 
82  uint16 _frameRate;
83  bool _getFirstFrame;
84  int _duration;
85 
86  Video::VideoDecoder *_video;
87  Graphics::Surface *_lastFrame;
88 
89  Channel *_channel;
90 };
91 
92 } // End of namespace Director
93 
94 #endif
Definition: cast.h:85
Definition: str.h:59
Definition: surface.h:67
Definition: channel.h:40
Definition: rect.h:144
Definition: archive.h:35
Definition: digitalvideo.h:33
Definition: video_decoder.h:52
Definition: rect.h:45
Definition: macwidget.h:39
Definition: lingo.h:130
Definition: stream.h:944
Definition: avi_frames.h:36
Definition: castmember.h:45