MythTV  0.26-pre
Public Member Functions | Private Attributes | Static Private Attributes
DRMVideoSync Class Reference

Video synchronization class employing /dev/drm0. More...

#include <vsync.h>

Inheritance diagram for DRMVideoSync:
VideoSync

List of all members.

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"

Detailed Description

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.


Constructor & Destructor Documentation

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

Definition at line 243 of file vsync.cpp.

Definition at line 249 of file vsync.cpp.


Member Function Documentation

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

Returns name of instanciated VSync method.

Implements VideoSync.

Definition at line 125 of file vsync.h.

bool DRMVideoSync::TryInit ( void  ) [virtual]

Tries to initialize VSync method.

Implements VideoSync.

Definition at line 256 of file vsync.cpp.

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.

Definition at line 282 of file vsync.cpp.

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.

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

Implements VideoSync.

Definition at line 292 of file vsync.cpp.


Member Data Documentation

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]

Definition at line 132 of file vsync.h.

Referenced by TryInit().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends