Go to the documentation of this file.
43 "NB_CONSUMED_SAMPLES",
144 #define D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d))
145 #define TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts))
146 #define TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)*av_q2d(tb))
157 #define d2istr(v) double2int64str((char[BUF_SIZE]){0}, v)
162 int64_t in_pts =
frame->pts;
185 "N:%"PRId64
" PTS:%s T:%f POS:%s",
226 #define OFFSET(x) offsetof(SetPTSContext, x)
227 #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
233 #if CONFIG_SETPTS_FILTER
234 #define setpts_options options
237 static const AVFilterPad avfilter_vf_setpts_inputs[] = {
247 static const AVFilterPad avfilter_vf_setpts_outputs[] = {
262 .priv_class = &setpts_class,
264 .
inputs = avfilter_vf_setpts_inputs,
265 .
outputs = avfilter_vf_setpts_outputs,
269 #if CONFIG_ASETPTS_FILTER
271 #define asetpts_options options
298 .priv_class = &asetpts_class,
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
This structure describes decoded (raw) audio or video data.
#define AV_LOG_VERBOSE
Detailed information.
const char * name
Filter name.
A link between two filters.
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
int av_expr_parse(AVExpr **expr, const char *s, const char *const *const_names, const char *const *func1_names, double(*const *funcs1)(void *, double), const char *const *func2_names, double(*const *funcs2)(void *, double, double), int log_offset, void *log_ctx)
Parse an expression.
double var_values[VAR_VARS_NB]
void av_expr_free(AVExpr *e)
Free a parsed expression previously created with av_expr_parse().
A filter pad used for either input or output.
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static av_cold int init(AVFilterContext *ctx)
static double av_q2d(AVRational a)
Convert an AVRational to a double.
static const AVFilterPad outputs[]
double av_expr_eval(AVExpr *e, const double *const_values, void *opaque)
Evaluate a previously parsed expression.
Describe the class of an AVClass context structure.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
@ VAR_NB_CONSUMED_SAMPLES
static const AVOption options[]
#define AVFILTER_DEFINE_CLASS(fname)
static char * double2int64str(char *buf, double v)
const char * name
Pad name.
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
static const char *const var_names[]
int64_t av_gettime(void)
Get the current time in microseconds.
static int config_input(AVFilterLink *inlink)
static av_cold void uninit(AVFilterContext *ctx)