Browse Source

abuffer: switch to an AVOptions-based shorthand system.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
c378ba19b5
2 changed files with 1 additions and 6 deletions
  1. +0
    -1
      libavfilter/avfilter.c
  2. +1
    -5
      libavfilter/buffersrc.c

+ 0
- 1
libavfilter/avfilter.c View File

@@ -683,7 +683,6 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options,


// TODO: drop me // TODO: drop me
static const char *const filters_left_to_update[] = { static const char *const filters_left_to_update[] = {
"abuffer",
#if FF_API_ACONVERT_FILTER #if FF_API_ACONVERT_FILTER
"aconvert", "aconvert",
#endif #endif


+ 1
- 5
libavfilter/buffersrc.c View File

@@ -345,8 +345,8 @@ static const AVOption abuffer_options[] = {
{ "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, INT_MAX, A }, { "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, INT_MAX, A },
{ "sample_rate", NULL, OFFSET(sample_rate), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A }, { "sample_rate", NULL, OFFSET(sample_rate), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A },
{ "sample_fmt", NULL, OFFSET(sample_fmt_str), AV_OPT_TYPE_STRING, .flags = A }, { "sample_fmt", NULL, OFFSET(sample_fmt_str), AV_OPT_TYPE_STRING, .flags = A },
{ "channels", NULL, OFFSET(channels), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A },
{ "channel_layout", NULL, OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, .flags = A }, { "channel_layout", NULL, OFFSET(channel_layout_str), AV_OPT_TYPE_STRING, .flags = A },
{ "channels", NULL, OFFSET(channels), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, A },
{ NULL }, { NULL },
}; };


@@ -532,9 +532,6 @@ static const AVFilterPad avfilter_asrc_abuffer_outputs[] = {
{ NULL } { NULL }
}; };


static const char *const abuffer_shorthand[] = { "time_base", "sample_rate",
"sample_fmt", "channel_layout", NULL };

AVFilter avfilter_asrc_abuffer = { AVFilter avfilter_asrc_abuffer = {
.name = "abuffer", .name = "abuffer",
.description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."),
@@ -547,5 +544,4 @@ AVFilter avfilter_asrc_abuffer = {
.inputs = NULL, .inputs = NULL,
.outputs = avfilter_asrc_abuffer_outputs, .outputs = avfilter_asrc_abuffer_outputs,
.priv_class = &abuffer_class, .priv_class = &abuffer_class,
.shorthand = abuffer_shorthand,
}; };

Loading…
Cancel
Save