From 42d621d131a45fb63571ca6029c2fc4f02811c10 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Mon, 13 Aug 2012 13:40:01 +0200 Subject: lavfi: add priv class to filter definitions and flags to filter internal options This allows the iteration callbacks to discover the internal class and options, and show them when required. --- libavfilter/vf_overlay.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libavfilter/vf_overlay.c') diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index eb600dbd66..6cb4322e4d 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -96,11 +96,12 @@ typedef struct { } OverlayContext; #define OFFSET(x) offsetof(OverlayContext, x) +#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM static const AVOption overlay_options[] = { - { "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX }, - { "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX }, - {"rgb", "force packed RGB in input and output", OFFSET(allow_packed_rgb), AV_OPT_TYPE_INT, {.dbl=0}, 0, 1 }, + { "x", "set the x expression", OFFSET(x_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS }, + { "y", "set the y expression", OFFSET(y_expr), AV_OPT_TYPE_STRING, {.str = "0"}, CHAR_MIN, CHAR_MAX, FLAGS }, + {"rgb", "force packed RGB in input and output", OFFSET(allow_packed_rgb), AV_OPT_TYPE_INT, {.dbl=0}, 0, 1, FLAGS }, {NULL}, }; @@ -637,4 +638,5 @@ AVFilter avfilter_vf_overlay = { .config_props = config_output, .request_frame = request_frame, }, { .name = NULL}}, + .priv_class = &overlay_class, }; -- cgit v1.2.3