xoreos  0.0.5
Public Member Functions | Protected Member Functions | List of all members
Video::VideoDecoder::FixedRateVideoTrack Class Referenceabstract

A VideoTrack that is played at a constant rate. More...

#include <decoder.h>

Inheritance diagram for Video::VideoDecoder::FixedRateVideoTrack:
Inheritance graph
[legend]
Collaboration diagram for Video::VideoDecoder::FixedRateVideoTrack:
Collaboration graph
[legend]

Public Member Functions

 FixedRateVideoTrack ()
 
virtual ~FixedRateVideoTrack ()
 
Common::Timestamp getNextFrameStartTime () const
 Get the start time of the next frame since the start of the video. More...
 
virtual Common::Timestamp getDuration () const
 Get the duration of the track. More...
 
Common::Timestamp getFrameTime (uint frame) const
 Get the time the given frame should be shown. More...
 
uint getFrameAtTime (const Common::Timestamp &time) const
 Get the frame that should be displaying at the given time. More...
 
- Public Member Functions inherited from Video::VideoDecoder::VideoTrack
 VideoTrack ()
 
virtual ~VideoTrack ()
 
TrackType getTrackType () const
 Get the type of track. More...
 
virtual bool endOfTrack () const
 Return if the track has finished. More...
 
virtual uint32 getWidth () const =0
 Get the width of this track. More...
 
virtual uint32 getHeight () const =0
 Get the height of this track. More...
 
virtual int getCurFrame () const =0
 Get the current frame of this track. More...
 
virtual int getFrameCount () const
 Get the frame count of this track. More...
 
- Public Member Functions inherited from Video::VideoDecoder::Track
 Track ()
 
virtual ~Track ()
 
void pause (bool shouldPause)
 Set the pause status of the track. More...
 
bool isPaused () const
 Return if the track is paused. More...
 

Protected Member Functions

virtual Common::Rational getFrameRate () const =0
 Get the rate at which this track is played. More...
 
- Protected Member Functions inherited from Video::VideoDecoder::Track
virtual void pauseIntern (bool shouldPause)
 Function called by pause() for subclasses to implement. More...
 

Additional Inherited Members

- Public Types inherited from Video::VideoDecoder::Track
enum  TrackType { kTrackTypeNone, kTrackTypeAudio, kTrackTypeVideo }
 The types of tracks this class can be. More...
 

Detailed Description

A VideoTrack that is played at a constant rate.

If the frame count is unknown, you must override endOfTrack().

Definition at line 277 of file decoder.h.

Constructor & Destructor Documentation

◆ FixedRateVideoTrack()

Video::VideoDecoder::FixedRateVideoTrack::FixedRateVideoTrack ( )
inline

Definition at line 279 of file decoder.h.

◆ ~FixedRateVideoTrack()

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

Definition at line 280 of file decoder.h.

Member Function Documentation

◆ getDuration()

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

Get the duration of the track.

By default, this returns 0 for unknown.

Reimplemented from Video::VideoDecoder::Track.

Definition at line 561 of file decoder.cpp.

◆ getFrameAtTime()

uint Video::VideoDecoder::FixedRateVideoTrack::getFrameAtTime ( const Common::Timestamp time) const

Get the frame that should be displaying at the given time.

This is helpful for someone implementing seek().

Definition at line 548 of file decoder.cpp.

References Common::Timestamp::framerate(), and Common::Timestamp::totalNumberOfFrames().

Here is the call graph for this function:

◆ getFrameRate()

virtual Common::Rational Video::VideoDecoder::FixedRateVideoTrack::getFrameRate ( ) const
protectedpure virtual

Get the rate at which this track is played.

Implemented in Video::Fader::FaderVideoTrack.

◆ getFrameTime()

Common::Timestamp Video::VideoDecoder::FixedRateVideoTrack::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 from Video::VideoDecoder::VideoTrack.

Definition at line 544 of file decoder.cpp.

◆ getNextFrameStartTime()

Common::Timestamp Video::VideoDecoder::FixedRateVideoTrack::getNextFrameStartTime ( ) const
virtual

Get the start time of the next frame since the start of the video.

Implements Video::VideoDecoder::VideoTrack.

Definition at line 537 of file decoder.cpp.


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