Theora Playback Library  1.1.0
Public Member Functions | Protected Attributes | List of all members
TheoraTimer Class Reference

Public Member Functions

 TheoraTimer ()
 
virtual ~TheoraTimer ()
 
virtual float getTime ()
 
virtual void update (float timeDelta)
 advance the time. More...
 
virtual void pause ()
 
virtual void play ()
 
virtual bool isPaused ()
 
virtual void stop ()
 
virtual void setSpeed (float speed)
 set's playback speed More...
 
virtual float getSpeed ()
 return the update speed 1.0 is the default More...
 
virtual void seek (float time)
 change the current time. More...
 

Protected Attributes

float mTime
 Current time in seconds. More...
 
float mSpeed
 
bool mPaused
 Is the timer paused or not. More...
 

Detailed Description

This is a Timer object, it is used to control the playback of a TheoraVideoClip.

You can inherit this class and make a timer that eg. plays twice as fast, or playbacks an audio track and uses it's time offset for syncronizing Video etc.

Constructor & Destructor Documentation

TheoraTimer::TheoraTimer ( )
virtual TheoraTimer::~TheoraTimer ( )
virtual

Member Function Documentation

virtual float TheoraTimer::getSpeed ( )
virtual

return the update speed 1.0 is the default

virtual float TheoraTimer::getTime ( )
virtual
virtual bool TheoraTimer::isPaused ( )
virtual
virtual void TheoraTimer::pause ( )
virtual
virtual void TheoraTimer::play ( )
virtual
virtual void TheoraTimer::seek ( float  time)
virtual

change the current time.

if you're using another syncronization mechanism, make sure to adjust the time offset there

virtual void TheoraTimer::setSpeed ( float  speed)
virtual

set's playback speed

1.0 is the default. The speed factor multiplies time advance, thus setting the value higher will increase playback speed etc.

NOTE: depending on Timer implementation, it may not support setting the speed

virtual void TheoraTimer::stop ( )
virtual
virtual void TheoraTimer::update ( float  timeDelta)
virtual

advance the time.

If you're using another synronization system, eg. an audio track, then you can ignore this call or use it to perform other updates.

NOTE: this is called by TheoraVideoManager from the main thread

Member Data Documentation

bool TheoraTimer::mPaused
protected

Is the timer paused or not.

float TheoraTimer::mSpeed
protected
float TheoraTimer::mTime
protected

Current time in seconds.


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