Logo Search packages:      
Sourcecode: pwlib version File versions

BOOL PVideoChannel::Read ( void *  buf,
PINDEX  len 
) [virtual]

Low level read from the channel. This function may block until the requested number of characters were read or the read timeout was reached. The GetLastReadCount() function returns the actual number of bytes read.

The GetErrorCode() function should be consulted after Read() returns FALSE to determine what caused the failure.

TRUE indicates that at least one character was read from the channel. FALSE means no bytes were read due to timeout or some other I/O error.

Reimplemented from PChannel.

Definition at line 156 of file pvidchan.cxx.

References accessMutex, PVideoInputDevice::GetFrameData(), and mpInput.

Referenced by DisplayRawData().

  PWaitAndSignal m(accessMutex);

  if (mpInput == NULL)  
    return FALSE;

  BYTE * dataBuf;
  PINDEX dataLen;
  dataBuf = (BYTE *)buf;
  dataLen = len;
  mpInput->GetFrameData(dataBuf, &dataLen);

  return TRUE;

Generated by  Doxygen 1.6.0   Back to index