39 #define OFFSET(x) offsetof(FreezeFramesContext, x) 40 #define FLAGS (AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_VIDEO_PARAM) 57 if (sourcelink->
w != replacelink->
w || sourcelink->
h != replacelink->
h) {
59 "Input frame sizes do not match (%dx%d vs %dx%d).\n",
60 sourcelink->
w, sourcelink->
h,
61 replacelink->
w, replacelink->
h);
65 outlink->
w = sourcelink->
w;
66 outlink->
h = sourcelink->
h;
92 int64_t dropped_pts = frame->
pts;
98 frame->
pts = dropped_pts;
113 if (replace && frame) {
159 .
name =
"freezeframes",
162 .priv_class = &freezeframes_class,
163 .
inputs = freezeframes_inputs,
164 .
outputs = freezeframes_outputs,
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
This structure describes decoded (raw) audio or video data.
#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter)
Forward the status on an output link to all input links.
Main libavfilter public API header.
int h
agreed upon image height
#define FFERROR_NOT_READY
Filters implementation helper functions.
AVFilter ff_vf_freezeframes
const char * name
Pad name.
static const AVFilterPad freezeframes_outputs[]
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.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
A filter pad used for either input or output.
A link between two filters.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable; if left to 0/0, will be automatically copied from the first input of the source filter if it exists.
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
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link...
simple assert() macros that are a bit more flexible than ISO C assert().
static int config_output(AVFilterLink *outlink)
static av_cold void uninit(AVFilterContext *ctx)
int w
agreed upon image width
common internal API header
#define FF_FILTER_FORWARD_WANTED(outlink, inlink)
Forward the frame_wanted_out flag from an output link to an input link.
static const AVFilterPad freezeframes_inputs[]
AVFilterContext * src
source filter
AVFILTER_DEFINE_CLASS(freezeframes)
static const AVFilterPad inputs[]
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
static const AVFilterPad outputs[]
static const AVOption freezeframes_options[]
Describe the class of an AVClass context structure.
const char * name
Filter name.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
AVFilterLink ** outputs
array of pointers to output links
#define FF_FILTER_FORWARD_STATUS(inlink, outlink)
Acknowledge the status on an input link and forward it to an output link.
common internal and external API header
static int activate(AVFilterContext *ctx)