constants:
@table @option
constants:
@table @option
+@item FRAME_RATE
+frame rate, only defined for constant frame-rate video
+
@item PTS
the presentation timestamp in input
@item PTS
the presentation timestamp in input
static const char *const var_names[] = {
"E", ///< Euler number
static const char *const var_names[] = {
"E", ///< Euler number
+ "FRAME_RATE", ///< defined only for constant frame-rate video
"INTERLACED", ///< tell if the current frame is interlaced
"N", ///< frame / sample number (starting at zero)
"PHI", ///< golden ratio
"INTERLACED", ///< tell if the current frame is interlaced
"N", ///< frame / sample number (starting at zero)
"PHI", ///< golden ratio
VAR_INTERLACED,
VAR_N,
VAR_PHI,
VAR_INTERLACED,
VAR_N,
VAR_PHI,
setpts->var_values[VAR_SR] = inlink->sample_rate;
}
setpts->var_values[VAR_SR] = inlink->sample_rate;
}
+ setpts->var_values[VAR_FRAME_RATE] = inlink->frame_rate.num &&
+ inlink->frame_rate.den ?
+ av_q2d(inlink->frame_rate) : NAN;
+
+ // Indicate the output can be variable framerate.
+ inlink->frame_rate = (AVRational){1, 0};
+
av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f\n", setpts->var_values[VAR_TB]);
return 0;
}
av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f\n", setpts->var_values[VAR_TB]);
return 0;
}