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

BOOL PVideoInputDevice_1394DC::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.

Parameters:
heightNew width of frame New height of frame

Reimplemented from PVideoDevice.

Definition at line 765 of file video4dc1394.cxx.

References PVideoDevice::CalculateFrameBytes(), IsCapturing(), Start(), and Stop().

Referenced by SetFrameSizeConverter().

{
  if ((!(width == 320 && height == 240)) &&
      (!(width == 160 && height == 120)))
    return FALSE;

  frameWidth = width;
  frameHeight = height;

  if (frameWidth == 320 && frameHeight == 240)
    colourFormat = "UYVY422";
  else if (frameWidth == 160 && frameHeight == 120)
    colourFormat = "UYV444";

  frameBytes = PVideoDevice::CalculateFrameBytes(frameWidth, frameHeight, colourFormat);

  if (IsCapturing()) {
    Stop(); Start();
  }

  return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index