diff options
author | softworkz <softworkz@hotmail.com> | 2025-03-12 04:00:30 +0100 |
---|---|---|
committer | softworkz <softworkz@hotmail.com> | 2025-04-21 00:19:20 +0200 |
commit | 9e1162bdf1454d7ae3737429bcc6bd66e5da303a (patch) | |
tree | 16adf6769f0a5ae778bdfb6179734255de955287 | |
parent | bf1579c904a20e49f3d827e340dedb6f669617ce (diff) | |
download | ffmpeg-9e1162bdf1454d7ae3737429bcc6bd66e5da303a.tar.gz |
avutil/hwcontext: Add item_name function for AVHWDeviceContext
Signed-off-by: softworkz <softworkz@hotmail.com>
-rw-r--r-- | libavutil/hwcontext.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index 276dc9cee6..3111a44651 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c @@ -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, }; |