1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-27 23:43:28 +02:00

avfilter/internal: Add AVFILTER_DEFINE_CLASS_EXT

This macro will allow to share options between AVClasses without
having to redefine the option name (as is currently done) and will
also allow to share the AVClasses itself (which is possible now
that AVClass.child_class_next is gone).

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-10 20:20:08 +02:00
parent 142f41a060
commit 441b292592

View File

@ -278,14 +278,16 @@ int ff_append_outpad_free_name(AVFilterContext *f, AVFilterPad *p);
*/
int ff_request_frame(AVFilterLink *link);
#define AVFILTER_DEFINE_CLASS(fname) \
static const AVClass fname##_class = { \
.class_name = #fname, \
#define AVFILTER_DEFINE_CLASS_EXT(name, desc, options) \
static const AVClass name##_class = { \
.class_name = desc, \
.item_name = av_default_item_name, \
.option = fname##_options, \
.option = options, \
.version = LIBAVUTIL_VERSION_INT, \
.category = AV_CLASS_CATEGORY_FILTER, \
}
#define AVFILTER_DEFINE_CLASS(fname) \
AVFILTER_DEFINE_CLASS_EXT(fname, #fname, fname##_options)
/**
* Find the index of a link.