Commit 6a2fb5b9 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'ffea3b00'

* commit 'ffea3b00':
  vf_settb: switch to an AVOptions-based system.

Conflicts:
	doc/filters.texi
	libavfilter/f_settb.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 8695d9de ffea3b00
...@@ -6915,9 +6915,14 @@ ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null - ...@@ -6915,9 +6915,14 @@ ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null -
Set the timebase to use for the output frames timestamps. Set the timebase to use for the output frames timestamps.
It is mainly useful for testing timebase configuration. It is mainly useful for testing timebase configuration.
This filter accepts a single option @option{tb}, which can be This filter accepts the following options:
specified either by setting @option{tb}=@var{VALUE} or setting the
value alone. @table @option
@item expr
The expression which is evaluated into the output timebase.
@end table
The value for @option{tb} is an arithmetic expression representing a The value for @option{tb} is an arithmetic expression representing a
rational. The expression can contain the constants "AVTB" (the default rational. The expression can contain the constants "AVTB" (the default
...@@ -6930,13 +6935,13 @@ audio only). Default value is "intb". ...@@ -6930,13 +6935,13 @@ audio only). Default value is "intb".
@item @item
Set the timebase to 1/25: Set the timebase to 1/25:
@example @example
settb=1/25 settb=expr=1/25
@end example @end example
@item @item
Set the timebase to 1/10: Set the timebase to 1/10:
@example @example
settb=0.1 settb=expr=0.1
@end example @end example
@item @item
......
...@@ -691,6 +691,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque ...@@ -691,6 +691,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
!strcmp(filter->filter->name, "aperms") || !strcmp(filter->filter->name, "aperms") ||
!strcmp(filter->filter->name, "resample") || !strcmp(filter->filter->name, "resample") ||
!strcmp(filter->filter->name, "setpts" ) || !strcmp(filter->filter->name, "setpts" ) ||
!strcmp(filter->filter->name, "settb" ) ||
!strcmp(filter->filter->name, "showspectrum") || !strcmp(filter->filter->name, "showspectrum") ||
!strcmp(filter->filter->name, "silencedetect") || !strcmp(filter->filter->name, "silencedetect") ||
!strcmp(filter->filter->name, "smartblur") || !strcmp(filter->filter->name, "smartblur") ||
......
...@@ -60,7 +60,7 @@ typedef struct { ...@@ -60,7 +60,7 @@ typedef struct {
#define OFFSET(x) offsetof(SetTBContext, x) #define OFFSET(x) offsetof(SetTBContext, x)
#define DEFINE_OPTIONS(filt_name, filt_type) \ #define DEFINE_OPTIONS(filt_name, filt_type) \
static const AVOption filt_name##_options[] = { \ static const AVOption filt_name##_options[] = { \
{ "tb", "set timebase expression", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \ { "tb", "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 }, \ .flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \
{ NULL } \ { NULL } \
} }
...@@ -149,11 +149,10 @@ AVFilter avfilter_vf_settb = { ...@@ -149,11 +149,10 @@ AVFilter avfilter_vf_settb = {
.description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."), .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."),
.priv_size = sizeof(SetTBContext), .priv_size = sizeof(SetTBContext),
.priv_class = &settb_class,
.inputs = avfilter_vf_settb_inputs, .inputs = avfilter_vf_settb_inputs,
.outputs = avfilter_vf_settb_outputs, .outputs = avfilter_vf_settb_outputs,
.priv_class = &settb_class,
.shorthand = shorthand,
}; };
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment