ScummVM API documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 
33 enum DigitalVideoType {
34  kDVQuickTime,
35  kDVVideoForWindows,
36  kDVUnknown = -1,
37 };
38 
40 public:
41  DigitalVideoCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint16 version);
42  DigitalVideoCastMember(Cast *cast, uint16 castId, DigitalVideoCastMember &source);
44 
45  bool isModified() override;
46  Graphics::MacWidget *createWidget(Common::Rect &bbox, Channel *channel, SpriteType spriteType) override;
47 
48  bool loadVideoFromCast();
49  bool loadVideo(Common::String path);
50  void setChannel(Channel *channel) { _channel = channel; }
51  void startVideo();
52  void stopVideo();
53  void rewindVideo();
54 
55  uint getMovieCurrentTime();
56  uint getDuration();
57  uint getMovieTotalTime();
58  void seekMovie(int stamp);
59  void setStopTime(int stamp);
60  void setMovieRate(double rate);
61  void setFrameRate(int rate);
62 
63  bool hasField(int field) override;
64  Datum getField(int field) override;
65  bool setField(int field, const Datum &value) override;
66 
67  Common::String formatInfo() override;
68 
69  Common::Point getRegistrationOffset() override;
70  Common::Point getRegistrationOffset(int16 width, int16 height) override;
71 
72  Common::String _filename;
73 
74  uint32 _vflags;
75  bool _looping;
76  bool _pausedAtStart;
77  bool _enableVideo;
78  bool _enableSound;
79  bool _crop;
80  bool _center;
81  bool _preload;
82  bool _showControls;
83  bool _directToStage;
84  bool _avimovie, _qtmovie;
85  bool _dirty;
86  bool _emptyFile;
87  FrameRateType _frameRateType;
88  DigitalVideoType _videoType;
89 
90  uint16 _frameRate;
91  bool _getFirstFrame;
92  int _duration;
93 
94  Video::VideoDecoder *_video;
95  Graphics::Surface *_lastFrame;
96 
97  Channel *_channel;
98 };
99 
100 } // End of namespace Director
101 
102 #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:39
Definition: video_decoder.h:53
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