/*
 * This file is auto-generated, do not modify!
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 */

#include "config.h"

#include <glib.h>

#include "fu-v4l-struct.h"

#ifdef G_LOG_DOMAIN
  #undef G_LOG_DOMAIN
#endif
#define G_LOG_DOMAIN "FuStruct"

/**
 * fu_v4l_cap_to_string:
 * @val: value, e.g. %FU_V4L_CAP_VIDEO_CAPTURE
 *
 * Converts an enumerated value to a string.
 *
 * Returns: identifier string
 *
 **/
gchar *
fu_v4l_cap_to_string(FuV4lCap val)
{
    const gchar *data[30] = {0};
    guint idx = 0;
    if (val == FU_V4L_CAP_NONE)
        return g_strdup("none");
    if (val & FU_V4L_CAP_VIDEO_CAPTURE)
        data[idx++] = "video-capture";
    if (val & FU_V4L_CAP_VIDEO_OUTPUT)
        data[idx++] = "video-output";
    if (val & FU_V4L_CAP_VIDEO_OVERLAY)
        data[idx++] = "video-overlay";
    if (val & FU_V4L_CAP_VBI_CAPTURE)
        data[idx++] = "vbi-capture";
    if (val & FU_V4L_CAP_VBI_OUTPUT)
        data[idx++] = "vbi-output";
    if (val & FU_V4L_CAP_SLICED_VBI_CAPTURE)
        data[idx++] = "sliced-vbi-capture";
    if (val & FU_V4L_CAP_SLICED_VBI_OUTPUT)
        data[idx++] = "sliced-vbi-output";
    if (val & FU_V4L_CAP_RDS_CAPTURE)
        data[idx++] = "rds-capture";
    if (val & FU_V4L_CAP_VIDEO_OUTPUT_OVERLAY)
        data[idx++] = "video-output-overlay";
    if (val & FU_V4L_CAP_HW_FREQ_SEEK)
        data[idx++] = "hw-freq-seek";
    if (val & FU_V4L_CAP_RDS_OUTPUT)
        data[idx++] = "rds-output";
    if (val & FU_V4L_CAP_VIDEO_CAPTURE_MPLANE)
        data[idx++] = "video-capture-mplane";
    if (val & FU_V4L_CAP_VIDEO_OUTPUT_MPLANE)
        data[idx++] = "video-output-mplane";
    if (val & FU_V4L_CAP_VIDEO_M2M_MPLANE)
        data[idx++] = "video-m2m-mplane";
    if (val & FU_V4L_CAP_VIDEO_M2M)
        data[idx++] = "video-m2m";
    if (val & FU_V4L_CAP_TUNER)
        data[idx++] = "tuner";
    if (val & FU_V4L_CAP_AUDIO)
        data[idx++] = "audio";
    if (val & FU_V4L_CAP_RADIO)
        data[idx++] = "radio";
    if (val & FU_V4L_CAP_MODULATOR)
        data[idx++] = "modulator";
    if (val & FU_V4L_CAP_SDR_CAPTURE)
        data[idx++] = "sdr-capture";
    if (val & FU_V4L_CAP_EXT_PIX_FORMAT)
        data[idx++] = "ext-pix-format";
    if (val & FU_V4L_CAP_SDR_OUTPUT)
        data[idx++] = "sdr-output";
    if (val & FU_V4L_CAP_META_CAPTURE)
        data[idx++] = "meta-capture";
    if (val & FU_V4L_CAP_READWRITE)
        data[idx++] = "readwrite";
    if (val & FU_V4L_CAP_STREAMING)
        data[idx++] = "streaming";
    if (val & FU_V4L_CAP_META_OUTPUT)
        data[idx++] = "meta-output";
    if (val & FU_V4L_CAP_TOUCH)
        data[idx++] = "touch";
    if (val & FU_V4L_CAP_IO_MC)
        data[idx++] = "io-mc";
    if (val & FU_V4L_CAP_DEVICE_CAPS)
        data[idx++] = "device-caps";
    return g_strjoinv(",", (gchar **)data);
}
