ready for prime time ?

This commit is contained in:
tth 2019-07-28 00:28:22 +02:00
parent 535c98df32
commit 9e60436a35
2 changed files with 9 additions and 7 deletions

View File

@ -255,7 +255,7 @@ return "???";
void pr_ctrl_id(uint32_t id)
{
if (verbosity) fprintf(FP, "%08x : ", id);
if (verbosity>1) fprintf(FP, "%08x : ", id);
fprintf(FP, "%x %03x %04x", (id>>28)&0xf,
V4L2_CTRL_ID2CLASS(id)>>16, id&0xffff);

View File

@ -44,7 +44,11 @@ for (;;) {
break;
}
}
pr_v4l2_fmtdesc(__func__, &fmtd);
// pr_v4l2_fmtdesc(__func__, &fmtd);
printf(" %2d %-10s 0x%02x %s %-32s \n",
fmtd.index, str_buf_type(fmtd.type), fmtd.flags,
str_fourcc(fmtd.pixelformat), fmtd.description);
idx++;
}
@ -97,7 +101,7 @@ for (idx=V4L2_CID_BASE; idx<V4L2_CID_LASTP1; idx++) {
qctrl.id = idx;
if (verbosity) printf(" id %d ", idx);
// if (verbosity>1) printf(" id %d ", idx);
if (0 == ioctl (fd, VIDIOC_QUERYCTRL, &qctrl)) {
if (qctrl.flags & V4L2_CTRL_FLAG_DISABLED) {
@ -112,7 +116,7 @@ for (idx=V4L2_CID_BASE; idx<V4L2_CID_LASTP1; idx++) {
}
else if (EINVAL==errno) {
if (verbosity) puts("einval");
if (verbosity) fprintf(stderr, "id %d einval\n", idx);
continue;
}
else {
@ -142,7 +146,7 @@ qctrl.id = V4L2_CTRL_FLAG_NEXT_CTRL;
idx = 0;
while (0 == ioctl (fd, VIDIOC_QUERYCTRL, &qctrl)) {
pr_ctrl_id(qctrl.id);
if (verbosity) pr_ctrl_id(qctrl.id);
printf(" %-32s %-10s [%d..%d]\n",
qctrl.name,
str_ctrl_type(qctrl.type),
@ -197,10 +201,8 @@ foo = enum_inputs(vfd, "on peut voir quoi ?", 0);
foo = enum_image_formats(vfd, "Experimental", 0);
fputs("--\n", stderr);
foo = enum_controls(vfd, "is that working ?", 0);
fputs("--\n", stderr);
foo = enum_extended_controls(vfd, "looking for extended", 0);