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

#include <video_decoder.h>

Inheritance diagram for Video::VideoDecoder::Track:
Video::VideoDecoder::AudioTrack Video::VideoDecoder::VideoTrack Video::VideoDecoder::RewindableAudioTrack Video::VideoDecoder::SeekableAudioTrack Video::FlicDecoder::FlicVideoTrack Video::VideoDecoder::FixedRateVideoTrack Video::VideoDecoder::StreamFileAudioTrack Petka::FlicDecoder::FlicVideoTrack Video::AVIDecoder::AVIVideoTrack

Public Types

enum  TrackType { kTrackTypeNone, kTrackTypeVideo, kTrackTypeAudio }
 

Public Member Functions

virtual TrackType getTrackType () const =0
 
virtual bool endOfTrack () const =0
 
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
 

Protected Member Functions

virtual void pauseIntern (bool shouldPause)
 

Detailed Description

An abstract representation of a track in a movie. Since tracks here are designed to work independently, they should not reference any other track(s) in the video.

Member Enumeration Documentation

◆ TrackType

The types of tracks this class can be.

Member Function Documentation

◆ getTrackType()

virtual TrackType Video::VideoDecoder::Track::getTrackType ( ) const
pure virtual

Get the type of track.

Implemented in Video::VideoDecoder::AudioTrack, and Video::VideoDecoder::VideoTrack.

◆ endOfTrack()

virtual bool Video::VideoDecoder::Track::endOfTrack ( ) const
pure virtual

◆ isRewindable()

virtual bool Video::VideoDecoder::Track::isRewindable ( ) const
virtual

Return if the track is rewindable.

If a video is seekable, it does not need to implement this for it to also be rewindable.

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

◆ rewind()

virtual bool Video::VideoDecoder::Track::rewind ( )
virtual

Rewind the video to the beginning.

If a video is seekable, it does not need to implement this for it to also be rewindable.

Returns
true on success, false otherwise.

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

◆ isSeekable()

virtual bool Video::VideoDecoder::Track::isSeekable ( ) const
inlinevirtual

Return if the track is seekable.

Reimplemented in Video::VideoDecoder::SeekableAudioTrack.

◆ seek()

virtual bool Video::VideoDecoder::Track::seek ( const Audio::Timestamp time)
inlinevirtual

Seek to the given time.

Parameters
timeThe time to seek to, from the beginning of the video.
Returns
true on success, false otherwise.

Reimplemented in Video::VideoDecoder::SeekableAudioTrack.

◆ pause()

void Video::VideoDecoder::Track::pause ( bool  shouldPause)

Set the pause status of the track.

◆ isPaused()

bool Video::VideoDecoder::Track::isPaused ( ) const
inline

Return if the track is paused.

◆ getDuration()

virtual Audio::Timestamp Video::VideoDecoder::Track::getDuration ( ) const
virtual

Get the duration of the track (starting from this track's start time).

By default, this returns 0 for unknown.

Reimplemented in Video::VideoDecoder::SeekableAudioTrack, and Video::VideoDecoder::FixedRateVideoTrack.

◆ pauseIntern()

virtual void Video::VideoDecoder::Track::pauseIntern ( bool  shouldPause)
inlineprotectedvirtual

Function called by pause() for subclasses to implement.

Reimplemented in Video::VideoDecoder::AudioTrack.


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