1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avutil/hwcontext: Add item_name function for AVHWDeviceContext

Signed-off-by: softworkz <softworkz@hotmail.com>
This commit is contained in:
softworkz
2025-03-12 04:00:30 +01:00
parent bf1579c904
commit 9e1162bdf1

View File

@ -137,9 +137,15 @@ enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)
return set ? next : AV_HWDEVICE_TYPE_NONE;
}
static const char *hwdevice_ctx_get_name(void *ptr)
{
FFHWDeviceContext *ctx = ptr;
return ctx->hw_type->name;
}
static const AVClass hwdevice_ctx_class = {
.class_name = "AVHWDeviceContext",
.item_name = av_default_item_name,
.item_name = hwdevice_ctx_get_name,
.category = AV_CLASS_CATEGORY_HWDEVICE,
.version = LIBAVUTIL_VERSION_INT,
};