Line | Count | Source |
1 | | /* |
2 | | * This file is auto-generated, do not modify! |
3 | | * |
4 | | * SPDX-License-Identifier: LGPL-2.1-or-later |
5 | | */ |
6 | | |
7 | | #include "config.h" |
8 | | |
9 | | #include <glib.h> |
10 | | |
11 | | #include "fu-v4l-struct.h" |
12 | | |
13 | | #ifdef G_LOG_DOMAIN |
14 | | #undef G_LOG_DOMAIN |
15 | | #endif |
16 | | #define G_LOG_DOMAIN "FuStruct" |
17 | | |
18 | | /** |
19 | | * fu_v4l_cap_to_string: |
20 | | * @val: value, e.g. %FU_V4L_CAP_VIDEO_CAPTURE |
21 | | * |
22 | | * Converts an enumerated value to a string. |
23 | | * |
24 | | * Returns: identifier string |
25 | | * |
26 | | **/ |
27 | | gchar * |
28 | | fu_v4l_cap_to_string(FuV4lCap val) |
29 | 0 | { |
30 | 0 | const gchar *data[30] = {0}; |
31 | 0 | guint idx = 0; |
32 | 0 | if (val == FU_V4L_CAP_NONE) |
33 | 0 | return g_strdup("none"); |
34 | 0 | if (val & FU_V4L_CAP_VIDEO_CAPTURE) |
35 | 0 | data[idx++] = "video-capture"; |
36 | 0 | if (val & FU_V4L_CAP_VIDEO_OUTPUT) |
37 | 0 | data[idx++] = "video-output"; |
38 | 0 | if (val & FU_V4L_CAP_VIDEO_OVERLAY) |
39 | 0 | data[idx++] = "video-overlay"; |
40 | 0 | if (val & FU_V4L_CAP_VBI_CAPTURE) |
41 | 0 | data[idx++] = "vbi-capture"; |
42 | 0 | if (val & FU_V4L_CAP_VBI_OUTPUT) |
43 | 0 | data[idx++] = "vbi-output"; |
44 | 0 | if (val & FU_V4L_CAP_SLICED_VBI_CAPTURE) |
45 | 0 | data[idx++] = "sliced-vbi-capture"; |
46 | 0 | if (val & FU_V4L_CAP_SLICED_VBI_OUTPUT) |
47 | 0 | data[idx++] = "sliced-vbi-output"; |
48 | 0 | if (val & FU_V4L_CAP_RDS_CAPTURE) |
49 | 0 | data[idx++] = "rds-capture"; |
50 | 0 | if (val & FU_V4L_CAP_VIDEO_OUTPUT_OVERLAY) |
51 | 0 | data[idx++] = "video-output-overlay"; |
52 | 0 | if (val & FU_V4L_CAP_HW_FREQ_SEEK) |
53 | 0 | data[idx++] = "hw-freq-seek"; |
54 | 0 | if (val & FU_V4L_CAP_RDS_OUTPUT) |
55 | 0 | data[idx++] = "rds-output"; |
56 | 0 | if (val & FU_V4L_CAP_VIDEO_CAPTURE_MPLANE) |
57 | 0 | data[idx++] = "video-capture-mplane"; |
58 | 0 | if (val & FU_V4L_CAP_VIDEO_OUTPUT_MPLANE) |
59 | 0 | data[idx++] = "video-output-mplane"; |
60 | 0 | if (val & FU_V4L_CAP_VIDEO_M2M_MPLANE) |
61 | 0 | data[idx++] = "video-m2m-mplane"; |
62 | 0 | if (val & FU_V4L_CAP_VIDEO_M2M) |
63 | 0 | data[idx++] = "video-m2m"; |
64 | 0 | if (val & FU_V4L_CAP_TUNER) |
65 | 0 | data[idx++] = "tuner"; |
66 | 0 | if (val & FU_V4L_CAP_AUDIO) |
67 | 0 | data[idx++] = "audio"; |
68 | 0 | if (val & FU_V4L_CAP_RADIO) |
69 | 0 | data[idx++] = "radio"; |
70 | 0 | if (val & FU_V4L_CAP_MODULATOR) |
71 | 0 | data[idx++] = "modulator"; |
72 | 0 | if (val & FU_V4L_CAP_SDR_CAPTURE) |
73 | 0 | data[idx++] = "sdr-capture"; |
74 | 0 | if (val & FU_V4L_CAP_EXT_PIX_FORMAT) |
75 | 0 | data[idx++] = "ext-pix-format"; |
76 | 0 | if (val & FU_V4L_CAP_SDR_OUTPUT) |
77 | 0 | data[idx++] = "sdr-output"; |
78 | 0 | if (val & FU_V4L_CAP_META_CAPTURE) |
79 | 0 | data[idx++] = "meta-capture"; |
80 | 0 | if (val & FU_V4L_CAP_READWRITE) |
81 | 0 | data[idx++] = "readwrite"; |
82 | 0 | if (val & FU_V4L_CAP_STREAMING) |
83 | 0 | data[idx++] = "streaming"; |
84 | 0 | if (val & FU_V4L_CAP_META_OUTPUT) |
85 | 0 | data[idx++] = "meta-output"; |
86 | 0 | if (val & FU_V4L_CAP_TOUCH) |
87 | 0 | data[idx++] = "touch"; |
88 | 0 | if (val & FU_V4L_CAP_IO_MC) |
89 | 0 | data[idx++] = "io-mc"; |
90 | 0 | if (val & FU_V4L_CAP_DEVICE_CAPS) |
91 | 0 | data[idx++] = "device-caps"; |
92 | 0 | return g_strjoinv(",", (gchar **)data); |
93 | 0 | } |