FFmpeg
setpts.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010 Stefano Sabatini
3  * Copyright (c) 2008 Victor Paesa
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 /**
23  * @file
24  * video presentation timestamp (PTS) modification filter
25  */
26 
27 #include "config_components.h"
28 
29 #include <inttypes.h>
30 
31 #include "libavutil/eval.h"
32 #include "libavutil/internal.h"
33 #include "libavutil/mathematics.h"
34 #include "libavutil/opt.h"
35 #include "libavutil/time.h"
36 #include "audio.h"
37 #include "avfilter.h"
38 #include "filters.h"
39 #include "internal.h"
40 #include "video.h"
41 
42 static const char *const var_names[] = {
43  "FRAME_RATE", ///< defined only for constant frame-rate video
44  "INTERLACED", ///< tell if the current frame is interlaced
45  "N", ///< frame / sample number (starting at zero)
46  "NB_CONSUMED_SAMPLES", ///< number of samples consumed by the filter (only audio)
47  "NB_SAMPLES", ///< number of samples in the current frame (only audio)
48 #if FF_API_FRAME_PKT
49  "POS", ///< original position in the file of the frame
50 #endif
51  "PREV_INPTS", ///< previous input PTS
52  "PREV_INT", ///< previous input time in seconds
53  "PREV_OUTPTS", ///< previous output PTS
54  "PREV_OUTT", ///< previous output time in seconds
55  "PTS", ///< original pts in the file of the frame
56  "SAMPLE_RATE", ///< sample rate (only audio)
57  "STARTPTS", ///< PTS at start of movie
58  "STARTT", ///< time at start of movie
59  "T", ///< original time in the file of the frame
60  "TB", ///< timebase
61  "RTCTIME", ///< wallclock (RTC) time in micro seconds
62  "RTCSTART", ///< wallclock (RTC) time at the start of the movie in micro seconds
63  "S", // Number of samples in the current frame
64  "SR", // Audio sample rate
65  "FR", ///< defined only for constant frame-rate video
66  "T_CHANGE", ///< time of first frame after latest command was applied
67  NULL
68 };
69 
70 enum var_name {
76 #if FF_API_FRAME_PKT
77  VAR_POS,
78 #endif
96 };
97 
98 typedef struct SetPTSContext {
99  const AVClass *class;
100  char *expr_str;
104 } SetPTSContext;
105 
107 {
108  SetPTSContext *setpts = ctx->priv;
109  int ret;
110 
111  if ((ret = av_expr_parse(&setpts->expr, setpts->expr_str,
112  var_names, NULL, NULL, NULL, NULL, 0, ctx)) < 0) {
113  av_log(ctx, AV_LOG_ERROR, "Error while parsing expression '%s'\n", setpts->expr_str);
114  return ret;
115  }
116 
117  setpts->var_values[VAR_N] = 0.0;
118  setpts->var_values[VAR_S] = 0.0;
119  setpts->var_values[VAR_PREV_INPTS] = NAN;
120  setpts->var_values[VAR_PREV_INT] = NAN;
121  setpts->var_values[VAR_PREV_OUTPTS] = NAN;
122  setpts->var_values[VAR_PREV_OUTT] = NAN;
123  setpts->var_values[VAR_STARTPTS] = NAN;
124  setpts->var_values[VAR_STARTT] = NAN;
125  setpts->var_values[VAR_T_CHANGE] = NAN;
126  return 0;
127 }
128 
130 {
131  AVFilterContext *ctx = inlink->dst;
132  SetPTSContext *setpts = ctx->priv;
133 
134  setpts->type = inlink->type;
135  setpts->var_values[VAR_TB] = av_q2d(inlink->time_base);
136  setpts->var_values[VAR_RTCSTART] = av_gettime();
137 
138  setpts->var_values[VAR_SR] =
139  setpts->var_values[VAR_SAMPLE_RATE] =
140  setpts->type == AVMEDIA_TYPE_AUDIO ? inlink->sample_rate : NAN;
141 
142  setpts->var_values[VAR_FRAME_RATE] =
143  setpts->var_values[VAR_FR] = inlink->frame_rate.num &&
144  inlink->frame_rate.den ?
145  av_q2d(inlink->frame_rate) : NAN;
146 
147  av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f FRAME_RATE:%f SAMPLE_RATE:%f\n",
148  setpts->var_values[VAR_TB],
149  setpts->var_values[VAR_FRAME_RATE],
150  setpts->var_values[VAR_SAMPLE_RATE]);
151  return 0;
152 }
153 
154 #define BUF_SIZE 64
155 
156 static inline char *double2int64str(char *buf, double v)
157 {
158  if (isnan(v)) snprintf(buf, BUF_SIZE, "nan");
159  else snprintf(buf, BUF_SIZE, "%"PRId64, (int64_t)v);
160  return buf;
161 }
162 
163 static double eval_pts(SetPTSContext *setpts, AVFilterLink *inlink, AVFrame *frame, int64_t pts)
164 {
165  if (isnan(setpts->var_values[VAR_STARTPTS])) {
166  setpts->var_values[VAR_STARTPTS] = TS2D(pts);
167  setpts->var_values[VAR_STARTT ] = TS2T(pts, inlink->time_base);
168  }
169  if (isnan(setpts->var_values[VAR_T_CHANGE])) {
170  setpts->var_values[VAR_T_CHANGE] = TS2T(pts, inlink->time_base);
171  }
172  setpts->var_values[VAR_PTS ] = TS2D(pts);
173  setpts->var_values[VAR_T ] = TS2T(pts, inlink->time_base);
174 #if FF_API_FRAME_PKT
176  setpts->var_values[VAR_POS ] = !frame || frame->pkt_pos == -1 ? NAN : frame->pkt_pos;
178 #endif
179  setpts->var_values[VAR_RTCTIME ] = av_gettime();
180 
181  if (frame) {
182  if (inlink->type == AVMEDIA_TYPE_VIDEO) {
184  } else if (inlink->type == AVMEDIA_TYPE_AUDIO) {
185  setpts->var_values[VAR_S] = frame->nb_samples;
187  }
188  }
189 
190  return av_expr_eval(setpts->expr, setpts->var_values, NULL);
191 }
192 #define d2istr(v) double2int64str((char[BUF_SIZE]){0}, v)
193 
195 {
196  SetPTSContext *setpts = inlink->dst->priv;
197  int64_t in_pts = frame->pts;
198  double d;
199 
200  d = eval_pts(setpts, inlink, frame, frame->pts);
201  frame->pts = D2TS(d);
202 
203  av_log(inlink->dst, AV_LOG_TRACE,
204  "N:%"PRId64" PTS:%s T:%f",
205  (int64_t)setpts->var_values[VAR_N],
206  d2istr(setpts->var_values[VAR_PTS]),
207  setpts->var_values[VAR_T]);
208  switch (inlink->type) {
209  case AVMEDIA_TYPE_VIDEO:
210  av_log(inlink->dst, AV_LOG_TRACE, " INTERLACED:%"PRId64,
211  (int64_t)setpts->var_values[VAR_INTERLACED]);
212  break;
213  case AVMEDIA_TYPE_AUDIO:
214  av_log(inlink->dst, AV_LOG_TRACE, " NB_SAMPLES:%"PRId64" NB_CONSUMED_SAMPLES:%"PRId64,
215  (int64_t)setpts->var_values[VAR_NB_SAMPLES],
216  (int64_t)setpts->var_values[VAR_NB_CONSUMED_SAMPLES]);
217  break;
218  }
219  av_log(inlink->dst, AV_LOG_TRACE, " -> PTS:%s T:%f\n", d2istr(d), TS2T(d, inlink->time_base));
220 
221  if (inlink->type == AVMEDIA_TYPE_VIDEO) {
222  setpts->var_values[VAR_N] += 1.0;
223  } else {
224  setpts->var_values[VAR_N] += frame->nb_samples;
225  }
226 
227  setpts->var_values[VAR_PREV_INPTS ] = TS2D(in_pts);
228  setpts->var_values[VAR_PREV_INT ] = TS2T(in_pts, inlink->time_base);
229  setpts->var_values[VAR_PREV_OUTPTS] = TS2D(frame->pts);
230  setpts->var_values[VAR_PREV_OUTT] = TS2T(frame->pts, inlink->time_base);
231  if (setpts->type == AVMEDIA_TYPE_AUDIO) {
233  }
234  return ff_filter_frame(inlink->dst->outputs[0], frame);
235 }
236 
238 {
239  SetPTSContext *setpts = ctx->priv;
240  AVFilterLink *inlink = ctx->inputs[0];
241  AVFilterLink *outlink = ctx->outputs[0];
242  AVFrame *in;
243  int status;
244  int64_t pts;
245  int ret;
246 
248 
250  if (ret < 0)
251  return ret;
252  if (ret > 0)
253  return filter_frame(inlink, in);
254 
256  double d = eval_pts(setpts, inlink, NULL, pts);
257 
258  av_log(ctx, AV_LOG_TRACE, "N:EOF PTS:%s T:%f -> PTS:%s T:%f\n",
259  d2istr(setpts->var_values[VAR_PTS]),
260  setpts->var_values[VAR_T],
261  d2istr(d), TS2T(d, inlink->time_base));
262  ff_outlink_set_status(outlink, status, D2TS(d));
263  return 0;
264  }
265 
267 
268  return FFERROR_NOT_READY;
269 }
270 
272 {
273  SetPTSContext *setpts = ctx->priv;
274  av_expr_free(setpts->expr);
275  setpts->expr = NULL;
276 }
277 
278 static int process_command(AVFilterContext *ctx, const char *cmd, const char *arg,
279  char *res, int res_len, int flags)
280 {
281  SetPTSContext *setpts = ctx->priv;
282  AVExpr *new_expr;
283  int ret;
284 
285  ret = ff_filter_process_command(ctx, cmd, arg, res, res_len, flags);
286 
287  if (ret < 0)
288  return ret;
289 
290  if (!strcmp(cmd, "expr")) {
291  ret = av_expr_parse(&new_expr, arg, var_names, NULL, NULL, NULL, NULL, 0, ctx);
292  // Only free and replace previous expression if new one succeeds,
293  // otherwise defensively keep everything intact even if reporting an error.
294  if (ret < 0) {
295  av_log(ctx, AV_LOG_ERROR, "Error while parsing expression '%s'\n", arg);
296  } else {
297  av_expr_free(setpts->expr);
298  setpts->expr = new_expr;
299  setpts->var_values[VAR_T_CHANGE] = NAN;
300  }
301  } else {
302  ret = AVERROR(EINVAL);
303  }
304 
305  return ret;
306 }
307 
308 #define OFFSET(x) offsetof(SetPTSContext, x)
309 #define V AV_OPT_FLAG_VIDEO_PARAM
310 #define A AV_OPT_FLAG_AUDIO_PARAM
311 #define R AV_OPT_FLAG_RUNTIME_PARAM
312 #define F AV_OPT_FLAG_FILTERING_PARAM
313 
314 #if CONFIG_SETPTS_FILTER
315 static const AVOption setpts_options[] = {
316  { "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = V|F|R },
317  { NULL }
318 };
319 AVFILTER_DEFINE_CLASS(setpts);
320 
321 static const AVFilterPad avfilter_vf_setpts_inputs[] = {
322  {
323  .name = "default",
324  .type = AVMEDIA_TYPE_VIDEO,
325  .config_props = config_input,
326  },
327 };
328 
329 const AVFilter ff_vf_setpts = {
330  .name = "setpts",
331  .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."),
332  .init = init,
333  .activate = activate,
334  .uninit = uninit,
335  .process_command = process_command,
337 
338  .priv_size = sizeof(SetPTSContext),
339  .priv_class = &setpts_class,
340 
341  FILTER_INPUTS(avfilter_vf_setpts_inputs),
343 };
344 #endif /* CONFIG_SETPTS_FILTER */
345 
346 #if CONFIG_ASETPTS_FILTER
347 
348 static const AVOption asetpts_options[] = {
349  { "expr", "Expression determining the frame timestamp", OFFSET(expr_str), AV_OPT_TYPE_STRING, { .str = "PTS" }, .flags = A|F|R },
350  { NULL }
351 };
352 AVFILTER_DEFINE_CLASS(asetpts);
353 
354 static const AVFilterPad asetpts_inputs[] = {
355  {
356  .name = "default",
357  .type = AVMEDIA_TYPE_AUDIO,
358  .config_props = config_input,
359  },
360 };
361 
362 const AVFilter ff_af_asetpts = {
363  .name = "asetpts",
364  .description = NULL_IF_CONFIG_SMALL("Set PTS for the output audio frame."),
365  .init = init,
366  .activate = activate,
367  .uninit = uninit,
368  .process_command = process_command,
369  .priv_size = sizeof(SetPTSContext),
370  .priv_class = &asetpts_class,
372  FILTER_INPUTS(asetpts_inputs),
374 };
375 #endif /* CONFIG_ASETPTS_FILTER */
FF_ENABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:73
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
opt.h
BUF_SIZE
#define BUF_SIZE
Definition: setpts.c:154
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:978
SetPTSContext
Definition: setpts.c:98
FFERROR_NOT_READY
return FFERROR_NOT_READY
Definition: filter_design.txt:204
D2TS
#define D2TS(d)
Definition: internal.h:253
inlink
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
Definition: filter_design.txt:212
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:340
AVFrame::pts
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
Definition: frame.h:452
VAR_STARTT
@ VAR_STARTT
Definition: setpts.c:86
AVOption
AVOption.
Definition: opt.h:251
VAR_FRAME_RATE
@ VAR_FRAME_RATE
Definition: setpts.c:71
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:196
VAR_SAMPLE_RATE
@ VAR_SAMPLE_RATE
Definition: setpts.c:84
mathematics.h
AVFrame::flags
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
Definition: frame.h:649
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:170
VAR_N
@ VAR_N
Definition: setpts.c:73
video.h
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: setpts.c:194
FF_FILTER_FORWARD_STATUS_BACK
#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink)
Forward the status on an output link to an input link.
Definition: filters.h:199
av_expr_parse
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
Definition: eval.c:685
ff_inlink_consume_frame
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
Definition: avfilter.c:1383
VAR_PREV_INT
@ VAR_PREV_INT
Definition: setpts.c:80
VAR_RTCSTART
@ VAR_RTCSTART
Definition: setpts.c:90
SetPTSContext::var_values
double var_values[VAR_VARS_NB]
Definition: setpts.c:102
pts
static int64_t pts
Definition: transcode_aac.c:643
av_expr_free
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
Definition: eval.c:336
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:47
OFFSET
#define OFFSET(x)
Definition: setpts.c:308
TS2T
#define TS2T(ts, tb)
Definition: internal.h:255
AV_LOG_TRACE
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
Definition: log.h:206
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
av_cold
#define av_cold
Definition: attributes.h:90
ff_video_default_filterpad
const AVFilterPad ff_video_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_VIDEO.
Definition: video.c:36
init
static av_cold int init(AVFilterContext *ctx)
Definition: setpts.c:106
activate
static int activate(AVFilterContext *ctx)
Definition: setpts.c:237
VAR_SR
@ VAR_SR
Definition: setpts.c:92
ff_outlink_set_status
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
Definition: filters.h:189
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
av_q2d
static double av_q2d(AVRational a)
Convert an AVRational to a double.
Definition: rational.h:104
eval_pts
static double eval_pts(SetPTSContext *setpts, AVFilterLink *inlink, AVFrame *frame, int64_t pts)
Definition: setpts.c:163
filters.h
var_name
var_name
Definition: noise_bsf.c:46
VAR_PREV_INPTS
@ VAR_PREV_INPTS
Definition: setpts.c:79
ctx
AVFormatContext * ctx
Definition: movenc.c:48
av_expr_eval
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
Definition: eval.c:766
AVExpr
Definition: eval.c:157
NAN
#define NAN
Definition: mathematics.h:115
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:192
frame
static AVFrame * frame
Definition: demux_decode.c:54
arg
const char * arg
Definition: jacosubdec.c:67
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
TS2D
#define TS2D(ts)
Definition: internal.h:254
NULL
#define NULL
Definition: coverity.c:32
d2istr
#define d2istr(v)
Definition: setpts.c:192
isnan
#define isnan(x)
Definition: libm.h:340
VAR_RTCTIME
@ VAR_RTCTIME
Definition: setpts.c:89
VAR_PTS
@ VAR_PTS
Definition: setpts.c:83
VAR_POS
@ VAR_POS
Definition: noise_bsf.c:55
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:32
time.h
SetPTSContext::expr_str
char * expr_str
Definition: setpts.c:100
ff_inlink_acknowledge_status
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
Definition: avfilter.c:1337
R
#define R
Definition: setpts.c:311
eval.h
AVMediaType
AVMediaType
Definition: avutil.h:199
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
VAR_T_CHANGE
@ VAR_T_CHANGE
Definition: setpts.c:94
AVFrame::pkt_pos
attribute_deprecated int64_t pkt_pos
reordered pos from the last AVPacket that has been input into the decoder
Definition: frame.h:687
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:851
FF_FILTER_FORWARD_WANTED
FF_FILTER_FORWARD_WANTED(outlink, inlink)
VAR_NB_CONSUMED_SAMPLES
@ VAR_NB_CONSUMED_SAMPLES
Definition: setpts.c:74
internal.h
AVFILTER_DEFINE_CLASS
#define AVFILTER_DEFINE_CLASS(fname)
Definition: internal.h:319
ff_vf_setpts
const AVFilter ff_vf_setpts
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Definition: setpts.c:278
AVFrame::nb_samples
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:420
A
#define A
Definition: setpts.c:310
internal.h
F
#define F
Definition: setpts.c:312
VAR_TB
@ VAR_TB
Definition: setpts.c:88
VAR_FR
@ VAR_FR
Definition: setpts.c:93
double2int64str
static char * double2int64str(char *buf, double v)
Definition: setpts.c:156
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:53
VAR_PREV_OUTT
@ VAR_PREV_OUTT
Definition: setpts.c:82
AV_FRAME_FLAG_INTERLACED
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
Definition: frame.h:636
VAR_PREV_OUTPTS
@ VAR_PREV_OUTPTS
Definition: setpts.c:81
AVFilter
Filter definition.
Definition: avfilter.h:166
ret
ret
Definition: filter_design.txt:187
status
ov_status_e status
Definition: dnn_backend_openvino.c:119
SetPTSContext::expr
AVExpr * expr
Definition: setpts.c:101
avfilter.h
VAR_NB_SAMPLES
@ VAR_NB_SAMPLES
Definition: setpts.c:75
V
#define V
Definition: setpts.c:309
AVFILTER_FLAG_METADATA_ONLY
#define AVFILTER_FLAG_METADATA_ONLY
The filter is a "metadata" filter - it does not modify the frame data in any way.
Definition: avfilter.h:133
var_names
static const char *const var_names[]
Definition: setpts.c:42
AVFilterContext
An instance of a filter.
Definition: avfilter.h:397
VAR_STARTPTS
@ VAR_STARTPTS
Definition: setpts.c:85
av_gettime
int64_t av_gettime(void)
Get the current time in microseconds.
Definition: time.c:39
FF_DISABLE_DEPRECATION_WARNINGS
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:72
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
audio.h
VAR_S
@ VAR_S
Definition: setpts.c:91
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:193
VAR_VARS_NB
@ VAR_VARS_NB
Definition: setpts.c:95
d
d
Definition: ffmpeg_filter.c:368
config_input
static int config_input(AVFilterLink *inlink)
Definition: setpts.c:129
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:474
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229
ff_af_asetpts
const AVFilter ff_af_asetpts
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: setpts.c:271
snprintf
#define snprintf
Definition: snprintf.h:34
SetPTSContext::type
enum AVMediaType type
Definition: setpts.c:103
VAR_T
@ VAR_T
Definition: setpts.c:87
VAR_INTERLACED
@ VAR_INTERLACED
Definition: setpts.c:72