summaryrefslogtreecommitdiff
path: root/libavfilter/internal.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-10 20:20:08 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-13 16:08:29 +0200
commit441b292592075b771dff7ee46293157eeb804252 (patch)
treef76b1c4d080e05654c76dacf3b8cd8eac8f33371 /libavfilter/internal.h
parent142f41a0600317654d54ba2cdca9754a522c8819 (diff)
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>
Diffstat (limited to 'libavfilter/internal.h')
-rw-r--r--libavfilter/internal.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index 6ddf024d93..e7c154aff0 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -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.