Miam-Player  0.8.0
A nice music player
QtAV::AVClock Class Reference

#include <AVClock.h>

Inheritance diagram for QtAV::AVClock:

Public Types

enum  ClockType { AudioClock, ExternalClock, VideoClock }
 

Public Slots

void start ()
 
void pause (bool p)
 
void reset ()
 

Signals

void paused (bool)
 
void paused ()
 
void resumed ()
 
void started ()
 
void resetted ()
 

Public Member Functions

 AVClock (ClockType c, QObject *parent=0)
 
 AVClock (QObject *parent=0)
 
void setClockType (ClockType ct)
 
ClockType clockType () const
 
bool isActive () const
 
void setInitialValue (double v)
 setInitialValue Usually for ExternalClock. More...
 
double initialValue () const
 
void setClockAuto (bool a)
 
bool isClockAuto () const
 
double pts () const
 
double value () const
 value the real timestamp in seconds: pts + delay More...
 
void updateValue (double pts)
 
void updateExternalClock (qint64 msecs)
 
void updateExternalClock (const AVClock &clock)
 
void updateVideoTime (double pts)
 
double videoTime () const
 
double delay () const
 
void updateDelay (double delay)
 
qreal diff () const
 
void setSpeed (qreal speed)
 
qreal speed () const
 
bool isPaused () const
 
int syncStart (int count)
 syncStart For internal use now Start to sync "count" objects. More...
 
int syncId () const
 
bool syncEndOnce (int id)
 syncEndOnce Decrease sync objects count if id is current sync id. More...
 

Protected Member Functions

virtual void timerEvent (QTimerEvent *event)
 

Member Enumeration Documentation

Enumerator
AudioClock 
ExternalClock 
VideoClock 

Constructor & Destructor Documentation

QtAV::AVClock::AVClock ( ClockType  c,
QObject *  parent = 0 
)
QtAV::AVClock::AVClock ( QObject *  parent = 0)

Member Function Documentation

ClockType QtAV::AVClock::clockType ( ) const
double QtAV::AVClock::delay ( ) const
inline
qreal QtAV::AVClock::diff ( ) const
inline
double QtAV::AVClock::initialValue ( ) const
bool QtAV::AVClock::isActive ( ) const
bool QtAV::AVClock::isClockAuto ( ) const
bool QtAV::AVClock::isPaused ( ) const
void QtAV::AVClock::pause ( bool  p)
slot
void QtAV::AVClock::paused ( bool  )
signal
void QtAV::AVClock::paused ( )
signal
double QtAV::AVClock::pts ( ) const
inline
void QtAV::AVClock::reset ( )
slot
void QtAV::AVClock::resetted ( )
signal
void QtAV::AVClock::resumed ( )
signal
void QtAV::AVClock::setClockAuto ( bool  a)
void QtAV::AVClock::setClockType ( ClockType  ct)
void QtAV::AVClock::setInitialValue ( double  v)

setInitialValue Usually for ExternalClock.

For example, media start time is not 0, clock have to set initial value as media start time

void QtAV::AVClock::setSpeed ( qreal  speed)
qreal QtAV::AVClock::speed ( ) const
inline
void QtAV::AVClock::start ( )
slot
void QtAV::AVClock::started ( )
signal
bool QtAV::AVClock::syncEndOnce ( int  id)

syncEndOnce Decrease sync objects count if id is current sync id.

Returns
true if sync is end for id or id is not current sync id
int QtAV::AVClock::syncId ( ) const
inline
int QtAV::AVClock::syncStart ( int  count)

syncStart For internal use now Start to sync "count" objects.

Call syncEndOnce(id) "count" times to end sync.

Parameters
countNumber of objects to sync. Each one should call syncEndOnce(int id)
Returns
an id
virtual void QtAV::AVClock::timerEvent ( QTimerEvent *  event)
protectedvirtual
void QtAV::AVClock::updateDelay ( double  delay)
inline
void QtAV::AVClock::updateExternalClock ( qint64  msecs)
void QtAV::AVClock::updateExternalClock ( const AVClock clock)
void QtAV::AVClock::updateValue ( double  pts)
inline
void QtAV::AVClock::updateVideoTime ( double  pts)
inline
double QtAV::AVClock::value ( ) const
inline

value the real timestamp in seconds: pts + delay

Returns
double QtAV::AVClock::videoTime ( ) const
inline

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