60 #define OFFSET(x) offsetof(SetTBContext, x)
61 #define DEFINE_OPTIONS(filt_name, filt_type) \
62 static const AVOption filt_name##_options[] = { \
63 { "expr", "set expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
64 .flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \
65 { "tb", "set expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
66 .flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \
83 outlink->
w = inlink->
w;
84 outlink->
h = inlink->
h;
87 NULL, NULL, NULL, NULL, NULL, 0, NULL)) < 0) {
91 time_base =
av_d2q(res, INT_MAX);
92 if (time_base.
num <= 0 || time_base.
den <= 0) {
94 "Invalid non-positive values for the timebase num:%d or den:%d.\n",
95 time_base.
num, time_base.
den);
113 int64_t orig_pts = frame->
pts;
116 inlink ->time_base.num, inlink ->
time_base.
den, orig_pts,
123 #if CONFIG_SETTB_FILTER
128 static const AVFilterPad avfilter_vf_settb_inputs[] = {
138 static const AVFilterPad avfilter_vf_settb_outputs[] = {
152 .priv_class = &settb_class,
154 .
inputs = avfilter_vf_settb_inputs,
155 .
outputs = avfilter_vf_settb_outputs,
159 #if CONFIG_ASETTB_FILTER
164 static const AVFilterPad avfilter_af_asettb_inputs[] = {
174 static const AVFilterPad avfilter_af_asettb_outputs[] = {
188 .
inputs = avfilter_af_asettb_inputs,
189 .
outputs = avfilter_af_asettb_outputs,
190 .priv_class = &asettb_class,