#include <video32.h>
Public Types | |
enum | IOStatus { kIOSuccess = 0, kIOFileNotFound = 2, kIOSeekFailed = 12 } |
enum | AVIStatus { kAVINotOpen = 0, kAVIOpen = 1, kAVIPlaying = 2, kAVIPaused = 3 } |
Public Types inherited from Sci::VideoPlayer | |
enum | EventFlags { kEventFlagNone = 0, kEventFlagEnd = 1, kEventFlagEscapeKey = 2, kEventFlagMouseDown = 4, kEventFlagHotRectangle = 8, kEventFlagToFrame = 0x10, kEventFlagYieldToVM = 0x20, kEventFlagReverse = 0x80 } |
Public Member Functions | |
AVIPlayer (EventManager *eventMan) | |
IOStatus | open (const Common::Path &fileName) |
IOStatus | init (const bool doublePixels) |
IOStatus | play (const int16 from, const int16 to, const int16 showStyle, const bool cue) |
EventFlags | playUntilEvent (const EventFlags flags, const uint32 maxSleepMs=0xFFFFFFFF) override |
IOStatus | close () |
IOStatus | cue (const uint16 frameNo) |
uint16 | getDuration () const |
Public Member Functions inherited from Sci::VideoPlayer | |
VideoPlayer (EventManager *eventMan, Video::VideoDecoder *decoder=nullptr) | |
Additional Inherited Members | |
Protected Member Functions inherited from Sci::VideoPlayer | |
bool | open (const Common::Path &fileName) |
bool | startHQVideo () |
virtual bool | shouldStartHQVideo () const |
bool | endHQVideo () |
virtual EventFlags | checkForEvent (const EventFlags flags) |
virtual void | submitPalette (const uint8 palette[256 *3]) const |
virtual void | renderFrame (const Graphics::Surface &nextFrame) const |
template<typename PixelType > | |
void | renderLQToSurface (Graphics::Surface &out, const Graphics::Surface &nextFrame, const bool doublePixels, const bool blackLines) const |
void | setDrawRect (const int16 x, const int16 y, const int16 width, const int16 height) |
void | setSubtitlePosition () const |
Protected Attributes inherited from Sci::VideoPlayer | |
EventManager * | _eventMan |
Common::ScopedPtr< Video::VideoDecoder > | _decoder |
Common::Rect | _drawRect |
bool | _needsUpdate |
const Graphics::Surface * | _currentFrame |
Video::Subtitles | _subtitles |
AVIPlayer is used to play AVI videos. Used by Windows versions of GK1CD, KQ7, and QFG4CD.
IOStatus Sci::AVIPlayer::open | ( | const Common::Path & | fileName | ) |
Opens a stream to an AVI resource.
IOStatus Sci::AVIPlayer::init | ( | const bool | doublePixels | ) |
Initializes the AVI rendering parameters for the current AVI. This must be called after open
.
IOStatus Sci::AVIPlayer::play | ( | const int16 | from, |
const int16 | to, | ||
const int16 | showStyle, | ||
const bool | cue | ||
) |
Begins playback of the current AVI.
|
overridevirtual |
Plays a video until an event in the given flags
is encountered, or until the end of the video is reached.
maxSleepMs | An optional parameter defining the maximum number of milliseconds that the video player should sleep between video frames. |
Reimplemented from Sci::VideoPlayer.
IOStatus Sci::AVIPlayer::close | ( | ) |
Stops playback and closes the currently open AVI stream.
IOStatus Sci::AVIPlayer::cue | ( | const uint16 | frameNo | ) |
Seeks the currently open AVI stream to the given frame.
uint16 Sci::AVIPlayer::getDuration | ( | ) | const |
Returns the duration of the current video.