This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
程序中,下面的这段代码好像没有起作用,我设置的像素是720*576,但是程序第一次运行时采集的图片是720*576的,第二次运行就变成720*480了,可是也没有报错,我认为根本就没有进行像素的操作,好像芯片内部就决定了一样,求解释。
struct v4l2_format fmt;
CLEAR (fmt);
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
fmt.fmt.pix.width= 720;
fmt.fmt.pix.height= 576;
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
fmt.fmt.pix.field= V4L2_FIELD_INTERLACED;
if (-1 == xioctl (fd, VIDIOC_S_FMT, &fmt)) errno_exit ("VIDIOC_S_FMT");