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

BOOL PVideoInputDevice_V4L::SetFrameSize ( unsigned  width,
unsigned  height 
) [virtual]

Set the frame size to be used.

Note that devices may not be able to produce the requested size, and this function will fail. See SetFrameSizeConverter().

Default behaviour sets the frameWidth and frameHeight variables and returns TRUE.

Reimplemented from PVideoDevice.

Definition at line 1008 of file vidinput_v4l.cxx.

References PVideoDevice::CalculateFrameBytes(), and PVideoDevice::SetFrameSize().

  PTRACE(5, "PVideoInputDevice_V4L\t SetFrameSize " << width <<"x"<<height << " Initiated.");
  if (!PVideoDevice::SetFrameSize(width, height)) {
    PTRACE(3,"PVideoInputDevice_V4L\t SetFrameSize "<<width<<"x"<<height<<" FAILED");
    return FALSE;

  if (!VerifyHardwareFrameSize(width, height)) {
    PTRACE(3,"PVideoInputDevice_V4L\t SetFrameSize failed for "<<width<<"x"<<height);
    PTRACE(3,"VerifyHardwareFrameSize failed.");
    return FALSE;

  frameBytes = CalculateFrameBytes(frameWidth, frameHeight, colourFormat);
  return TRUE;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index