]> granicus.if.org Git - strace/commitdiff
xlat: provide fallback definitions for V4L2_CAP_* constants
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 3 Jan 2019 14:39:26 +0000 (15:39 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 22 Oct 2019 17:44:08 +0000 (17:44 +0000)
* xlat/v4l2_device_capabilities_flags.in: Sort, add fallback definitions
for constants.
* configure.ac (AC_CHECK_MEMBERS): Check for struct
v4l2_capability.device_caps.
* v4l2.c (print_v4l2_capability): Change V4L2_CAP_DEVICE_CAPS guard
to HAVE_STRUCT_V4L2_CAPABILITY_DEVICE_CAPS.

configure.ac
v4l2.c
xlat/v4l2_device_capabilities_flags.in

index 1217ce9e5287cd2235251209cfcdbd1785f5c667..fca95c7c3463a9b46d28a531b892179f0a8d812a 100644 (file)
@@ -803,6 +803,7 @@ AC_CHECK_DECLS(m4_normalize([
 #include <linux/videodev2.h>])
 
 AC_CHECK_MEMBERS(m4_normalize([
+       struct v4l2_capability.device_caps,
        struct v4l2_window.global_alpha,
        struct v4l2_sdr_format.buffersize
 ]),,, [#include <sys/time.h>
diff --git a/v4l2.c b/v4l2.c
index 505e7b873da09a08069335fe08a825121d5f8787..cc3d5fd887b975febf21aef9e8cc170fc033e313 100644 (file)
--- a/v4l2.c
+++ b/v4l2.c
@@ -133,7 +133,7 @@ print_v4l2_capability(struct tcb *const tcp, const kernel_ulong_t arg)
                caps.version & 0xFF);
        printflags(v4l2_device_capabilities_flags, caps.capabilities,
                   "V4L2_CAP_???");
-#ifdef V4L2_CAP_DEVICE_CAPS
+#ifdef HAVE_STRUCT_V4L2_CAPABILITY_DEVICE_CAPS
        tprints(", device_caps=");
        printflags(v4l2_device_capabilities_flags, caps.device_caps,
                   "V4L2_CAP_???");
index 8b74edbe88cb76fd9751c410896e223cfc393c77..fa65c105f4262def37963007e79b72c4e745d948 100644 (file)
@@ -1,29 +1,29 @@
-V4L2_CAP_VIDEO_CAPTURE
-V4L2_CAP_VIDEO_OUTPUT
-V4L2_CAP_VIDEO_OVERLAY
-V4L2_CAP_VBI_CAPTURE
-V4L2_CAP_VBI_OUTPUT
-V4L2_CAP_SLICED_VBI_CAPTURE
-V4L2_CAP_SLICED_VBI_OUTPUT
-V4L2_CAP_RDS_CAPTURE
-V4L2_CAP_VIDEO_OUTPUT_OVERLAY
-V4L2_CAP_HW_FREQ_SEEK
-V4L2_CAP_RDS_OUTPUT
-V4L2_CAP_VIDEO_CAPTURE_MPLANE
-V4L2_CAP_VIDEO_OUTPUT_MPLANE
-V4L2_CAP_VIDEO_M2M
-V4L2_CAP_VIDEO_M2M_MPLANE
-V4L2_CAP_TUNER
-V4L2_CAP_AUDIO
-V4L2_CAP_RADIO
-V4L2_CAP_MODULATOR
-V4L2_CAP_READWRITE
-V4L2_CAP_ASYNCIO
-V4L2_CAP_STREAMING
-V4L2_CAP_META_OUTPUT
-V4L2_CAP_TOUCH
-V4L2_CAP_DEVICE_CAPS
-V4L2_CAP_SDR_CAPTURE
-V4L2_CAP_EXT_PIX_FORMAT
-V4L2_CAP_SDR_OUTPUT
-V4L2_CAP_META_CAPTURE
+V4L2_CAP_VIDEO_CAPTURE         0x00000001
+V4L2_CAP_VIDEO_OUTPUT          0x00000002
+V4L2_CAP_VIDEO_OVERLAY         0x00000004
+V4L2_CAP_VBI_CAPTURE           0x00000010
+V4L2_CAP_VBI_OUTPUT            0x00000020
+V4L2_CAP_SLICED_VBI_CAPTURE    0x00000040
+V4L2_CAP_SLICED_VBI_OUTPUT     0x00000080
+V4L2_CAP_RDS_CAPTURE           0x00000100
+V4L2_CAP_VIDEO_OUTPUT_OVERLAY  0x00000200
+V4L2_CAP_HW_FREQ_SEEK          0x00000400
+V4L2_CAP_RDS_OUTPUT            0x00000800
+V4L2_CAP_VIDEO_CAPTURE_MPLANE  0x00001000
+V4L2_CAP_VIDEO_OUTPUT_MPLANE   0x00002000
+V4L2_CAP_VIDEO_M2M_MPLANE      0x00004000
+V4L2_CAP_VIDEO_M2M             0x00008000
+V4L2_CAP_TUNER                 0x00010000
+V4L2_CAP_AUDIO                 0x00020000
+V4L2_CAP_RADIO                 0x00040000
+V4L2_CAP_MODULATOR             0x00080000
+V4L2_CAP_SDR_CAPTURE           0x00100000
+V4L2_CAP_EXT_PIX_FORMAT                0x00200000
+V4L2_CAP_SDR_OUTPUT            0x00400000
+V4L2_CAP_META_CAPTURE          0x00800000
+V4L2_CAP_READWRITE             0x01000000
+V4L2_CAP_ASYNCIO               0x02000000
+V4L2_CAP_STREAMING             0x04000000
+V4L2_CAP_META_OUTPUT           0x08000000
+V4L2_CAP_TOUCH                 0x10000000
+V4L2_CAP_DEVICE_CAPS           0x80000000