testing v4l2 pretty struct pointer
This commit is contained in:
parent
dc7734b49d
commit
22a014b676
8
v4l2/t.c
8
v4l2/t.c
@ -7,6 +7,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
#include <linux/videodev2.h>
|
#include <linux/videodev2.h>
|
||||||
|
|
||||||
@ -40,6 +41,13 @@ fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
|
|||||||
|
|
||||||
pr_v4l2_format("before ioctl", &fmt);
|
pr_v4l2_format("before ioctl", &fmt);
|
||||||
|
|
||||||
|
foo = ioctl(vfd, VIDIOC_S_FMT, &fmt);
|
||||||
|
fprintf(stderr, "ioctl -> %d\n", foo);
|
||||||
|
if (foo < 0)) perror("ioctl S_FMT");
|
||||||
|
|
||||||
|
pr_v4l2_format("after ioctl", &fmt);
|
||||||
|
|
||||||
|
/* todo V4L2_BUF_TYPE_VIDEO_CAPTURE */
|
||||||
|
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user