Video synchronization classes employing usleep() and busy-waits. More...
#include <vsync.h>
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 |
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.
| BusyWaitVideoSync::BusyWaitVideoSync | ( | VideoOutput * | vo, | |
| int | frame_interval, | |||
| int | refresh_interval, | |||
| bool | interlaced | |||
| ) |
| QString BusyWaitVideoSync::getName | ( | void | ) | const [inline, virtual] |
| bool BusyWaitVideoSync::TryInit | ( | void | ) | [virtual] |
| 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.
| sync_delay | time until the desired frame or field |
Implements VideoSync.
int BusyWaitVideoSync::m_cheat [private] |
Definition at line 187 of file vsync.h.
Referenced by BusyWaitVideoSync(), and WaitForFrame().
int BusyWaitVideoSync::m_fudge [private] |
Definition at line 188 of file vsync.h.
Referenced by BusyWaitVideoSync(), and WaitForFrame().
1.6.3