testing v4l2 pretty struct pointer

master
phyto 3 years ago
parent dc7734b49d
commit 22a014b676
  1. 10
      v4l2/t.c

@ -7,8 +7,9 @@
#include <unistd.h>
#include <math.h>
#include <string.h>
#include <sys/ioctl.h>
#include <linux/videodev2.h>
#include <linux/videodev2.h>
#include "funcs.h"
#include "../floatimg.h"
@ -40,6 +41,13 @@ fmt.fmt.pix.field = V4L2_FIELD_INTERLACED;
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;
}

Loading…
Cancel
Save