diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-08-13 15:40:01 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-08-18 12:19:05 +0400 |
commit | 42d621d131a45fb63571ca6029c2fc4f02811c10 (patch) | |
tree | 8a8c32a05e78393c923405b089f2b68968a2f57d /libavfilter/avf_showwaves.c | |
parent | 831a999ddaf89ad3bb31bfcf4201463098444539 (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/avf_showwaves.c')
-rw-r--r-- | libavfilter/avf_showwaves.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index e040d8ed2c..17679dda71 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -45,13 +45,14 @@ typedef struct { } ShowWavesContext; #define OFFSET(x) offsetof(ShowWavesContext, x) +#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM static const AVOption showwaves_options[] = { - { "rate", "set video rate", OFFSET(rate_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 }, - { "r", "set video rate", OFFSET(rate_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0 }, - { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "600x240"}, 0, 0 }, - { "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "600x240"}, 0, 0 }, - { "n", "set how many samples to show in the same point", OFFSET(n), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX}, + { "rate", "set video rate", OFFSET(rate_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS }, + { "r", "set video rate", OFFSET(rate_str), AV_OPT_TYPE_STRING, {.str = NULL}, 0, 0, FLAGS }, + { "size", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "600x240"}, 0, 0, FLAGS }, + { "s", "set video size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, {.str = "600x240"}, 0, 0, FLAGS }, + { "n", "set how many samples to show in the same point", OFFSET(n), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX, FLAGS }, { NULL }, }; @@ -252,4 +253,6 @@ AVFilter avfilter_avf_showwaves = { }, { .name = NULL } }, + + .priv_class = &showwaves_class, }; |