summaryrefslogtreecommitdiff
path: root/libavfilter/vf_fade.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-08-13 13:40:01 +0200
committerStefano Sabatini <stefasab@gmail.com>2012-08-18 10:19:05 +0200
commit42d621d131a45fb63571ca6029c2fc4f02811c10 (patch)
tree8a8c32a05e78393c923405b089f2b68968a2f57d /libavfilter/vf_fade.c
parent831a999ddaf89ad3bb31bfcf4201463098444539 (diff)
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.
Diffstat (limited to 'libavfilter/vf_fade.c')
-rw-r--r--libavfilter/vf_fade.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 95d495a370..ebc8a7673a 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -60,15 +60,16 @@ typedef struct {
} FadeContext;
#define OFFSET(x) offsetof(FadeContext, x)
+#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
static const AVOption fade_options[] = {
- { "type", "set the fade direction", OFFSET(type), AV_OPT_TYPE_STRING, {.str = "in" }, CHAR_MIN, CHAR_MAX },
- { "t", "set the fade direction", OFFSET(type), AV_OPT_TYPE_STRING, {.str = "in" }, CHAR_MIN, CHAR_MAX },
- { "start_frame", "set expression of frame to start fading", OFFSET(start_frame), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX },
- { "s", "set expression of frame to start fading", OFFSET(start_frame), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX },
- { "nb_frames", "set expression for fade duration in frames", OFFSET(nb_frames), AV_OPT_TYPE_INT, {.dbl = 25 }, 0, INT_MAX },
- { "n", "set expression for fade duration in frames", OFFSET(nb_frames), AV_OPT_TYPE_INT, {.dbl = 25 }, 0, INT_MAX },
- { "alpha", "fade alpha if it is available on the input", OFFSET(alpha), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, 1 },
+ { "type", "set the fade direction", OFFSET(type), AV_OPT_TYPE_STRING, {.str = "in" }, CHAR_MIN, CHAR_MAX, FLAGS },
+ { "t", "set the fade direction", OFFSET(type), AV_OPT_TYPE_STRING, {.str = "in" }, CHAR_MIN, CHAR_MAX, FLAGS },
+ { "start_frame", "set expression of frame to start fading", OFFSET(start_frame), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, FLAGS },
+ { "s", "set expression of frame to start fading", OFFSET(start_frame), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, INT_MAX, FLAGS },
+ { "nb_frames", "set expression for fade duration in frames", OFFSET(nb_frames), AV_OPT_TYPE_INT, {.dbl = 25 }, 0, INT_MAX, FLAGS },
+ { "n", "set expression for fade duration in frames", OFFSET(nb_frames), AV_OPT_TYPE_INT, {.dbl = 25 }, 0, INT_MAX, FLAGS },
+ { "alpha", "fade alpha if it is available on the input", OFFSET(alpha), AV_OPT_TYPE_INT, {.dbl = 0 }, 0, 1, FLAGS },
{NULL},
};
@@ -295,4 +296,5 @@ AVFilter avfilter_vf_fade = {
.outputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO, },
{ .name = NULL}},
+ .priv_class = &fade_class,
};