37#define OFFSET(x) offsetof(FreezeFramesContext, x)
38#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;
88 if (drop &&
s->replace_frame) {
100 frame->pts = dropped_pts;
115 if (replace &&
frame) {
124 if (!drop || (drop &&
s->replace_frame))
126 if (!
s->replace_frame)
159 .p.name =
"freezeframes",
161 .p.priv_class = &freezeframes_class,
const FFFilter ff_vf_freezeframes
static AVFormatContext * ctx
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
Main libavfilter public API header.
common internal and external API header
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
static int config_output(AVBitStreamFilterLink *outlink)
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define FF_FILTER_FORWARD_WANTED(outlink, inlink)
Forward the frame_wanted_out flag from an output link to an input link.
#define FF_FILTER_FORWARD_STATUS(inlink, outlink)
Acknowledge the status on an input link and forward it to an output link.
#define FFERROR_NOT_READY
Filters implementation helper functions and internal structures.
#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter)
Forward the status on an output link to all input links.
static FilterLink * ff_filter_link(AVFilterLink *link)
#define AVFILTER_DEFINE_CLASS(fname)
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Describe the class of an AVClass context structure.
A link between two filters.
int w
agreed upon image width
int h
agreed upon image height
AVFilterContext * src
source filter
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link.
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
A filter pad used for either input or output.
This structure describes decoded (raw) audio or video data.
Link properties exposed to filter code, but not external callers.
AVRational frame_rate
Frame rate of the stream on the link, or 1/0 if unknown or variable.
static const AVFilterPad freezeframes_inputs[]
static int activate(AVFilterContext *ctx)
static av_cold void uninit(AVFilterContext *ctx)
static const AVOption freezeframes_options[]
static const AVFilterPad freezeframes_outputs[]
static int config_output(AVFilterLink *outlink)