You've already forked FFmpeg
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:
@ -137,9 +137,15 @@ enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev)
|
|||||||
return set ? next : AV_HWDEVICE_TYPE_NONE;
|
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 = {
|
static const AVClass hwdevice_ctx_class = {
|
||||||
.class_name = "AVHWDeviceContext",
|
.class_name = "AVHWDeviceContext",
|
||||||
.item_name = av_default_item_name,
|
.item_name = hwdevice_ctx_get_name,
|
||||||
.category = AV_CLASS_CATEGORY_HWDEVICE,
|
.category = AV_CLASS_CATEGORY_HWDEVICE,
|
||||||
.version = LIBAVUTIL_VERSION_INT,
|
.version = LIBAVUTIL_VERSION_INT,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user