21 #ifndef AVFILTER_FILTERS_H
22 #define AVFILTER_FILTERS_H
34 #define FFERROR_NOT_READY FFERRTAG('N','R','D','Y')
199 #define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink) do { \
200 int ret = ff_outlink_get_status(outlink); \
202 ff_inlink_set_status(inlink, ret); \
212 #define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter) do { \
213 int ret = ff_outlink_get_status(outlink); \
216 for (i = 0; i < filter->nb_inputs; i++) \
217 ff_inlink_set_status(filter->inputs[i], ret); \
226 #define FF_FILTER_FORWARD_STATUS(inlink, outlink) do { \
229 if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { \
230 ff_outlink_set_status(outlink, status, pts); \
239 #define FF_FILTER_FORWARD_STATUS_ALL(inlink, filter) do { \
242 if (ff_inlink_acknowledge_status(inlink, &status, &pts)) { \
244 for (i = 0; i < filter->nb_outputs; i++) \
245 ff_outlink_set_status(filter->outputs[i], status, pts); \
254 #define FF_FILTER_FORWARD_WANTED(outlink, inlink) do { \
255 if (ff_outlink_frame_wanted(outlink)) { \
256 ff_inlink_request_frame(inlink); \
int frame_wanted_out
True if a frame is currently wanted on the output of this filter.
This structure describes decoded (raw) audio or video data.
Main libavfilter public API header.
int ff_inlink_check_available_samples(AVFilterLink *link, unsigned min)
Test if enough samples are available on the link.
void ff_filter_set_ready(AVFilterContext *filter, unsigned priority)
Mark a filter ready and schedule it for activation.
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
static int ff_outlink_frame_wanted(AVFilterLink *link)
Test if a frame is wanted on an output link.
static void filter(int16_t *output, ptrdiff_t out_stride, int16_t *low, ptrdiff_t low_stride, int16_t *high, ptrdiff_t high_stride, int len, int clip)
AVFrame * ff_inlink_peek_frame(AVFilterLink *link, size_t idx)
Access a frame in the link fifo without consuming it.
A link between two filters.
int ff_inlink_queued_samples(AVFilterLink *link)
int ff_inlink_consume_frame(AVFilterLink *link, AVFrame **rframe)
Take a frame from the link's FIFO and update the link's stats.
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
int ff_outlink_get_status(AVFilterLink *link)
Get the status on an output link.
int ff_inlink_process_commands(AVFilterLink *link, const AVFrame *frame)
Process the commands queued in the link up to the time of the frame.
int ff_inlink_evaluate_timeline_at_frame(AVFilterLink *link, const AVFrame *frame)
Evaluate the timeline expression of the link for the time and properties of the frame.
int ff_inlink_make_frame_writable(AVFilterLink *link, AVFrame **rframe)
Make sure a frame is writable.
void ff_inlink_request_frame(AVFilterLink *link)
Mark that a frame is wanted on the link.
void ff_avfilter_link_set_in_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
int ff_inlink_check_available_frame(AVFilterLink *link)
Test if a frame is available on the link.
size_t ff_inlink_queued_frames(AVFilterLink *link)
Get the number of frames available on the link.
int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe)
Take samples from the link's FIFO and update the link's stats.
void ff_inlink_set_status(AVFilterLink *link, int status)
Set the status on an input link.