我买了个摄像头单是不知道什么芯片的,用lshal 查看显示:
usb_device.product = 'USB2.0 PC CAMERA' (string)
usb_device.product_id = 12944 (0x3290) (int)
usb_device.speed = 12.0 (12) (double)
usb_device.speed_bcd = 4608 (0x1200) (int)
usb_device.vendor = 'ARKMICRO' (string)
usb_device.vendor_id = 6380 (0x18ec) (int)
但是在V4L2设置图片格式为320x240的时候
memset ( &fmt, 0, sizeof(fmt) );
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
fmt.fmt.pix.width = 320;
fmt.fmt.pix.height = 240;
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_JPEG;
if (ioctl(fd, VIDIOC_S_FMT, &fmt) < 0)
{
printf("set format failed\n");
}
运行的时候就显示:set format failed。没有通过。请问做过USB摄像头采集的,是不是摄像头必修要ZC30x这种芯片才行。如果不知道芯片型号就不行?谢谢。