nVidiaVideoSync Class Reference

#include <vsync.h>

Inheritance diagram for nVidiaVideoSync:

VideoSync

List of all members.


Detailed Description

Video synchronization class employing /dev/nvidia0.

Polls /dev/nvidia0 to wait for retrace. Phase-maintaining, meaning WaitForFrame should always return approximately the same time after a vertical retrace. This does not work with version 50 or later of the nVidia vendor drivers.

Definition at line 163 of file vsync.h.


Public Member Functions

 nVidiaVideoSync (VideoOutput *, int frame_interval, int refresh_interval, bool interlaced)
 ~nVidiaVideoSync ()
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.
void WaitForFrame (int sync_delay)
 Waits for next a frame or field.
void AdvanceTrigger (void)
 Use the next frame or field for CalcDelay(void) and WaitForFrame(int).

Private Member Functions

bool dopoll (void) const

Private Attributes

int m_nvidia_fd

Static Private Attributes

static char * sm_nvidia_dev = "/dev/nvidia0"

Constructor & Destructor Documentation

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

Definition at line 361 of file vsync.cpp.

nVidiaVideoSync::~nVidiaVideoSync (  ) 

Definition at line 367 of file vsync.cpp.


Member Function Documentation

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

Returns name of instanciated VSync method.

Implements VideoSync.

Definition at line 170 of file vsync.h.

bool nVidiaVideoSync::TryInit ( void   )  [virtual]

Tries to initialize VSync method.

Implements VideoSync.

Definition at line 391 of file vsync.cpp.

void nVidiaVideoSync::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 pthreads.

Reimplemented from VideoSync.

Definition at line 411 of file vsync.cpp.

void nVidiaVideoSync::WaitForFrame ( int  sync_delay  )  [virtual]

Waits for next a frame or field.

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

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

Implements VideoSync.

Definition at line 417 of file vsync.cpp.

void nVidiaVideoSync::AdvanceTrigger ( void   )  [virtual]

Use the next frame or field for CalcDelay(void) and WaitForFrame(int).

Implements VideoSync.

Definition at line 438 of file vsync.cpp.

bool nVidiaVideoSync::dopoll ( void   )  const [private]

Definition at line 373 of file vsync.cpp.

Referenced by Start(), TryInit(), and WaitForFrame().


Member Data Documentation

Definition at line 178 of file vsync.h.

Referenced by dopoll(), TryInit(), and ~nVidiaVideoSync().

char * nVidiaVideoSync::sm_nvidia_dev = "/dev/nvidia0" [static, private]

Definition at line 179 of file vsync.h.

Referenced by TryInit().


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

Generated on Sat Dec 18 05:16:08 2010 for MythTV by  doxygen 1.5.5