|
不行,还是抓不到图。v4l2代码跑了一下,获取格式失败,麻烦看一下问题在哪里?谢谢
代码:
struct v4l2_fmtdesc v4fmt;
memset(&v4fmt,0,sizeof(v4fmt));
//v4fmt.index=0;
v4fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
//v4fmt.type = V4L2_BUF_TYPE_META_CAPTURE;
int ret = ioctl(fd, VIDIOC_ENUM_FMT, &v4fmt);
printf("ret is:%d\n",ret);
运行结果:
ret is:-1
获取失败!: Invalid argument
index=0
flags=0
description=-1361865056
pixelformat=
reserved=0 |
|