diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-05-21 12:44:02 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-05-21 12:44:02 +0200 |
commit | c5fbb8e80c9235232c11a933d7f0aef6b5734258 (patch) | |
tree | 786b839f0f8f31fe51969a6682334530e30d7571 /v4l2-apps/util/v4l2-ctl.cpp | |
parent | 29993ba41c50e8096ffd25fe704990479248d061 (diff) | |
download | mediapointer-dvb-s2-c5fbb8e80c9235232c11a933d7f0aef6b5734258.tar.gz mediapointer-dvb-s2-c5fbb8e80c9235232c11a933d7f0aef6b5734258.tar.bz2 |
Backed out changeset c7cb1aaec112a3ee7d6483b54d03d6a093754f10
Diffstat (limited to 'v4l2-apps/util/v4l2-ctl.cpp')
-rw-r--r-- | v4l2-apps/util/v4l2-ctl.cpp | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/v4l2-apps/util/v4l2-ctl.cpp b/v4l2-apps/util/v4l2-ctl.cpp index 0ce63bb1a..35d9f466b 100644 --- a/v4l2-apps/util/v4l2-ctl.cpp +++ b/v4l2-apps/util/v4l2-ctl.cpp @@ -678,6 +678,7 @@ static int printfmt(struct v4l2_format vfmt) switch (vfmt.type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: + case V4L2_BUF_TYPE_VIDEO_OUTPUT: printf("\tType : %s\n", buftype2s(vfmt.type).c_str()); printf("\tWidth/Height : %u/%u\n", vfmt.fmt.pix.width, vfmt.fmt.pix.height); printf("\tPixel Format : %s\n", fcc2s(vfmt.fmt.pix.pixelformat).c_str()); @@ -685,21 +686,17 @@ static int printfmt(struct v4l2_format vfmt) printf("\tBytes per Line: %u\n", vfmt.fmt.pix.bytesperline); printf("\tSize Image : %u\n", vfmt.fmt.pix.sizeimage); printf("\tColorspace : %s\n", colorspace2s(vfmt.fmt.pix.colorspace).c_str()); +#if 0 + /* Comment out until ABI breakage is resolved */ + if (vfmt.type == V4L2_BUF_TYPE_VIDEO_OUTPUT && + (capabilities & V4L2_CAP_VIDEO_OUTPUT_POS)) { + printf("\tLeft/Top : %d/%d\n", + vfmt.fmt.pix.left, vfmt.fmt.pix.top); + } +#endif if (vfmt.fmt.pix.priv) printf("\tCustom Info : %08x\n", vfmt.fmt.pix.priv); break; - case V4L2_BUF_TYPE_VIDEO_OUTPUT: - printf("\tType : %s\n", buftype2s(vfmt.type).c_str()); - printf("\tWidth/Height : %u/%u\n", vfmt.fmt.pix_out.width, vfmt.fmt.pix_out.height); - printf("\tPixel Format : %s\n", fcc2s(vfmt.fmt.pix_out.pixelformat).c_str()); - printf("\tField : %s\n", field2s(vfmt.fmt.pix_out.field).c_str()); - printf("\tBytes per Line: %u\n", vfmt.fmt.pix_out.bytesperline); - printf("\tSize Image : %u\n", vfmt.fmt.pix_out.sizeimage); - printf("\tColorspace : %s\n", colorspace2s(vfmt.fmt.pix_out.colorspace).c_str()); - printf("\tLeft/Top : %d/%d\n", vfmt.fmt.pix_out.left, vfmt.fmt.pix_out.top); - if (vfmt.fmt.pix_out.priv) - printf("\tCustom Info : %08x\n", vfmt.fmt.pix_out.priv); - break; case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: case V4L2_BUF_TYPE_VIDEO_OVERLAY: printf("\tType : %s\n", buftype2s(vfmt.type).c_str()); @@ -863,6 +860,8 @@ static std::string cap2s(unsigned cap) s += "\t\tSliced VBI Output\n"; if (cap & V4L2_CAP_RDS_CAPTURE) s += "\t\tRDS Capture\n"; + if (cap & V4L2_CAP_VIDEO_OUTPUT_POS) + s += "\t\tVideo Output Position\n"; if (cap & V4L2_CAP_TUNER) s += "\t\tTuner\n"; if (cap & V4L2_CAP_AUDIO) @@ -1159,20 +1158,23 @@ int main(int argc, char **argv) }; switch (parse_subopt(&subs, subopts, &value)) { +#if 0 + /* Comment out until ABI breakage is resolved */ case 0: - vfmt_out.fmt.pix_out.top = strtol(value, 0L, 0); + vfmt_out.fmt.pix.top = strtol(value, 0L, 0); set_fmts_out |= FmtTop; break; case 1: - vfmt_out.fmt.pix_out.left = strtol(value, 0L, 0); + vfmt_out.fmt.pix.left = strtol(value, 0L, 0); set_fmts_out |= FmtLeft; break; +#endif case 2: - vfmt_out.fmt.pix_out.width = strtol(value, 0L, 0); + vfmt_out.fmt.pix.width = strtol(value, 0L, 0); set_fmts_out |= FmtWidth; break; case 3: - vfmt_out.fmt.pix_out.height = strtol(value, 0L, 0); + vfmt_out.fmt.pix.height = strtol(value, 0L, 0); set_fmts_out |= FmtHeight; break; } @@ -1556,14 +1558,17 @@ int main(int argc, char **argv) if (ioctl(fd, VIDIOC_G_FMT, &in_vfmt) < 0) fprintf(stderr, "ioctl: VIDIOC_G_FMT failed\n"); else { +#if 0 + /* Comment out until ABI breakage is resolved */ if (set_fmts_out & FmtTop) - in_vfmt.fmt.pix_out.top = vfmt_out.fmt.pix_out.top; + in_vfmt.fmt.pix.top = vfmt_out.fmt.pix.top; if (set_fmts_out & FmtLeft) - in_vfmt.fmt.pix_out.left = vfmt_out.fmt.pix_out.left; + in_vfmt.fmt.pix.left = vfmt_out.fmt.pix.left; +#endif if (set_fmts_out & FmtWidth) - in_vfmt.fmt.pix_out.width = vfmt_out.fmt.pix_out.width; + in_vfmt.fmt.pix.width = vfmt_out.fmt.pix.width; if (set_fmts_out & FmtHeight) - in_vfmt.fmt.pix_out.height = vfmt_out.fmt.pix_out.height; + in_vfmt.fmt.pix.height = vfmt_out.fmt.pix.height; if (ioctl(fd, VIDIOC_S_FMT, &in_vfmt) < 0) fprintf(stderr, "ioctl: VIDIOC_S_FMT failed\n"); } |