#include <video32.h>
Public Member Functions | |
VideoPlayer (EventManager *eventMan, Video::VideoDecoder *decoder=nullptr) | |
Protected Member Functions | |
bool | open (const Common::Path &fileName) |
bool | startHQVideo () |
virtual bool | shouldStartHQVideo () const |
bool | endHQVideo () |
virtual EventFlags | playUntilEvent (const EventFlags flags, const uint32 maxSleepMs=0xFFFFFFFF) |
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 | |
EventManager * | _eventMan |
Common::ScopedPtr< Video::VideoDecoder > | _decoder |
Common::Rect | _drawRect |
bool | _needsUpdate |
const Graphics::Surface * | _currentFrame |
Video::Subtitles | _subtitles |
Friends | |
EventFlags | operator| (const EventFlags a, const EventFlags b) |
An abstract class implementing common video playback functionality for SCI engine.
|
protected |
Attempts to open a video by filename and performs basic validation to ensure that the current system is actually capable of playing back the video.
|
protected |
Reinitializes the system hardware surface for playback of high-quality scaled video if the current video meets the necessary criteria for this playback mode.
|
inlineprotectedvirtual |
Determines whether or not the currently loaded video meets the criteria for high-quality scaled output.
Reimplemented in Sci::DuckPlayer.
|
protected |
Restores the hardware surface back to CLUT8 after video playback.
|
protectedvirtual |
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 in Sci::AVIPlayer.
|
protectedvirtual |
Checks to see if an event has occurred that should cause the video player to yield back to the VM.
|
protectedvirtual |
Submits a palette from the video to the system.
Reimplemented in Sci::VMDPlayer.
|
protectedvirtual |
Renders a video frame to the system.
Reimplemented in Sci::DuckPlayer, and Sci::VMDPlayer.
|
protected |
Renders a video frame to an intermediate surface using low-quality scaling, black-lining, or direct copy, depending upon the passed flags.
|
protected |
Sets the draw rect, clipping it to the screen's dimensions if necessary.
|
protected |
Sets the subtitle position according to the draw rect and overlay size.
|
protected |
The video decoder to use for video playback by this player.
|
protected |
The rectangle where the video will be drawn, in screen coordinates.
|
protected |
If true, playUntilEvent() will immediately render a frame. Used by VMDPlayer when censorship blobs are added or removed in Phant1 in order to immediately update the screen upon resuming playback.
|
protected |
Current frame rendered by playUntilEvent()
|
mutableprotected |
Video SRT subtitles used by fan translation projects for phantasmagoria 1 & 2.