summaryrefslogtreecommitdiff
path: root/libavfilter/asrc_anullsrc.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/asrc_anullsrc.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/asrc_anullsrc.c')
-rw-r--r--libavfilter/asrc_anullsrc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c
index 682be7ed11..512a23879a 100644
--- a/libavfilter/asrc_anullsrc.c
+++ b/libavfilter/asrc_anullsrc.c
@@ -46,14 +46,15 @@ typedef struct {
} ANullContext;
#define OFFSET(x) offsetof(ANullContext, x)
+#define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
static const AVOption anullsrc_options[]= {
- { "channel_layout", "set channel_layout", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0 },
- { "cl", "set channel_layout", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0 },
- { "sample_rate", "set sample rate", OFFSET(sample_rate_str) , AV_OPT_TYPE_STRING, {.str = "44100"}, 0, 0 },
- { "r", "set sample rate", OFFSET(sample_rate_str) , AV_OPT_TYPE_STRING, {.str = "44100"}, 0, 0 },
- { "nb_samples", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX },
- { "n", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX },
+ { "channel_layout", "set channel_layout", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0, FLAGS },
+ { "cl", "set channel_layout", OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, {.str = "stereo"}, 0, 0, FLAGS },
+ { "sample_rate", "set sample rate", OFFSET(sample_rate_str) , AV_OPT_TYPE_STRING, {.str = "44100"}, 0, 0, FLAGS },
+ { "r", "set sample rate", OFFSET(sample_rate_str) , AV_OPT_TYPE_STRING, {.str = "44100"}, 0, 0, FLAGS },
+ { "nb_samples", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX, FLAGS },
+ { "n", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.dbl = 1024}, 0, INT_MAX, FLAGS },
{ NULL },
};
@@ -132,4 +133,5 @@ AVFilter avfilter_asrc_anullsrc = {
.config_props = config_props,
.request_frame = request_frame, },
{ .name = NULL}},
+ .priv_class = &anullsrc_class,
};