BusyWaitVideoSync Class Reference

Video synchronization classes employing usleep() and busy-waits. More...

#include <vsync.h>

Inheritance diagram for BusyWaitVideoSync:
VideoSync

List of all members.

Public Member Functions

 BusyWaitVideoSync (VideoOutput *, int frame_interval, int refresh_interval, bool interlaced)
 ~BusyWaitVideoSync ()
QString getName (void) const
 Returns name of instanciated VSync method.
bool TryInit (void)
 Tries to initialize VSync method.
int WaitForFrame (int sync_delay)
 Waits for next a frame or field.

Private Attributes

int m_cheat
int m_fudge

Detailed Description

Video synchronization classes employing usleep() and busy-waits.

Non-phase-maintaining. There may occasionally be short periods of jitter that eventually go away.

This method does not maintain phase and uses the most CPU of any of the VSync methods. But it is the catch-all fallback algorithm, TryInit(void) always succeeds.

Definition at line 174 of file vsync.h.


Constructor & Destructor Documentation

BusyWaitVideoSync::BusyWaitVideoSync ( VideoOutput vo,
int  frame_interval,
int  refresh_interval,
bool  interlaced 
)

Definition at line 397 of file vsync.cpp.

BusyWaitVideoSync::~BusyWaitVideoSync (  ) 

Definition at line 405 of file vsync.cpp.


Member Function Documentation

QString BusyWaitVideoSync::getName ( void   )  const [inline, virtual]

Returns name of instanciated VSync method.

Implements VideoSync.

Definition at line 182 of file vsync.h.

bool BusyWaitVideoSync::TryInit ( void   )  [virtual]

Tries to initialize VSync method.

Implements VideoSync.

Definition at line 409 of file vsync.cpp.

int BusyWaitVideoSync::WaitForFrame ( int  sync_delay  )  [virtual]

Waits for next a frame or field.

Returns delay to real frame timing in usec

Start(void), WaitForFrame(void), and Stop(void) should always be called from same thread, to prevent bad interactions with threads.

Parameters:
sync_delay time until the desired frame or field
See also:
CalcDelay(void), KeepPhase(void)

Implements VideoSync.

Definition at line 414 of file vsync.cpp.


Member Data Documentation

Definition at line 187 of file vsync.h.

Referenced by BusyWaitVideoSync(), and WaitForFrame().

Definition at line 188 of file vsync.h.

Referenced by BusyWaitVideoSync(), and WaitForFrame().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Thu May 24 06:41:51 2012 for MythTV by  doxygen 1.6.3