Hi List, ( hi Laurent! ), I want to put this little patch to discussion. If a FRAME_BASED ( or UNCOMPRESSED ) format is not known to the driver, this patch sets the fcc field of the uvc_format structure to the first 4 bytes of the GUID. This assertion is true for all GUIDs of YUV formats I know.
Currently the fcc field is set to 0 which means that this format can not be set by VIDIOC_S_FMT since this ioctl selects the format based on the fcc - ie. setting fcc to 0 renders the format completely unusable. The only other approach to make unknown formats would be to add some UVCIOC_FMT_ADD ioctl, similar to UVCIOC_CTRL_ADD but this would be more complicated :-/ /Arne
Common subdirectories: trunk/.svn and trunk_modified/.svn Common subdirectories: trunk/.tmp_versions and trunk_modified/.tmp_versions diff -u trunk/uvc_driver.c trunk_modified/uvc_driver.c --- trunk/uvc_driver.c 2008-01-10 18:34:58.000000000 +0100 +++ trunk_modified/uvc_driver.c 2008-01-10 18:34:50.000000000 +0100 @@ -332,7 +332,7 @@ UVC_GUID_ARGS(&buffer[5])); snprintf(format->name, sizeof format->name, UVC_GUID_FORMAT, UVC_GUID_ARGS(&buffer[5])); - format->fcc = 0; + format->fcc = (buffer[5]) | (buffer[6]<<8) | (buffer[7]<<16) | (buffer[8]<<24); } format->bpp = buffer[21];
_______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel