From: Dominic L. <ma...@us...> - 2005-10-19 21:07:35
|
Update of /cvsroot/robotflow/RobotFlow/Devices/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25821/include Modified Files: V4L2Capture.h Log Message: default NTSC Index: V4L2Capture.h =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Devices/include/V4L2Capture.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** V4L2Capture.h 19 Oct 2005 20:57:06 -0000 1.12 --- V4L2Capture.h 19 Oct 2005 21:07:19 -0000 1.13 *************** *** 462,466 **** struct v4l2_format fmt; unsigned int min; ! if (-1 == xioctl (fd, VIDIOC_QUERYCAP, &cap)) { if (EINVAL == errno) { --- 462,467 ---- struct v4l2_format fmt; unsigned int min; ! v4l2_std_id std; ! if (-1 == xioctl (fd, VIDIOC_QUERYCAP, &cap)) { if (EINVAL == errno) { *************** *** 479,482 **** --- 480,495 ---- } + std = V4L2_STD_NTSC; + + if (EINVAL == ioctl(fd,VIDIOC_S_STD,&std)) { + perror("VIDIOC_S_STD"); + } + + + if (EINVAL == ioctl(fd,VIDIOC_G_STD,&std)) { + perror("VIDIOC_G_STD"); + } + + switch (io) { case IO_METHOD_READ: *************** *** 528,532 **** fmt.fmt.pix.height = DEFAULT_HEIGHT; fmt.fmt.pix.pixelformat = DEFAULT_FORMAT; ! fmt.fmt.pix.field = V4L2_FIELD_INTERLACED; if (-1 == xioctl (fd, VIDIOC_S_FMT, &fmt)) --- 541,545 ---- fmt.fmt.pix.height = DEFAULT_HEIGHT; fmt.fmt.pix.pixelformat = DEFAULT_FORMAT; ! fmt.fmt.pix.field = V4L2_FIELD_ANY; if (-1 == xioctl (fd, VIDIOC_S_FMT, &fmt)) |