can contain the following constants:
@table @option
+@item FRAME_RATE
+frame rate, only defined for constant frame-rate video
+
@item PTS
the presentation timestamp in input
#include "video.h"
static const char *const var_names[] = {
+ "FRAME_RATE", ///< defined only for constant frame-rate video
"INTERLACED", ///< tell if the current frame is interlaced
"N", ///< frame number (starting at zero)
"NB_CONSUMED_SAMPLES", ///< number of samples consumed by the filter (only audio)
};
enum var_name {
+ VAR_FRAME_RATE,
VAR_INTERLACED,
VAR_N,
VAR_NB_CONSUMED_SAMPLES,
if (setpts->type == AVMEDIA_TYPE_AUDIO)
setpts->var_values[VAR_SAMPLE_RATE] = inlink->sample_rate;
- av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f SAMPLE_RATE:%f\n",
- setpts->var_values[VAR_TB], setpts->var_values[VAR_SAMPLE_RATE]);
+ setpts->var_values[VAR_FRAME_RATE] = inlink->frame_rate.num && inlink->frame_rate.den ?
+ av_q2d(inlink->frame_rate) : NAN;
+
+ av_log(inlink->src, AV_LOG_VERBOSE, "TB:%f FRAME_RATE:%f SAMPLE_RATE:%f\n",
+ setpts->var_values[VAR_TB],
+ setpts->var_values[VAR_FRAME_RATE],
+ setpts->var_values[VAR_SAMPLE_RATE]);
return 0;
}
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 16
-#define LIBAVFILTER_VERSION_MICRO 101
+#define LIBAVFILTER_VERSION_MICRO 102
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \