53 #define OFFSET(x) offsetof(FPSContext, x)
54 #define V AV_OPT_FLAG_VIDEO_PARAM
134 while (ret >= 0 && s->
frames_out == frames_out)
224 for (i = 0; i <
delta; i++) {
293 .
inputs = avfilter_vf_fps_inputs,
294 .
outputs = avfilter_vf_fps_outputs,
int frames_out
number of frames on output
AVFifoBuffer * fifo
store frames until we get two successive timestamps
int av_parse_video_rate(AVRational *rate, const char *arg)
Parse str and store the detected values in *rate.
static const AVFilterPad outputs[]
int h
agreed upon image height
void av_opt_set_defaults(void *s)
Set the values of all AVOption fields to their default values.
int ff_filter_frame(AVFilterLink *link, AVFilterBufferRef *frame)
Send a frame of data to the next filter.
int av_set_options_string(void *ctx, const char *opts, const char *key_val_sep, const char *pairs_sep)
Parse the key/value pairs list in opts.
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.
void avfilter_unref_buffer(AVFilterBufferRef *ref)
Remove a reference to a buffer.
#define AV_PERM_READ
can read from the buffer
const char * name
Pad name.
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 frames_in
number of frames on input
void avfilter_unref_bufferp(AVFilterBufferRef **ref)
Remove a reference to a buffer and set the pointer to NULL.
char * fps
a string describing target framerate
void av_fifo_free(AVFifoBuffer *f)
Free an AVFifoBuffer.
int64_t pts
presentation timestamp.
A filter pad used for either input or output.
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 av_cold void uninit(AVFilterContext *ctx)
#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
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
AVFilterBufferRef * avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
Add a new reference to a buffer.
struct AVRational AVRational
rational number numerator/denominator
AVFilterContext * src
source filter
A reference to an AVFilterBuffer.
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...
struct FPSContext FPSContext
int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size)
Resize an AVFifoBuffer.
a very simple circular buffer FIFO implementation
static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *buf)
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
static int write_to_fifo(AVFifoBuffer *fifo, AVFilterBufferRef *buf)
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 ...
void av_opt_free(void *obj)
Free all string and binary options in obj.
static av_cold int init(AVFilterContext *ctx, const char *args)
common internal and external API header
AVRational framerate
target framerate
static const AVOption options[]
static int config_props(AVFilterLink *link)
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
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)