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 
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  CastMember *duplicate(Cast *cast, uint16 castId) override { return (CastMember *)(new DigitalVideoCastMember(cast, castId, *this)); }
46 
47  bool isModified() override;
48  Graphics::MacWidget *createWidget(Common::Rect &bbox, Channel *channel, SpriteType spriteType) override;
49 
50  bool loadVideoFromCast();
51  bool loadVideo(Common::String path);
52  void setChannel(Channel *channel) { _channel = channel; }
53  void startVideo();
54  void stopVideo();
55  void rewindVideo();
56 
57  uint getMovieCurrentTime();
58  uint getDuration();
59  uint getMovieTotalTime();
60  void seekMovie(int stamp);
61  void setStopTime(int stamp);
62  void setMovieRate(double rate);
63  void setFrameRate(int rate);
64 
65  bool hasField(int field) override;
66  Datum getField(int field) override;
67  bool setField(int field, const Datum &value) override;
68 
69  Common::String formatInfo() override;
70 
71  Common::Point getRegistrationOffset() override;
72  Common::Point getRegistrationOffset(int16 width, int16 height) override;
73 
74  uint32 getCastDataSize() override;
75  void writeCastData(Common::SeekableWriteStream *writeStream) override;
76 
77  Common::String _filename;
78 
79  uint32 _vflags;
80  bool _looping;
81  bool _pausedAtStart;
82  bool _enableVideo;
83  bool _enableSound;
84  bool _crop;
85  bool _center;
86  bool _preload;
87  bool _showControls;
88  bool _directToStage;
89  bool _avimovie, _qtmovie;
90  bool _dirty;
91  bool _emptyFile;
92  FrameRateType _frameRateType;
93  DigitalVideoType _videoType;
94 
95  uint16 _frameRate;
96  bool _getFirstFrame;
97  int _duration;
98 
99  Video::VideoDecoder *_video;
100  Graphics::Surface *_lastFrame;
101 
102  Channel *_channel;
103 };
104 
105 } // End of namespace Director
106 
107 #endif
Definition: cast.h:87
Definition: str.h:59
Definition: surface.h:67
Definition: channel.h:40
Definition: rect.h:524
Definition: archive.h:36
Definition: digitalvideo.h:39
Definition: video_decoder.h:53
Definition: rect.h:144
Definition: macwidget.h:39
Definition: lingo.h:130
Definition: stream.h:351
Definition: stream.h:944
Definition: avi_frames.h:36
Definition: castmember.h:48