static enum AVHWDeviceType hw_device_match_type_in_name(const char *codec_name)

{

    const char *type_name;

    enum AVHWDeviceType type;

    for (type = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);

         type != AV_HWDEVICE_TYPE_NONE;

         type = av_hwdevice_iterate_types(type)) {

        type_name = av_hwdevice_get_type_name(type);

        if (strstr(codec_name, type_name))

            return type;

    }

    return AV_HWDEVICE_TYPE_NONE;

}

static enum AVHWDeviceType hw_device_match_type_in_name(const char *codec_name)

{

    const char *type_name;

    enum AVHWDeviceType type;

    for (type = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);

         type != AV_HWDEVICE_TYPE_NONE;

         type = av_hwdevice_iterate_types(type)) {

        type_name = av_hwdevice_get_type_name(type);

        if (strstr(codec_name, type_name))

            return type;

    }

    return AV_HWDEVICE_TYPE_NONE;

}

static enum AVHWDeviceType FUNC_0(const char *VAR_0)

{

    const char *VAR_1;

    enum AVHWDeviceType VAR_2;

    for (VAR_2 = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);

         VAR_2 != AV_HWDEVICE_TYPE_NONE;

         VAR_2 = av_hwdevice_iterate_types(VAR_2)) {

        VAR_1 = av_hwdevice_get_type_name(VAR_2);

        if (strstr(VAR_0, VAR_1))

            return VAR_2;

    }

    return AV_HWDEVICE_TYPE_NONE;

}

static enum AVHWDeviceType FUNC_0(const char *VAR_0)
{ const char *VAR_1; enum AVHWDeviceType VAR_2; for (VAR_2 = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE); VAR_2 != AV_HWDEVICE_TYPE_NONE; VAR_2 = av_hwdevice_iterate_types(VAR_2)) { VAR_1 = av_hwdevice_get_type_name(VAR_2); if (strstr(VAR_0, VAR_1))
return VAR_2; } return AV_HWDEVICE_TYPE_NONE; }