summaryrefslogtreecommitdiff
path: root/v4l2-apps/util/v4l2-ctl.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-26 14:25:00 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2008-07-26 14:25:00 +0200
commit645ea1c5979b7656a137d9198c63cc1d012905a4 (patch)
tree82215636bff9b0db874c5296b882618981159820 /v4l2-apps/util/v4l2-ctl.cpp
parentec67295f0c67ff8c37ae249851deb75140d15d83 (diff)
downloadmediapointer-dvb-s2-645ea1c5979b7656a137d9198c63cc1d012905a4.tar.gz
mediapointer-dvb-s2-645ea1c5979b7656a137d9198c63cc1d012905a4.tar.bz2
v4l2-ctl: fix find_controls when dealing with old-style controls.
From: Hans Verkuil <hverkuil@xs4all.nl> 'v4l2-ctl -C contrast' would not show the control description. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'v4l2-apps/util/v4l2-ctl.cpp')
-rw-r--r--v4l2-apps/util/v4l2-ctl.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/v4l2-apps/util/v4l2-ctl.cpp b/v4l2-apps/util/v4l2-ctl.cpp
index 3e56e63a1..920fbd1a3 100644
--- a/v4l2-apps/util/v4l2-ctl.cpp
+++ b/v4l2-apps/util/v4l2-ctl.cpp
@@ -634,13 +634,17 @@ static void find_controls(int fd)
for (id = V4L2_CID_USER_BASE; id < V4L2_CID_LASTP1; id++) {
qctrl.id = id;
if (ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == 0 &&
- !(qctrl.flags & V4L2_CTRL_FLAG_DISABLED))
+ !(qctrl.flags & V4L2_CTRL_FLAG_DISABLED)) {
ctrl_str2id[name2var(qctrl.name)] = qctrl.id;
+ ctrl_id2str[qctrl.id] = name2var(qctrl.name);
+ }
}
for (qctrl.id = V4L2_CID_PRIVATE_BASE;
ioctl(fd, VIDIOC_QUERYCTRL, &qctrl) == 0; qctrl.id++) {
- if (!(qctrl.flags & V4L2_CTRL_FLAG_DISABLED))
+ if (!(qctrl.flags & V4L2_CTRL_FLAG_DISABLED)) {
ctrl_str2id[name2var(qctrl.name)] = qctrl.id;
+ ctrl_id2str[qctrl.id] = name2var(qctrl.name);
+ }
}
}