xoreos  0.0.5
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Video::VideoDecoder::Track Class Referenceabstract

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

#include <decoder.h>

Inheritance diagram for Video::VideoDecoder::Track:
Inheritance graph
[legend]

Public Types

enum  TrackType { kTrackTypeNone, kTrackTypeAudio, kTrackTypeVideo }
 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. More...
 
virtual bool endOfTrack () const =0
 Return if the track has finished. More...
 
void pause (bool shouldPause)
 Set the pause status of the track. More...
 
bool isPaused () const
 Return if the track is paused. More...
 
virtual Common::Timestamp getDuration () const
 Get the duration of the track. More...
 

Protected Member Functions

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

Private Attributes

bool _paused
 Is the track paused? More...
 

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 159 of file decoder.h.

Member Enumeration Documentation

◆ TrackType

The types of tracks this class can be.

Enumerator
kTrackTypeNone 

The track type is unknown.

kTrackTypeAudio 

The track is an audio track.

kTrackTypeVideo 

The track is a video track.

Definition at line 167 of file decoder.h.

Constructor & Destructor Documentation

◆ Track()

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

Definition at line 453 of file decoder.cpp.

References _paused.

◆ ~Track()

virtual Video::VideoDecoder::Track::~Track ( )
inlinevirtual

Definition at line 162 of file decoder.h.

Member Function Documentation

◆ endOfTrack()

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

◆ getDuration()

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

Get the duration of the track.

By default, this returns 0 for unknown.

Reimplemented in Video::VideoDecoder::FixedRateVideoTrack, and Video::QuickTimeDecoder::VideoTrackHandler.

Definition at line 465 of file decoder.cpp.

◆ getTrackType()

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

Get the type of track.

This must not return kTrackTypeNone.

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

Referenced by Video::VideoDecoder::addTrack().

Here is the caller graph for this function:

◆ isPaused()

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

Return if the track is paused.

Definition at line 204 of file decoder.h.

References _paused.

◆ pause()

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

Set the pause status of the track.

Definition at line 457 of file decoder.cpp.

Referenced by Video::VideoDecoder::addTrack().

Here is the caller graph for this function:

◆ pauseIntern()

void Video::VideoDecoder::Track::pauseIntern ( bool  shouldPause)
protectedvirtual

Function called by pause() for subclasses to implement.

Reimplemented in Video::VideoDecoder::AudioTrack.

Definition at line 462 of file decoder.cpp.

Member Data Documentation

◆ _paused

bool Video::VideoDecoder::Track::_paused
private

Is the track paused?

Definition at line 220 of file decoder.h.

Referenced by isPaused(), and Track().


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