From b37e0c801e4c4e448906c0c4dc1191492ff50605 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Sun, 20 Oct 2019 19:05:16 +0200 Subject: [PATCH 69/76] xlat: update v4l2_format_description_flags * xlat/v4l2_format_description_flags.in (V4L2_FMT_FLAG_COMPRESSED, V4L2_FMT_FLAG_EMULATED): Add fallback definitions. (V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM): New constant, introduced by Linux commit v5.4-rc1~145^2~69. (V4L2_FMT_FLAG_DYN_RESOLUTION): New constant, introduced by Linux commit v5.4-rc1~145^2~68. --- xlat/v4l2_format_description_flags.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) Index: strace-5.1/xlat/v4l2_format_description_flags.in =================================================================== --- strace-5.1.orig/xlat/v4l2_format_description_flags.in 2014-11-04 16:27:31.000000000 +0100 +++ strace-5.1/xlat/v4l2_format_description_flags.in 2020-01-29 12:38:57.160012970 +0100 @@ -1,2 +1,4 @@ -V4L2_FMT_FLAG_COMPRESSED -V4L2_FMT_FLAG_EMULATED +V4L2_FMT_FLAG_COMPRESSED 0x0001 +V4L2_FMT_FLAG_EMULATED 0x0002 +V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004 +V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008 Index: strace-5.1/xlat/v4l2_format_description_flags.h =================================================================== --- strace-5.1.orig/xlat/v4l2_format_description_flags.h 2019-05-22 15:08:31.000000000 +0200 +++ strace-5.1/xlat/v4l2_format_description_flags.h 2020-01-29 12:39:06.599926319 +0100 @@ -3,6 +3,34 @@ #include "gcc_compat.h" #include "static_assert.h" +#if defined(V4L2_FMT_FLAG_COMPRESSED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED) && HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED) +DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE +static_assert((V4L2_FMT_FLAG_COMPRESSED) == (0x0001), "V4L2_FMT_FLAG_COMPRESSED != 0x0001"); +DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE +#else +# define V4L2_FMT_FLAG_COMPRESSED 0x0001 +#endif +#if defined(V4L2_FMT_FLAG_EMULATED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_EMULATED) && HAVE_DECL_V4L2_FMT_FLAG_EMULATED) +DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE +static_assert((V4L2_FMT_FLAG_EMULATED) == (0x0002), "V4L2_FMT_FLAG_EMULATED != 0x0002"); +DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE +#else +# define V4L2_FMT_FLAG_EMULATED 0x0002 +#endif +#if defined(V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM) || (defined(HAVE_DECL_V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM) && HAVE_DECL_V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM) +DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE +static_assert((V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM) == (0x0004), "V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM != 0x0004"); +DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE +#else +# define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM 0x0004 +#endif +#if defined(V4L2_FMT_FLAG_DYN_RESOLUTION) || (defined(HAVE_DECL_V4L2_FMT_FLAG_DYN_RESOLUTION) && HAVE_DECL_V4L2_FMT_FLAG_DYN_RESOLUTION) +DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE +static_assert((V4L2_FMT_FLAG_DYN_RESOLUTION) == (0x0008), "V4L2_FMT_FLAG_DYN_RESOLUTION != 0x0008"); +DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE +#else +# define V4L2_FMT_FLAG_DYN_RESOLUTION 0x0008 +#endif #ifndef XLAT_MACROS_ONLY @@ -16,12 +44,10 @@ static # endif const struct xlat v4l2_format_description_flags[] = { -#if defined(V4L2_FMT_FLAG_COMPRESSED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED) && HAVE_DECL_V4L2_FMT_FLAG_COMPRESSED) - XLAT(V4L2_FMT_FLAG_COMPRESSED), -#endif -#if defined(V4L2_FMT_FLAG_EMULATED) || (defined(HAVE_DECL_V4L2_FMT_FLAG_EMULATED) && HAVE_DECL_V4L2_FMT_FLAG_EMULATED) - XLAT(V4L2_FMT_FLAG_EMULATED), -#endif + XLAT(V4L2_FMT_FLAG_COMPRESSED), + XLAT(V4L2_FMT_FLAG_EMULATED), + XLAT(V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM), + XLAT(V4L2_FMT_FLAG_DYN_RESOLUTION), XLAT_END };