ScummVM API documentation
Voyeur::RL2Decoder Class Reference

#include <animation.h>

Inheritance diagram for Voyeur::RL2Decoder:
Video::VideoDecoder

Public Member Functions

void close () override
 
bool loadStream (Common::SeekableReadStream *stream) override
 
bool loadRL2File (const Common::Path &file, bool palFlag)
 
bool loadVideo (int videoId)
 
int getPaletteCount () const
 
void play (VoyeurEngine *vm, int resourceOffset=0, byte *frames=nullptr, byte *imgPos=nullptr)
 
RL2VideoTrack * getRL2VideoTrack ()
 
RL2AudioTrack * getRL2AudioTrack ()
 
- Public Member Functions inherited from Video::VideoDecoder
virtual bool loadFile (const Common::Path &filename)
 
bool isVideoLoaded () const
 
void start ()
 
void stop ()
 
void setRate (const Common::Rational &rate)
 
Common::Rational getRate () const
 
bool isPlaying () const
 
virtual bool isRewindable () const
 
virtual bool rewind ()
 
virtual bool isSeekable () const
 
bool seek (const Audio::Timestamp &time)
 
virtual bool seekToFrame (uint frame)
 
void pauseVideo (bool pause)
 
bool isPaused () const
 
void setEndTime (const Audio::Timestamp &endTime)
 
void setEndFrame (uint frame)
 
Audio::Timestamp getEndTime () const
 
bool endOfVideo () const
 
int getCurFrame () const
 
uint32 getFrameCount () const
 
uint32 getTime () const
 
virtual uint16 getWidth () const
 
virtual uint16 getHeight () const
 
Graphics::PixelFormat getPixelFormat () const
 
virtual Audio::Timestamp getDuration () const
 
const byte * getPalette ()
 
bool hasDirtyPalette () const
 
uint32 getTimeToNextFrame () const
 
bool needsUpdate () const
 
virtual const Graphics::SurfacedecodeNextFrame ()
 
bool setReverse (bool reverse)
 
bool setDitheringPalette (const byte *palette)
 
bool setOutputPixelFormat (const Graphics::PixelFormat &format)
 
byte getVolume () const
 
void setVolume (byte volume)
 
int8 getBalance () const
 
void setBalance (int8 balance)
 
Audio::Mixer::SoundType getSoundType () const
 
void setSoundType (Audio::Mixer::SoundType soundType)
 
bool addStreamTrack (Audio::SeekableAudioStream *stream)
 
bool addStreamFileTrack (const Common::Path &baseName)
 
bool setAudioTrack (int index)
 
uint getAudioTrackCount () const
 

Additional Inherited Members

- Protected Types inherited from Video::VideoDecoder
typedef Common::Array< Track * > TrackList
 
typedef TrackList::iterator TrackListIterator
 
- Protected Member Functions inherited from Video::VideoDecoder
void resetPauseStartTime ()
 
void addTrack (Track *track, bool isExternal=false)
 
virtual bool useAudioSync () const
 
TrackgetTrack (uint track)
 
const TrackgetTrack (uint track) const
 
bool endOfVideoTracks () const
 
VideoTrackfindNextVideoTrack ()
 
TrackListIterator getTrackListBegin ()
 
TrackListIterator getTrackListEnd ()
 
void eraseTrack (Track *track)
 
virtual bool supportsAudioTrackSwitching () const
 
virtual AudioTrackgetAudioTrack (int index)
 
void stopAudio ()
 
void setAudioRate (Common::Rational rate)
 
void startAudio ()
 
void startAudioLimit (const Audio::Timestamp &limit)
 
bool hasFramesLeft () const
 
bool hasAudio () const
 
- Protected Attributes inherited from Video::VideoDecoder
Audio::Timestamp _lastTimeChange
 
int32 _startTime
 

Detailed Description

Decoder for RL2 videos.

Video decoder used in engines:

  • voyeur

Member Function Documentation

◆ close()

void Voyeur::RL2Decoder::close ( )
overridevirtual

Close the active video stream and free any associated resources.

All subclasses that need to close their own resources should still call the base class' close() function at the start of their function.

Reimplemented from Video::VideoDecoder.

◆ loadStream()

bool Voyeur::RL2Decoder::loadStream ( Common::SeekableReadStream stream)
overridevirtual

Load a video from a generic read stream. The ownership of the stream object transfers to this VideoDecoder instance, which is hence also responsible for eventually deleting it.

Implementations of this function are required to call addTrack() for each track in the video upon success.

Parameters
streamthe stream to load
Returns
whether loading the stream succeeded

Implements Video::VideoDecoder.

◆ play()

void Voyeur::RL2Decoder::play ( VoyeurEngine vm,
int  resourceOffset = 0,
byte *  frames = nullptr,
byte *  imgPos = nullptr 
)

Play back a given Voyeur RL2 video

Parameters
vmEngine reference
resourceOffsetStarting resource to use for frame pictures
framesOptional frame numbers resource for when to apply image data
imgPosPosition to draw image data

The documentation for this class was generated from the following file: