Browse Source

xlat: provide fallback definitions for V4L2_CAP_* constants

* 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.
Eugene Syromyatnikov 11 months ago
parent
commit
8fd3da7b99
3 changed files with 31 additions and 30 deletions
  1. 1
    0
      configure.ac
  2. 1
    1
      v4l2.c
  3. 29
    29
      xlat/v4l2_device_capabilities_flags.in

+ 1
- 0
configure.ac View File

@@ -803,6 +803,7 @@ AC_CHECK_DECLS(m4_normalize([
803 803
 #include <linux/videodev2.h>])
804 804
 
805 805
 AC_CHECK_MEMBERS(m4_normalize([
806
+	struct v4l2_capability.device_caps,
806 807
 	struct v4l2_window.global_alpha,
807 808
 	struct v4l2_sdr_format.buffersize
808 809
 ]),,, [#include <sys/time.h>

+ 1
- 1
v4l2.c View File

@@ -133,7 +133,7 @@ print_v4l2_capability(struct tcb *const tcp, const kernel_ulong_t arg)
133 133
 		caps.version & 0xFF);
134 134
 	printflags(v4l2_device_capabilities_flags, caps.capabilities,
135 135
 		   "V4L2_CAP_???");
136
-#ifdef V4L2_CAP_DEVICE_CAPS
136
+#ifdef HAVE_STRUCT_V4L2_CAPABILITY_DEVICE_CAPS
137 137
 	tprints(", device_caps=");
138 138
 	printflags(v4l2_device_capabilities_flags, caps.device_caps,
139 139
 		   "V4L2_CAP_???");

+ 29
- 29
xlat/v4l2_device_capabilities_flags.in View File

@@ -1,29 +1,29 @@
1
-V4L2_CAP_VIDEO_CAPTURE
2
-V4L2_CAP_VIDEO_OUTPUT
3
-V4L2_CAP_VIDEO_OVERLAY
4
-V4L2_CAP_VBI_CAPTURE
5
-V4L2_CAP_VBI_OUTPUT
6
-V4L2_CAP_SLICED_VBI_CAPTURE
7
-V4L2_CAP_SLICED_VBI_OUTPUT
8
-V4L2_CAP_RDS_CAPTURE
9
-V4L2_CAP_VIDEO_OUTPUT_OVERLAY
10
-V4L2_CAP_HW_FREQ_SEEK
11
-V4L2_CAP_RDS_OUTPUT
12
-V4L2_CAP_VIDEO_CAPTURE_MPLANE
13
-V4L2_CAP_VIDEO_OUTPUT_MPLANE
14
-V4L2_CAP_VIDEO_M2M
15
-V4L2_CAP_VIDEO_M2M_MPLANE
16
-V4L2_CAP_TUNER
17
-V4L2_CAP_AUDIO
18
-V4L2_CAP_RADIO
19
-V4L2_CAP_MODULATOR
20
-V4L2_CAP_READWRITE
21
-V4L2_CAP_ASYNCIO
22
-V4L2_CAP_STREAMING
23
-V4L2_CAP_META_OUTPUT
24
-V4L2_CAP_TOUCH
25
-V4L2_CAP_DEVICE_CAPS
26
-V4L2_CAP_SDR_CAPTURE
27
-V4L2_CAP_EXT_PIX_FORMAT
28
-V4L2_CAP_SDR_OUTPUT
29
-V4L2_CAP_META_CAPTURE
1
+V4L2_CAP_VIDEO_CAPTURE		0x00000001
2
+V4L2_CAP_VIDEO_OUTPUT		0x00000002
3
+V4L2_CAP_VIDEO_OVERLAY		0x00000004
4
+V4L2_CAP_VBI_CAPTURE		0x00000010
5
+V4L2_CAP_VBI_OUTPUT		0x00000020
6
+V4L2_CAP_SLICED_VBI_CAPTURE	0x00000040
7
+V4L2_CAP_SLICED_VBI_OUTPUT	0x00000080
8
+V4L2_CAP_RDS_CAPTURE		0x00000100
9
+V4L2_CAP_VIDEO_OUTPUT_OVERLAY	0x00000200
10
+V4L2_CAP_HW_FREQ_SEEK		0x00000400
11
+V4L2_CAP_RDS_OUTPUT		0x00000800
12
+V4L2_CAP_VIDEO_CAPTURE_MPLANE	0x00001000
13
+V4L2_CAP_VIDEO_OUTPUT_MPLANE	0x00002000
14
+V4L2_CAP_VIDEO_M2M_MPLANE	0x00004000
15
+V4L2_CAP_VIDEO_M2M		0x00008000
16
+V4L2_CAP_TUNER			0x00010000
17
+V4L2_CAP_AUDIO			0x00020000
18
+V4L2_CAP_RADIO			0x00040000
19
+V4L2_CAP_MODULATOR		0x00080000
20
+V4L2_CAP_SDR_CAPTURE		0x00100000
21
+V4L2_CAP_EXT_PIX_FORMAT		0x00200000
22
+V4L2_CAP_SDR_OUTPUT		0x00400000
23
+V4L2_CAP_META_CAPTURE		0x00800000
24
+V4L2_CAP_READWRITE		0x01000000
25
+V4L2_CAP_ASYNCIO		0x02000000
26
+V4L2_CAP_STREAMING		0x04000000
27
+V4L2_CAP_META_OUTPUT		0x08000000
28
+V4L2_CAP_TOUCH			0x10000000
29
+V4L2_CAP_DEVICE_CAPS		0x80000000

Loading…
Cancel
Save