|
木♀木 发表于 2012-12-16 10:22
struct v4l2_fmtdesc fmtdesc;
memset(&fmtdesc, 0, sizeof(fmtdesc));
fmtdesc.index=0;
添加你的这段代码后,得到下面信息:
我从新设置格式以后还是出错,是在这段代码上:
if (ioctl (fd, VIDIOC_S_FMT,&fmt) < 0 ){
printf("set format failed.\n");
return -1 ;
}
我估计是驱动的原因,就如我在帖子上第一个图,当插上摄像头以后,没有出现下面信息
[root@EmbedSky /bin]# usb 1-1: USB disconnect, address 7
usb 1-1: new full speed USB device using s3c2410-ohci and address 8
usb 1-1: New USB device found, idVendor=0ac8, idProduct=301b
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: PC Camera
usb 1-1: Manufacturer: Z-Star Corp.
usb 1-1: configuration #1 chosen from 1 choice
gspca: probing 0ac8:301b
zc3xx: probe 2wr ov vga 0x0000
zc3xx: probe sensor -> 0011
zc3xx: Find Sensor HV7131R(c)
gspca: probe oK
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|