Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PVideoInputDevice_1394AVC::GetFrameData ( BYTE *  buffer,
PINDEX *  bytesReturned = NULL 
) [virtual]

Grab a frame, after a delay as specified by the frame rate.

bytesReturnedBuffer to receive frame OPtional bytes returned.

Implements PVideoInputDevice.

Definition at line 469 of file vidinput_avc.cxx.

References PThread::Current(), GetFrameDataNoDelay(), and PThread::Sleep().

  int capturing_duration = 10000; // FIXME: what is it for?
  // notice: funny things happen when it is set too low!
  if(frameRate>0) {
    if(msBetweenFrames > capturing_duration)
      PThread::Current()->Sleep(msBetweenFrames - capturing_duration);
    PTime start;
    if(!GetFrameDataNoDelay(buffer, bytesReturned))
      return FALSE;
    PTime end;
    capturing_duration = (int)((end-start).GetMilliSeconds());
    return TRUE;
  return GetFrameDataNoDelay(buffer, bytesReturned);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index