[FFmpeg-cvslog] lavfi/asettb: switch to an AVOptions-based system.
Clément Bœsch
git at videolan.org
Thu Apr 11 11:58:56 CEST 2013
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Thu Apr 11 11:48:42 2013 +0200| [73c1a00e73fbfcf27ce6fb474e3080ac0b1b445b] | committer: Clément Bœsch
lavfi/asettb: switch to an AVOptions-based system.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=73c1a00e73fbfcf27ce6fb474e3080ac0b1b445b
---
doc/filters.texi | 2 +-
libavfilter/avfilter.c | 1 +
libavfilter/f_settb.c | 7 +++----
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index 2a5b9af..94518d1 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6873,7 +6873,7 @@ This filter accepts the following options:
@table @option
- at item expr
+ at item expr, tb
The expression which is evaluated into the output timebase.
@end table
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index c59d155..a6a426c 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -750,6 +750,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!strcmp(filter->filter->name, "rgbtestsrc") ||
!strcmp(filter->filter->name, "setpts" ) ||
!strcmp(filter->filter->name, "settb" ) ||
+ !strcmp(filter->filter->name, "asettb" ) ||
!strcmp(filter->filter->name, "showspectrum") ||
!strcmp(filter->filter->name, "silencedetect") ||
!strcmp(filter->filter->name, "sine" ) ||
diff --git a/libavfilter/f_settb.c b/libavfilter/f_settb.c
index df03274..b1eac71 100644
--- a/libavfilter/f_settb.c
+++ b/libavfilter/f_settb.c
@@ -60,7 +60,9 @@ typedef struct {
#define OFFSET(x) offsetof(SetTBContext, x)
#define DEFINE_OPTIONS(filt_name, filt_type) \
static const AVOption filt_name##_options[] = { \
- { "tb", "Expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
+ { "expr", "set expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
+ .flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \
+ { "tb", "set expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
.flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \
{ NULL } \
}
@@ -118,8 +120,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
return ff_filter_frame(outlink, frame);
}
-static const char *const shorthand[] = { "tb", NULL };
-
#if CONFIG_SETTB_FILTER
DEFINE_OPTIONS(settb, VIDEO);
@@ -188,6 +188,5 @@ AVFilter avfilter_af_asettb = {
.inputs = avfilter_af_asettb_inputs,
.outputs = avfilter_af_asettb_outputs,
.priv_class = &asettb_class,
- .shorthand = shorthand,
};
#endif
More information about the ffmpeg-cvslog
mailing list