41 "NB_CONSUMED_SAMPLES",
129 #define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
130 #define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
131 #define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb))
142 #define d2istr(v) double2int64str((char[BUF_SIZE]){0}, v)
147 int64_t in_pts = frame->
pts;
159 switch (inlink->
type) {
172 "N:%"PRId64
" PTS:%s T:%f POS:%s",
177 switch (inlink->
type) {
210 #if CONFIG_ASETPTS_FILTER
212 #define OFFSET(x) offsetof(SetPTSContext, x)
213 #define AFLAGS AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
214 static const AVOption aoptions[] = {
215 {
"expr",
"Expression determining the frame timestamp",
OFFSET(expr_str),
AV_OPT_TYPE_STRING, { .str =
"PTS" }, .flags = AFLAGS },
219 static const AVClass asetpts_class = {
226 static const AVFilterPad avfilter_af_asetpts_inputs[] = {
237 static const AVFilterPad avfilter_af_asetpts_outputs[] = {
251 .priv_class= &asetpts_class,
252 .
inputs = avfilter_af_asetpts_inputs,
253 .
outputs = avfilter_af_asetpts_outputs,
257 #if CONFIG_SETPTS_FILTER
259 #define OFFSET(x) offsetof(SetPTSContext, x)
260 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
266 static const AVClass setpts_class = {
273 static const AVFilterPad avfilter_vf_setpts_inputs[] = {
284 static const AVFilterPad avfilter_vf_setpts_outputs[] = {
299 .priv_class = &setpts_class,
301 .
inputs = avfilter_vf_setpts_inputs,
302 .
outputs = avfilter_vf_setpts_outputs,