#include <video_decoder.h>
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) |
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.
The types of tracks this class can be.
|
pure virtual |
Get the type of track.
Implemented in Video::VideoDecoder::AudioTrack, and Video::VideoDecoder::VideoTrack.
|
pure virtual |
Return if the track has finished.
Implemented in Video::VideoDecoder::AudioTrack, Video::VideoDecoder::VideoTrack, Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.
|
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.
|
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.
Reimplemented in Video::VideoDecoder::RewindableAudioTrack, Video::AVIDecoder::AVIVideoTrack, and Video::FlicDecoder::FlicVideoTrack.
|
inlinevirtual |
Return if the track is seekable.
Reimplemented in Video::VideoDecoder::SeekableAudioTrack.
|
inlinevirtual |
Seek to the given time.
time | The time to seek to, from the beginning of the video. |
Reimplemented in Video::VideoDecoder::SeekableAudioTrack.
void Video::VideoDecoder::Track::pause | ( | bool | shouldPause | ) |
Set the pause status of the track.
|
inline |
Return if the track is paused.
|
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.
|
inlineprotectedvirtual |
Function called by pause() for subclasses to implement.
Reimplemented in Video::VideoDecoder::AudioTrack.