ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Video::VideoDecoder::Track Class Reference

An abstract representation of a track in a movie. More...

#include <video_decoder.h>

Inheritance diagram for Video::VideoDecoder::Track:

List of all members.

Public Types

enum  TrackType { kTrackTypeNone, kTrackTypeVideo, kTrackTypeAudio }
 

The types of tracks this class can be.

More...

Public Member Functions

 Track ()
virtual ~Track ()
virtual TrackType getTrackType () const =0
 Get the type of track.
virtual bool endOfTrack () const =0
 Return if the track has finished.
virtual bool isRewindable () const
 Return if the track is rewindable.
virtual bool rewind ()
 Rewind the video to the beginning.
virtual bool isSeekable () const
 Return if the track is seekable.
virtual bool seek (const Audio::Timestamp &time)
 Seek to the given time.
void pause (bool shouldPause)
 Set the pause status of the track.
bool isPaused () const
 Return if the track is paused.
virtual Audio::Timestamp getDuration () const
 Get the duration of the track (starting from this track's start time).

Protected Member Functions

virtual void pauseIntern (bool shouldPause)
 Function called by pause() for subclasses to implement.

Private Attributes

bool _paused

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.

Definition at line 472 of file video_decoder.h.


Member Enumeration Documentation

The types of tracks this class can be.

Enumerator:
kTrackTypeNone 
kTrackTypeVideo 
kTrackTypeAudio 

Definition at line 480 of file video_decoder.h.


Constructor & Destructor Documentation

Video::VideoDecoder::Track::Track (  ) 

Definition at line 526 of file video_decoder.cpp.

virtual Video::VideoDecoder::Track::~Track (  )  [inline, virtual]

Definition at line 475 of file video_decoder.h.


Member Function Documentation

virtual bool Video::VideoDecoder::Track::endOfTrack (  )  const [pure 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::FixedRateVideoTrack, and Video::VideoDecoder::SeekableAudioTrack.

Definition at line 543 of file video_decoder.cpp.

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

Get the type of track.

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

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

Return if the track is paused.

Definition at line 534 of file video_decoder.h.

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::AVIDecoder::AVIVideoTrack, Video::FlicDecoder::FlicVideoTrack, and Video::VideoDecoder::RewindableAudioTrack.

Definition at line 530 of file video_decoder.cpp.

virtual bool Video::VideoDecoder::Track::isSeekable (  )  const [inline, virtual]

Return if the track is seekable.

Reimplemented in Video::VideoDecoder::SeekableAudioTrack.

Definition at line 517 of file video_decoder.h.

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

Set the pause status of the track.

Definition at line 538 of file video_decoder.cpp.

virtual void Video::VideoDecoder::Track::pauseIntern ( bool  shouldPause  )  [inline, protected, virtual]

Function called by pause() for subclasses to implement.

Reimplemented in Video::VideoDecoder::AudioTrack.

Definition at line 547 of file video_decoder.h.

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::AVIDecoder::AVIVideoTrack, Video::FlicDecoder::FlicVideoTrack, and Video::VideoDecoder::RewindableAudioTrack.

Definition at line 534 of file video_decoder.cpp.

virtual bool Video::VideoDecoder::Track::seek ( const Audio::Timestamp time  )  [inline, virtual]

Seek to the given time.

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

Reimplemented in Video::VideoDecoder::SeekableAudioTrack.

Definition at line 524 of file video_decoder.h.


Member Data Documentation

Definition at line 550 of file video_decoder.h.


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


Generated on Sat Sep 21 2019 05:04:43 for ResidualVM by doxygen 1.7.1
curved edge   curved edge