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

BOOL PVideoInputDevice_VideoForWindows::Open ( const PString deviceName,
BOOL  startImmediate = TRUE 
) [virtual]

Open the device given the device name.

Parameters:
startImmediateDevice name to open Immediately start device

Implements PVideoInputDevice.

Definition at line 619 of file vfw.cxx.

References Close(), PThread::Create(), PThread::NoAutoDeleteThread, PThread::NormalPriority, Start(), and PSemaphore::Wait().

{
  Close();

  deviceName = devName;

  captureThread = PThread::Create(PCREATE_NOTIFIER(HandleCapture), 0,
                                  PThread::NoAutoDeleteThread, PThread::NormalPriority,
                                  "VidIn:%x");
  threadStarted.Wait();
  if (hCaptureWindow == NULL) {
    delete captureThread;
    captureThread = NULL;
    return FALSE;
  }

  if (startImmediate)
    return Start();

  return TRUE;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index