aboutsummaryrefslogtreecommitdiffstats
path: root/utils/v4l2-ctl/v4l2-ctl-sdr.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2018-07-30 13:07:31 +0200
committerHans Verkuil <hans.verkuil@cisco.com>2018-07-30 13:07:31 +0200
commit5583f43ef1a4814c2bd3c43cb06461b7f532b141 (patch)
tree821d88413db3763bd747a683b318e5ecbe592552 /utils/v4l2-ctl/v4l2-ctl-sdr.cpp
parent6ef0ae3423c1fbba2366b73cb292e026b9c9e233 (diff)
v4l2-ctl: add --list-formats-out-ext
Add the --list-formats-out-ext function since m2m (codec) devices need this. Also push cv4l_fd down into the various test sources. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/v4l2-ctl/v4l2-ctl-sdr.cpp')
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-sdr.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp
index 5006f300..d13f5c76 100644
--- a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp
@@ -63,8 +63,9 @@ void sdr_cmd(int ch, char *optarg)
}
}
-void sdr_set(int fd)
+void sdr_set(cv4l_fd &_fd)
{
+ int fd = _fd.g_fd();
int ret;
if (options[OptSetSdrFormat] || options[OptTrySdrFormat]) {
@@ -119,21 +120,21 @@ void sdr_set(int fd)
}
}
-void sdr_get(int fd)
+void sdr_get(cv4l_fd &fd)
{
if (options[OptGetSdrFormat]) {
vfmt.type = V4L2_BUF_TYPE_SDR_CAPTURE;
- if (doioctl(fd, VIDIOC_G_FMT, &vfmt) == 0)
- printfmt(fd, vfmt);
+ if (doioctl(fd.g_fd(), VIDIOC_G_FMT, &vfmt) == 0)
+ printfmt(fd.g_fd(), vfmt);
}
if (options[OptGetSdrOutFormat]) {
vfmt.type = V4L2_BUF_TYPE_SDR_OUTPUT;
- if (doioctl(fd, VIDIOC_G_FMT, &vfmt) == 0)
- printfmt(fd, vfmt);
+ if (doioctl(fd.g_fd(), VIDIOC_G_FMT, &vfmt) == 0)
+ printfmt(fd.g_fd(), vfmt);
}
}
-void sdr_list(int fd)
+void sdr_list(cv4l_fd &fd)
{
if (options[OptListSdrFormats]) {
printf("ioctl: VIDIOC_ENUM_FMT\n");

Privacy Policy