Browse Source

xlat: update V4L2_CTRL_TYPE_* constants

* xlat/v4l2_control_types.in: Add fallback definitions for constants,
and #sorted.
* configure.ac (AC_CHECK_MEMBERS): Check for struct
v4l2_ext_control.string field.
* v4l2.c (print_v4l2_ext_control): Change guard macro
to HAVE_STRUCT_V4L2_EXT_CONTROL_STRING.
Eugene Syromyatnikov 1 year ago
parent
commit
3c57c523cd
3 changed files with 15 additions and 13 deletions
  1. 1
    0
      configure.ac
  2. 1
    1
      v4l2.c
  3. 13
    12
      xlat/v4l2_control_types.in

+ 1
- 0
configure.ac View File

@@ -804,6 +804,7 @@ AC_CHECK_DECLS(m4_normalize([
804 804
 
805 805
 AC_CHECK_MEMBERS(m4_normalize([
806 806
 	struct v4l2_capability.device_caps,
807
+	struct v4l2_ext_control.string,
807 808
 	struct v4l2_format.fmt.pix_mp,
808 809
 	struct v4l2_format.fmt.sdr,
809 810
 	struct v4l2_format.fmt.sliced,

+ 1
- 1
v4l2.c View File

@@ -809,7 +809,7 @@ print_v4l2_ext_control(struct tcb *tcp, void *elem_buf, size_t elem_size, void *
809 809
 
810 810
 	tprints("{id=");
811 811
 	printxval(v4l2_control_ids, p->id, "V4L2_CID_???");
812
-# if HAVE_DECL_V4L2_CTRL_TYPE_STRING
812
+# if HAVE_STRUCT_V4L2_EXT_CONTROL_STRING
813 813
 	tprintf(", size=%u", p->size);
814 814
 	if (p->size > 0) {
815 815
 		tprints(", string=");

+ 13
- 12
xlat/v4l2_control_types.in View File

@@ -1,12 +1,13 @@
1
-V4L2_CTRL_TYPE_INTEGER
2
-V4L2_CTRL_TYPE_BOOLEAN
3
-V4L2_CTRL_TYPE_MENU
4
-V4L2_CTRL_TYPE_BUTTON
5
-V4L2_CTRL_TYPE_INTEGER64
6
-V4L2_CTRL_TYPE_CTRL_CLASS
7
-V4L2_CTRL_TYPE_STRING
8
-V4L2_CTRL_TYPE_BITMASK
9
-V4L2_CTRL_TYPE_INTEGER_MENU
10
-V4L2_CTRL_TYPE_U8
11
-V4L2_CTRL_TYPE_U16
12
-V4L2_CTRL_TYPE_U32
1
+#sorted
2
+V4L2_CTRL_TYPE_INTEGER			1
3
+V4L2_CTRL_TYPE_BOOLEAN			2
4
+V4L2_CTRL_TYPE_MENU			3
5
+V4L2_CTRL_TYPE_BUTTON			4
6
+V4L2_CTRL_TYPE_INTEGER64		5
7
+V4L2_CTRL_TYPE_CTRL_CLASS		6
8
+V4L2_CTRL_TYPE_STRING			7
9
+V4L2_CTRL_TYPE_BITMASK			8
10
+V4L2_CTRL_TYPE_INTEGER_MENU		9
11
+V4L2_CTRL_TYPE_U8			0x100
12
+V4L2_CTRL_TYPE_U16			0x101
13
+V4L2_CTRL_TYPE_U32			0x102

Loading…
Cancel
Save