From 22a014b6763d2e3cbf4ace3a19c2d32dc88fa901 Mon Sep 17 00:00:00 2001 From: phyto Date: Tue, 2 Jul 2019 22:23:12 +0200 Subject: [PATCH] testing v4l2 pretty struct pointer --- v4l2/t.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/v4l2/t.c b/v4l2/t.c index 35612187..5bd0f904 100644 --- a/v4l2/t.c +++ b/v4l2/t.c @@ -7,8 +7,9 @@ #include #include #include +#include -#include +#include #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; }