ScummVM API documentation
Video::VideoDecoder::VideoTrack Class Referenceabstract

#include <video_decoder.h>

Inheritance diagram for Video::VideoDecoder::VideoTrack:
Video::VideoDecoder::Track Video::FlicDecoder::FlicVideoTrack Video::VideoDecoder::FixedRateVideoTrack Petka::FlicDecoder::FlicVideoTrack Video::AVIDecoder::AVIVideoTrack

Public Member Functions

TrackType getTrackType () const
 
virtual bool endOfTrack () const
 
virtual uint16 getWidth () const =0
 
virtual uint16 getHeight () const =0
 
virtual Graphics::PixelFormat getPixelFormat () const =0
 
virtual bool setOutputPixelFormat (const Graphics::PixelFormat &format)
 
virtual int getCurFrame () const =0
 
virtual int getFrameCount () const
 
virtual uint32 getNextFrameStartTime () const =0
 
virtual const Graphics::SurfacedecodeNextFrame ()=0
 
virtual const byte * getPalette () const
 
virtual bool hasDirtyPalette () const
 
virtual Audio::Timestamp getFrameTime (uint frame) const
 
virtual bool setReverse (bool reverse)
 
virtual bool isReversed () const
 
virtual bool canDither () const
 
virtual void setDither (const byte *palette)
 
- Public Member Functions inherited from Video::VideoDecoder::Track
virtual bool isRewindable () const
 
virtual bool rewind ()
 
virtual bool isSeekable () const
 
virtual bool seek (const Audio::Timestamp &time)
 
void pause (bool shouldPause)
 
bool isPaused () const
 
virtual Audio::Timestamp getDuration () const
 

Additional Inherited Members

- Public Types inherited from Video::VideoDecoder::Track
enum  TrackType { kTrackTypeNone, kTrackTypeVideo, kTrackTypeAudio }
 
- Protected Member Functions inherited from Video::VideoDecoder::Track
virtual void pauseIntern (bool shouldPause)
 

Detailed Description

An abstract representation of a video track.

Member Function Documentation

◆ getTrackType()

TrackType Video::VideoDecoder::VideoTrack::getTrackType ( ) const
inlinevirtual

Get the type of track.

Implements Video::VideoDecoder::Track.

◆ endOfTrack()

virtual bool Video::VideoDecoder::VideoTrack::endOfTrack ( ) const
virtual

Return if the track has finished.

Implements Video::VideoDecoder::Track.

Reimplemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ getWidth()

virtual uint16 Video::VideoDecoder::VideoTrack::getWidth ( ) const
pure virtual

Get the width of this track

Implemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ getHeight()

virtual uint16 Video::VideoDecoder::VideoTrack::getHeight ( ) const
pure virtual

Get the height of this track

Implemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ getPixelFormat()

virtual Graphics::PixelFormat Video::VideoDecoder::VideoTrack::getPixelFormat ( ) const
pure virtual

Get the pixel format of this track

Implemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ setOutputPixelFormat()

virtual bool Video::VideoDecoder::VideoTrack::setOutputPixelFormat ( const Graphics::PixelFormat format)
inlinevirtual

Set the default high color format for videos that convert from YUV.

Reimplemented in Video::AVIDecoder::AVIVideoTrack.

◆ getCurFrame()

virtual int Video::VideoDecoder::VideoTrack::getCurFrame ( ) const
pure virtual

Get the current frame of this track

See also
VideoDecoder::getCurFrame()

Implemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ getFrameCount()

virtual int Video::VideoDecoder::VideoTrack::getFrameCount ( ) const
inlinevirtual

Get the frame count of this track

Note
If the frame count is unknown, return 0 (which is also the default implementation of the function). However, one must also implement endOfTrack() in that case.

Reimplemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ getNextFrameStartTime()

virtual uint32 Video::VideoDecoder::VideoTrack::getNextFrameStartTime ( ) const
pure virtual

Get the start time of the next frame in milliseconds since the start of the video

Implemented in Video::VideoDecoder::FixedRateVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ decodeNextFrame()

virtual const Graphics::Surface* Video::VideoDecoder::VideoTrack::decodeNextFrame ( )
pure virtual

◆ getPalette()

virtual const byte* Video::VideoDecoder::VideoTrack::getPalette ( ) const
inlinevirtual

Get the palette currently in use by this track

Reimplemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ hasDirtyPalette()

virtual bool Video::VideoDecoder::VideoTrack::hasDirtyPalette ( ) const
inlinevirtual

Does the palette currently in use by this track need to be updated?

Reimplemented in Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.

◆ getFrameTime()

virtual Audio::Timestamp Video::VideoDecoder::VideoTrack::getFrameTime ( uint  frame) const
virtual

Get the time the given frame should be shown.

By default, this returns a negative (invalid) value. This function should only be used by VideoDecoder::seekToFrame().

Reimplemented in Video::VideoDecoder::FixedRateVideoTrack.

◆ setReverse()

virtual bool Video::VideoDecoder::VideoTrack::setReverse ( bool  reverse)
inlinevirtual

Set the video track to play in reverse or forward.

By default, a VideoTrack must decode forward.

Parameters
reversetrue for reverse, false for forward
Returns
true for success, false for failure

Reimplemented in Video::AVIDecoder::AVIVideoTrack.

◆ isReversed()

virtual bool Video::VideoDecoder::VideoTrack::isReversed ( ) const
inlinevirtual

Is the video track set to play in reverse?

Reimplemented in Video::AVIDecoder::AVIVideoTrack.

◆ canDither()

virtual bool Video::VideoDecoder::VideoTrack::canDither ( ) const
inlinevirtual

Can the video track dither?

Reimplemented in Video::AVIDecoder::AVIVideoTrack.

◆ setDither()

virtual void Video::VideoDecoder::VideoTrack::setDither ( const byte *  palette)
inlinevirtual

Activate dithering mode with a palette

Reimplemented in Video::AVIDecoder::AVIVideoTrack.


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