Linux??V4L2???????????
???????????? ???????[ 2013/8/26 14:13:38 ] ????????
////
unsigned int i;
enum v4l2_buf_type type;
for(i = 0; i < 4; i++){
struct v4l2_buffer buf;
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
buf.index = i;
ioctl(fd??VIDIOC_QBUF??&buf);
}
type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ioctl(fd??VIDIOC_STREAMON??&type);
////
struct v4l2_buffer buf;
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
ioctl(fd??VIDIOC_DQBUF??&buf);
char path[20];
snprintf(path??sizeof(path)??"./yuyv%d"??buf.index);
int fdyuyv = open(path??O_WRONLY|O_CREAT??00700);
printf("TK--------->>>>fdyuyv is %d
"??fdyuyv);
int resultyuyv = write(fdyuyv??buffers[buf.index].start??1280*720*2);
printf("TK--------->>>resultyuyv is %d
"??resultyuyv);
close(fdyuyv);
////
close(fd);
return 0;
}
????????????????
????gcc test.c -o rest
????./test
???????????
???????????????yuyv0??????????????jpeg???????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11