diff options
-rw-r--r-- | v4l2-apps/util/v4l2-ctl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/v4l2-apps/util/v4l2-ctl.cpp b/v4l2-apps/util/v4l2-ctl.cpp index a0b14d9fb..9229732ac 100644 --- a/v4l2-apps/util/v4l2-ctl.cpp +++ b/v4l2-apps/util/v4l2-ctl.cpp @@ -553,7 +553,8 @@ static void find_controls(int fd) int id; while (ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == 0) { - if (qctrl.type != V4L2_CTRL_TYPE_CTRL_CLASS) { + if (qctrl.type != V4L2_CTRL_TYPE_CTRL_CLASS && + !(qctrl.flags & V4L2_CTRL_FLAG_DISABLED)) { ctrl_str2id[name2var(qctrl.name)] = qctrl.id; ctrl_id2str[qctrl.id] = name2var(qctrl.name); } @@ -563,12 +564,14 @@ static void find_controls(int fd) return; for (id = V4L2_CID_USER_BASE; id < V4L2_CID_LASTP1; id++) { qctrl.id = id; - if (ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == 0) + if (ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == 0 && + !(qctrl.flags & V4L2_CTRL_FLAG_DISABLED)) ctrl_str2id[name2var(qctrl.name)] = qctrl.id; } for (qctrl.id = V4L2_CID_PRIVATE_BASE; ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == 0; qctrl.id++) { - ctrl_str2id[name2var(qctrl.name)] = qctrl.id; + if (!(qctrl.flags & V4L2_CTRL_FLAG_DISABLED)) + ctrl_str2id[name2var(qctrl.name)] = qctrl.id; } } |