Video synchronization class employing /dev/drm0. More...
#include <vsync.h>
Public Member Functions | |
| DRMVideoSync (VideoOutput *, int frame_interval, int refresh_interval, bool interlaced) | |
| ~DRMVideoSync () | |
| QString | getName (void) const |
| Returns name of instanciated VSync method. | |
| bool | TryInit (void) |
| Tries to initialize VSync method. | |
| void | Start (void) |
| Start VSync; must be called from main thread. | |
| int | WaitForFrame (int sync_delay) |
| Waits for next a frame or field. | |
Private Attributes | |
| int | m_dri_fd |
Static Private Attributes | |
| static const char * | sm_dri_dev = "/dev/dri/card0" |
Video synchronization class employing /dev/drm0.
Polls /dev/drm0 to wait for retrace. Phase-maintaining, meaning WaitForFrame should always return approximately the same time after a vertical retrace.
Definition at line 118 of file vsync.h.
| DRMVideoSync::DRMVideoSync | ( | VideoOutput * | vo, | |
| int | frame_interval, | |||
| int | refresh_interval, | |||
| bool | interlaced | |||
| ) |
| QString DRMVideoSync::getName | ( | void | ) | const [inline, virtual] |
| bool DRMVideoSync::TryInit | ( | void | ) | [virtual] |
| void DRMVideoSync::Start | ( | void | ) | [virtual] |
Start VSync; must be called from main thread.
Start(void), WaitForFrame(void), and Stop(void) should always be called from same thread, to prevent bad interactions with threads.
Reimplemented from VideoSync.
| int DRMVideoSync::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 DRMVideoSync::m_dri_fd [private] |
Definition at line 131 of file vsync.h.
Referenced by DRMVideoSync(), Start(), TryInit(), WaitForFrame(), and ~DRMVideoSync().
const char * DRMVideoSync::sm_dri_dev = "/dev/dri/card0" [static, private] |
1.6.3