avutil/hwcontext: Add item_name function for AVHWDeviceContext
Signed-off-by: softworkz <softworkz@hotmail.com>
This commit is contained in:
parent
bf1579c904
commit
9e1162bdf1
1 changed files with 7 additions and 1 deletions
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue