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

bool CVideoDevice::TryPalette ( int  pal,
int  depth 
) [private]

Tries to set a VIDEO_PALETTE_* palette.

Parameters:
pal One of the VIDEO_PALETTE_* palettes.
depth visual depth (?) [Okay, CPIA driver, have it your way *GRRR*]
Returns:
TRUE on success, FALSE on failure

Definition at line 267 of file VideoDevice.cc.

{
   VPic.palette = pal;
   VPic.depth = depth;
   if (ioctl(CamFD, VIDIOCSPICT, &VPic) < 0)
     return FALSE;
   /* Sigh. It was to be expected. The OV511 and IBMCam don't pay attention to the palette field */
   if (ioctl(CamFD, VIDIOCGPICT, &VPic) < 0)
     return FALSE;
   if (VPic.palette == pal) {
     Palette = pal;
     return TRUE;
   }
   return FALSE;
}


Generated by  Doxygen 1.6.0   Back to index