58 #define OFFSET(x) offsetof(FPSContext, x)
59 #define V AV_OPT_FLAG_VIDEO_PARAM
133 while (ret >= 0 && s->
frames_out == frames_out)
189 first_pts =
FFMIN(
FFMAX(first_pts, INT64_MIN), INT64_MAX);
233 for (i = 0; i <
delta; i++) {
301 .priv_class = &
class,
int frames_out
number of frames on output
AVFifoBuffer * fifo
store frames until we get two successive timestamps
This structure describes decoded (raw) audio or video data.
int av_parse_video_rate(AVRational *rate, const char *arg)
Parse str and store the detected values in *rate.
#define AV_LOG_WARNING
Something somehow does not look correct.
static const AVFilterPad outputs[]
Main libavfilter public API header.
int h
agreed upon image height
int drop
number of framed dropped
int64_t pts
pts of the first frame currently in the fifo
int64_t first_pts
pts of the first frame that arrived on this filter
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
Feed data from a user-supplied callback to an AVFifoBuffer.
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
AVFilterLink ** inputs
array of pointers to input links
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int frames_in
number of frames on input
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
char * fps
a string describing target framerate
#define AVERROR_EOF
End of file.
static av_cold int init(AVFilterContext *ctx)
#define AV_LOG_VERBOSE
Detailed information.
void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
A link between two filters.
int dup
number of frames duplicated
static int64_t start_time
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_cold void uninit(AVFilterContext *ctx)
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
static const AVFilterPad avfilter_vf_fps_inputs[]
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
void av_log(void *avcl, int level, const char *fmt,...)
static int request_frame(AVFilterLink *outlink)
static const AVFilterPad avfilter_vf_fps_outputs[]
int w
agreed upon image width
#define AV_TIME_BASE
Internal time base represented as integer.
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
AVFilterContext * src
source filter
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int av_fifo_space(AVFifoBuffer *f)
Return the amount of space in bytes in the AVFifoBuffer, that is the amount of data you can write int...
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size)
Resize an AVFifoBuffer.
a very simple circular buffer FIFO implementation
Describe the class of an AVClass context structure.
static const AVFilterPad inputs[]
rational number numerator/denominator
const char * name
Filter name.
AVFilterLink ** outputs
array of pointers to output links
int av_fifo_size(AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
common internal and external API header
AVRational framerate
target framerate
struct AVFilterPad AVFilterPad
static const AVOption options[]
static int config_props(AVFilterLink *link)
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
static int write_to_fifo(AVFifoBuffer *fifo, AVFrame *buf)
AVFilterContext * dst
dest filter
int ff_request_frame(AVFilterLink *link)
Request an input frame from the filter at the other end of the link.
static void flush_fifo(AVFifoBuffer *fifo)
double start_time
pts, in seconds, of the expected first frame
#define AV_NOPTS_VALUE
Undefined timestamp value.