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/af_amix.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/af_amix.c')
-rw-r--r-- | libavfilter/af_amix.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 9e14bcf6e8..6c7357f141 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -174,17 +174,18 @@ typedef struct MixContext { #define OFFSET(x) offsetof(MixContext, x) #define A AV_OPT_FLAG_AUDIO_PARAM +#define F AV_OPT_FLAG_FILTERING_PARAM static const AVOption amix_options[] = { { "inputs", "Number of inputs.", - OFFSET(nb_inputs), AV_OPT_TYPE_INT, { 2 }, 1, 32, A }, + OFFSET(nb_inputs), AV_OPT_TYPE_INT, { 2 }, 1, 32, A|F }, { "duration", "How to determine the end-of-stream.", - OFFSET(duration_mode), AV_OPT_TYPE_INT, { DURATION_LONGEST }, 0, 2, A, "duration" }, - { "longest", "Duration of longest input.", 0, AV_OPT_TYPE_CONST, { DURATION_LONGEST }, INT_MIN, INT_MAX, A, "duration" }, - { "shortest", "Duration of shortest input.", 0, AV_OPT_TYPE_CONST, { DURATION_SHORTEST }, INT_MIN, INT_MAX, A, "duration" }, - { "first", "Duration of first input.", 0, AV_OPT_TYPE_CONST, { DURATION_FIRST }, INT_MIN, INT_MAX, A, "duration" }, + OFFSET(duration_mode), AV_OPT_TYPE_INT, { DURATION_LONGEST }, 0, 2, A|F, "duration" }, + { "longest", "Duration of longest input.", 0, AV_OPT_TYPE_CONST, { DURATION_LONGEST }, INT_MIN, INT_MAX, A|F, "duration" }, + { "shortest", "Duration of shortest input.", 0, AV_OPT_TYPE_CONST, { DURATION_SHORTEST }, INT_MIN, INT_MAX, A|F, "duration" }, + { "first", "Duration of first input.", 0, AV_OPT_TYPE_CONST, { DURATION_FIRST }, INT_MIN, INT_MAX, A|F, "duration" }, { "dropout_transition", "Transition time, in seconds, for volume " "renormalization when an input stream ends.", - OFFSET(dropout_transition), AV_OPT_TYPE_FLOAT, { 2.0 }, 0, INT_MAX, A }, + OFFSET(dropout_transition), AV_OPT_TYPE_FLOAT, { 2.0 }, 0, INT_MAX, A|F }, { NULL }, }; @@ -554,4 +555,5 @@ AVFilter avfilter_af_amix = { .config_props = config_output, .request_frame = request_frame }, { .name = NULL}}, + .priv_class = &amix_class, }; |