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)\n{\n    const char *type_name;\n    enum AVHWDeviceType type;\n    for (type = av_hwdevice_iterate_types(AV_HWDEVICE_TYPE_NONE);\n         type != AV_HWDEVICE_TYPE_NONE;\n         type = av_hwdevice_iterate_types(type)) {\n        type_name = av_hwdevice_get_type_name(type);\n        if (strstr(codec_name, type_name))\n            return type;\n    }\n    return AV_HWDEVICE_TYPE_NONE;\n}', 'const char *av_hwdevice_get_type_name(enum AVHWDeviceType type)\n{\n    if (type > AV_HWDEVICE_TYPE_NONE &&\n        type < FF_ARRAY_ELEMS(hw_type_names))\n        return hw_type_names[type];\n    else\n        return NULL;\n}']