History

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).

Andreas Rheinhardt committed 5 years ago

Commit 441b2921 parent 142f41a1 file · +6 −4Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/internal.h+6−4
@@ -278,14 +278,16 @@ int ff_append_outpad_free_name(AVFilterContext *f, AVFilterPad *p); · 277 unmodified lines
278 */278 */
279int ff_request_frame(AVFilterLink *link);279int ff_request_frame(AVFilterLink *link);
280 280
281#define AVFILTER_DEFINE_CLASS(fname) \281#define AVFILTER_DEFINE_CLASS_EXT(name, desc, options) \
282 static const AVClass fname##_class = { \282 static const AVClass name##_class = { \
283 .class_name = #fname, \283 .class_name = desc, \
284 .item_name = av_default_item_name, \284 .item_name = av_default_item_name, \
285 .option = fname##_options, \285 .option = options, \
286 .version = LIBAVUTIL_VERSION_INT, \286 .version = LIBAVUTIL_VERSION_INT, \
287 .category = AV_CLASS_CATEGORY_FILTER, \287 .category = AV_CLASS_CATEGORY_FILTER, \
288 }288 }
289#define AVFILTER_DEFINE_CLASS(fname) \
290 AVFILTER_DEFINE_CLASS_EXT(fname, #fname, fname##_options)
289 291
290/**292/**
291 * Find the index of a link.293 * Find the index of a link.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t