* commit 'ffea3b00c39caa8ad78456ae08c8353929974dfd': vf_settb: switch to an AVOptions-based system. Conflicts: doc/filters.texi libavfilter/f_settb.c
Unified · Split
| @@ -6915,9 +6915,14 @@ ffmpeg -nostats -i input.mp3 -filter_complex ebur128 -f null - · 6914 unmodified lines | ||
| 6915 | 6915 | Set the timebase to use for the output frames timestamps. |
| 6916 | 6916 | It is mainly useful for testing timebase configuration. |
| 6917 | 6917 | |
| 6918 | −This filter accepts a single option @option{tb}, which can be | |
| 6919 | −specified either by setting @option{tb}=@var{VALUE} or setting the | |
| 6920 | −value alone. | |
| 6918 | +This filter accepts the following options: | |
| 6919 | + | |
| 6920 | +@table @option | |
| 6921 | + | |
| 6922 | +@item expr | |
| 6923 | +The expression which is evaluated into the output timebase. | |
| 6924 | + | |
| 6925 | +@end table | |
| 6921 | 6926 | |
| 6922 | 6927 | The value for @option{tb} is an arithmetic expression representing a |
| 6923 | 6928 | rational. The expression can contain the constants "AVTB" (the default |
| @@ -6930,13 +6935,13 @@ audio only). Default value is "intb". · 6 unmodified lines | ||
| 6930 | 6935 | @item |
| 6931 | 6936 | Set the timebase to 1/25: |
| 6932 | 6937 | @example |
| 6933 | −settb=1/25 | |
| 6938 | +settb=expr=1/25 | |
| 6934 | 6939 | @end example |
| 6935 | 6940 | |
| 6936 | 6941 | @item |
| 6937 | 6942 | Set the timebase to 1/10: |
| 6938 | 6943 | @example |
| 6939 | −settb=0.1 | |
| 6944 | +settb=expr=0.1 | |
| 6940 | 6945 | @end example |
| 6941 | 6946 | |
| 6942 | 6947 | @item |
| @@ -691,6 +691,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque · 690 unmodified lines | ||
| 691 | 691 | !strcmp(filter->filter->name, "aperms") || |
| 692 | 692 | !strcmp(filter->filter->name, "resample") || |
| 693 | 693 | !strcmp(filter->filter->name, "setpts" ) || |
| 694 | + !strcmp(filter->filter->name, "settb" ) || | |
| 694 | 695 | !strcmp(filter->filter->name, "showspectrum") || |
| 695 | 696 | !strcmp(filter->filter->name, "silencedetect") || |
| 696 | 697 | !strcmp(filter->filter->name, "smartblur") || |
| @@ -60,7 +60,7 @@ typedef struct { · 59 unmodified lines | ||
| 60 | 60 | #define OFFSET(x) offsetof(SetTBContext, x) |
| 61 | 61 | #define DEFINE_OPTIONS(filt_name, filt_type) \ |
| 62 | 62 | static const AVOption filt_name##_options[] = { \ |
| 63 | − { "tb", "set timebase expression", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \ | |
| 63 | + { "tb", "Expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \ | |
| 64 | 64 | .flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \ |
| 65 | 65 | { NULL } \ |
| 66 | 66 | } |
| @@ -149,11 +149,10 @@ AVFilter avfilter_vf_settb = { · 82 unmodified lines | ||
| 149 | 149 | .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."), |
| 150 | 150 | |
| 151 | 151 | .priv_size = sizeof(SetTBContext), |
| 152 | + .priv_class = &settb_class, | |
| 152 | 153 | |
| 153 | 154 | .inputs = avfilter_vf_settb_inputs, |
| 154 | 155 | .outputs = avfilter_vf_settb_outputs, |
| 155 | − .priv_class = &settb_class, | |
| 156 | − .shorthand = shorthand, | |
| 157 | 156 | }; |
| 158 | 157 | #endif |
| 159 | 158 | |