FFmpeg
|
#include "avfilter.h"
Go to the source code of this file.
Data Structures | |
struct | AVFilterPad |
A filter pad used for either input or output. More... | |
struct | FilterLink |
Link properties exposed to filter code, but not external callers. More... | |
Macros | |
#define | FFERROR_NOT_READY FFERRTAG('N','R','D','Y') |
Filters implementation helper functions. More... | |
#define | AVFILTERPAD_FLAG_NEEDS_WRITABLE (1 << 0) |
The filter expects writable frames from its input link, duplicating data buffers if needed. More... | |
#define | AVFILTERPAD_FLAG_FREE_NAME (1 << 1) |
The pad's name is allocated and should be freed generically. More... | |
#define | FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0) |
The filter is aware of hardware frames, and any hardware frame context should not be automatically propagated through it. More... | |
#define | FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads)) |
Find the index of a link. More... | |
#define | FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads)) |
#define | FILTER_QUERY_FUNC(func) |
#define | FILTER_QUERY_FUNC2(func) |
#define | FILTER_PIXFMTS_ARRAY(array) |
#define | FILTER_SAMPLEFMTS_ARRAY(array) |
#define | FILTER_PIXFMTS(...) FILTER_PIXFMTS_ARRAY(((const enum AVPixelFormat []) { __VA_ARGS__, AV_PIX_FMT_NONE })) |
#define | FILTER_SAMPLEFMTS(...) FILTER_SAMPLEFMTS_ARRAY(((const enum AVSampleFormat[]) { __VA_ARGS__, AV_SAMPLE_FMT_NONE })) |
#define | FILTER_SINGLE_PIXFMT(pix_fmt_) |
#define | FILTER_SINGLE_SAMPLEFMT(sample_fmt_) |
#define | FILTER_INOUTPADS(inout, array) |
#define | FILTER_INPUTS(array) FILTER_INOUTPADS(inputs, (array)) |
#define | FILTER_OUTPUTS(array) FILTER_INOUTPADS(outputs, (array)) |
#define | AVFILTER_DEFINE_CLASS_EXT(name, desc, options) |
#define | AVFILTER_DEFINE_CLASS(fname) AVFILTER_DEFINE_CLASS_EXT(fname, #fname, fname##_options) |
#define | D2TS(d) (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) |
#define | TS2D(ts) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) |
#define | TS2T(ts, tb) ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) |
#define | FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink) |
Forward the status on an output link to an input link. More... | |
#define | FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter) |
Forward the status on an output link to all input links. More... | |
#define | FF_FILTER_FORWARD_STATUS(inlink, outlink) |
Acknowledge the status on an input link and forward it to an output link. More... | |
#define | FF_FILTER_FORWARD_STATUS_ALL(inlink, filter) |
Acknowledge the status on an input link and forward it to an output link. More... | |
#define | FF_FILTER_FORWARD_WANTED(outlink, inlink) |
Forward the frame_wanted_out flag from an output link to an input link. More... | |
Functions | |
static FilterLink * | ff_filter_link (AVFilterLink *link) |
void | ff_filter_set_ready (AVFilterContext *filter, unsigned priority) |
Mark a filter ready and schedule it for activation. More... | |
size_t | ff_inlink_queued_frames (AVFilterLink *link) |
Get the number of frames available on the link. More... | |
int | ff_inlink_check_available_frame (AVFilterLink *link) |
Test if a frame is available on the link. More... | |
int | ff_inlink_queued_samples (AVFilterLink *link) |
int | ff_inlink_check_available_samples (AVFilterLink *link, unsigned min) |
Test if enough samples are available on the link. More... | |
int | ff_inlink_consume_frame (AVFilterLink *link, AVFrame **rframe) |
Take a frame from the link's FIFO and update the link's stats. More... | |
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. More... | |
AVFrame * | ff_inlink_peek_frame (AVFilterLink *link, size_t idx) |
Access a frame in the link fifo without consuming it. More... | |
int | ff_inlink_make_frame_writable (AVFilterLink *link, AVFrame **rframe) |
Make sure a frame is writable. More... | |
int | ff_inlink_acknowledge_status (AVFilterLink *link, int *rstatus, int64_t *rpts) |
Test and acknowledge the change of status on the link. More... | |
void | ff_inlink_request_frame (AVFilterLink *link) |
Mark that a frame is wanted on the link. More... | |
void | ff_inlink_set_status (AVFilterLink *link, int status) |
Set the status on an input link. More... | |
int | ff_outlink_frame_wanted (AVFilterLink *link) |
Test if a frame is wanted on an output link. More... | |
int | ff_outlink_get_status (AVFilterLink *link) |
Get the status on an output link. More... | |
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. More... | |
static void | ff_outlink_set_status (AVFilterLink *link, int status, int64_t pts) |
Set the status field of a link from the source filter. More... | |
int | ff_inoutlink_check_flow (AVFilterLink *inlink, AVFilterLink *outlink) |
Check for flow control between input and output. More... | |
int | ff_filter_init_hw_frames (AVFilterContext *avctx, AVFilterLink *link, int default_pool_size) |
Perform any additional setup required for hardware frames. More... | |
int | ff_filter_process_command (AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags) |
Generic processing of user supplied commands that are set in the same way as the filter options. More... | |
int | ff_filter_get_nb_threads (AVFilterContext *ctx) av_pure |
Get number of threads for current filter instance. More... | |
int | ff_filter_frame (AVFilterLink *link, AVFrame *frame) |
Send a frame of data to the next filter. More... | |
int | ff_request_frame (AVFilterLink *link) |
Request an input frame from the filter at the other end of the link. More... | |
int | ff_append_inpad (AVFilterContext *f, AVFilterPad *p) |
Append a new input/output pad to the filter's list of such pads. More... | |
int | ff_append_outpad (AVFilterContext *f, AVFilterPad *p) |
int | ff_append_inpad_free_name (AVFilterContext *f, AVFilterPad *p) |
int | ff_append_outpad_free_name (AVFilterContext *f, AVFilterPad *p) |
int | ff_fmt_is_in (int fmt, const int *fmts) |
Tell if an integer is contained in the provided -1-terminated list of integers. More... | |
int | ff_filter_execute (AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs) |
Filters implementation helper functions.
Special return code when activate() did not do anything.
#define AVFILTERPAD_FLAG_NEEDS_WRITABLE (1 << 0) |
#define AVFILTERPAD_FLAG_FREE_NAME (1 << 1) |
#define FF_FILTER_FLAG_HWFRAME_AWARE (1 << 0) |
#define FILTER_QUERY_FUNC | ( | func | ) |
#define FILTER_QUERY_FUNC2 | ( | func | ) |
#define FILTER_PIXFMTS_ARRAY | ( | array | ) |
#define FILTER_SAMPLEFMTS_ARRAY | ( | array | ) |
#define FILTER_PIXFMTS | ( | ... | ) | FILTER_PIXFMTS_ARRAY(((const enum AVPixelFormat []) { __VA_ARGS__, AV_PIX_FMT_NONE })) |
#define FILTER_SAMPLEFMTS | ( | ... | ) | FILTER_SAMPLEFMTS_ARRAY(((const enum AVSampleFormat[]) { __VA_ARGS__, AV_SAMPLE_FMT_NONE })) |
#define FILTER_SINGLE_PIXFMT | ( | pix_fmt_ | ) |
#define FILTER_SINGLE_SAMPLEFMT | ( | sample_fmt_ | ) |
#define FILTER_INOUTPADS | ( | inout, | |
array | |||
) |
#define FILTER_INPUTS | ( | array | ) | FILTER_INOUTPADS(inputs, (array)) |
#define FILTER_OUTPUTS | ( | array | ) | FILTER_INOUTPADS(outputs, (array)) |
#define AVFILTER_DEFINE_CLASS | ( | fname | ) | AVFILTER_DEFINE_CLASS_EXT(fname, #fname, fname##_options) |
#define D2TS | ( | d | ) | (isnan(d) ? AV_NOPTS_VALUE : (int64_t)(d)) |
#define TS2D | ( | ts | ) | ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts)) |
#define TS2T | ( | ts, | |
tb | |||
) | ((ts) == AV_NOPTS_VALUE ? NAN : (double)(ts) * av_q2d(tb)) |
#define FF_FILTER_FORWARD_STATUS_BACK | ( | outlink, | |
inlink | |||
) |
Forward the status on an output link to an input link.
If the status is set, it will discard all queued frames and this macro will return immediately.
#define FF_FILTER_FORWARD_STATUS_BACK_ALL | ( | outlink, | |
filter | |||
) |
Forward the status on an output link to all input links.
If the status is set, it will discard all queued frames and this macro will return immediately.
#define FF_FILTER_FORWARD_STATUS | ( | inlink, | |
outlink | |||
) |
#define FF_FILTER_FORWARD_WANTED | ( | outlink, | |
inlink | |||
) |
Forward the frame_wanted_out flag from an output link to an input link.
If the flag is set, this macro will return immediately.
enum FilterFormatsState |
|
inlinestatic |
Definition at line 197 of file filters.h.
Referenced by activate(), analyze_frame(), av_buffersink_get_frame_flags(), av_buffersink_get_frame_rate(), av_buffersink_get_hw_frames_ctx(), av_buffersink_set_frame_size(), blockdetect_filter_frame(), blurdetect_filter_frame(), bwdif_vulkan_config_input(), bwdif_vulkan_config_output(), calc_persp_luts(), config_comm_output(), config_input(), config_input_audio(), config_input_ref(), config_out_props(), config_output(), config_output_props(), config_output_video(), config_props(), config_props_output(), config_props_ref(), config_video(), config_video_output(), cuda_bilateral_config_props(), cudachromakey_config_props(), cudacolorspace_config_props(), cudascale_config_props(), cudaupload_config_output(), current_segment_finished(), ddagrab_config_props(), deint_vaapi_config_output(), deshake_opencl_init(), do_blend(), do_eval(), do_scale(), draw_items(), draw_text(), dump_s12m_timecode(), evaluate_timeline_at_frame(), ff_filter_config_links(), ff_filter_graph_remove_filter(), ff_filter_init_hw_frames(), ff_opencl_filter_config_input(), ff_opencl_filter_config_output(), ff_vaapi_vpp_config_input(), ff_vaapi_vpp_config_output(), ff_vk_filter_config_input(), ff_vk_filter_config_output(), ff_yadif_config_output_common(), fill_frameinfo_by_link(), filter_frame(), filter_frame_framed(), filter_frame_ref(), filter_slice(), fsync_config_props(), geq_filter_frame(), get_mfx_version(), have_alpha_planar(), hwdownload_config_input(), hwmap_config_output(), hwmap_get_buffer(), hwupload_config_output(), init_processing_chain(), init_vpp_session(), libplacebo_activate(), libplacebo_config_output(), lut2_config_output(), movie_config_output_props(), nppscale_filter_frame(), nppscale_filter_frame_ref(), nppscale_scale(), nppsharpen_config(), nppsharpen_filter_frame(), nppsharpen_sharpen(), npptranspose_config_props(), npptranspose_filter_frame(), oscilloscope_filter_frame(), output_frame(), output_single_frame(), overlay_cuda_blend(), overlay_cuda_config_output(), plot_freq(), process_frame(), qrencodesrc_config_props(), query_frame(), request_frame(), scale_frame(), scale_vt_config_output(), select_frame(), source_config_props(), testsrc_vulkan_config_props(), transpose_opencl_config_output(), transpose_vaapi_vpp_config_output(), transpose_vt_config_output(), transpose_vt_recreate_hw_ctx(), try_push_frame(), update_context(), update_crops(), update_pts(), weave_slice(), and xfade_opencl_config_output().
void ff_filter_set_ready | ( | AVFilterContext * | filter, |
unsigned | priority | ||
) |
Mark a filter ready and schedule it for activation.
This is automatically done when something happens to the filter (queued frame, status change, request on output). Filters implementing the activate callback can call it directly to perform one more round of processing later. It is also useful for filters reacting to external or asynchronous events.
Definition at line 239 of file avfilter.c.
Referenced by activate(), ff_avfilter_link_set_in_status(), ff_filter_frame(), ff_inlink_request_frame(), ff_request_frame(), filter_frame(), filter_frame_to_filter(), forward_status_change(), link_set_out_status(), process_frame(), request_frame(), spatial_activate(), xfade_activate(), and xfade_opencl_activate().
size_t ff_inlink_queued_frames | ( | AVFilterLink * | link | ) |
Get the number of frames available on the link.
Definition at line 1454 of file avfilter.c.
Referenced by activate(), create_frame(), filter_frame(), filter_have_queued(), and xfade_opencl_activate().
int ff_inlink_check_available_frame | ( | AVFilterLink * | link | ) |
Test if a frame is available on the link.
Definition at line 1460 of file avfilter.c.
Referenced by activate(), ff_inlink_consume_frame(), ff_inoutlink_check_flow(), and xfade_activate().
int ff_inlink_queued_samples | ( | AVFilterLink * | link | ) |
Definition at line 1466 of file avfilter.c.
Referenced by activate(), check_ir(), convert_coeffs(), filter_frame(), plot_spectrum_column(), and try_push_frame().
int ff_inlink_check_available_samples | ( | AVFilterLink * | link, |
unsigned | min | ||
) |
Test if enough samples are available on the link.
Definition at line 1472 of file avfilter.c.
Referenced by activate(), check_ir(), and ff_inlink_consume_samples().
int ff_inlink_consume_frame | ( | AVFilterLink * | link, |
AVFrame ** | rframe | ||
) |
Take a frame from the link's FIFO and update the link's stats.
If ff_inlink_check_available_frame() was previously called, the preferred way of expressing it is "av_assert1(ret);" immediately after ff_inlink_consume_frame(). Negative error codes must still be checked.
Definition at line 1491 of file avfilter.c.
Referenced by activate(), consume_from_fifos(), dnn_classify_activate(), dnn_detect_activate(), filter_frame(), filter_frame_to_filter(), forward_frame(), get_frame_internal(), handle_input(), read_frame(), spatial_activate(), xfade_activate(), and xfade_opencl_activate().
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.
If ff_inlink_check_available_samples() was previously called, the preferred way of expressing it is "av_assert1(ret);" immediately after ff_inlink_consume_samples(). Negative error codes must still be checked.
Definition at line 1511 of file avfilter.c.
Referenced by activate(), convert_coeffs(), ff_inlink_consume_frame(), filter_frame_to_filter(), get_frame_internal(), and try_push_frame().
AVFrame* ff_inlink_peek_frame | ( | AVFilterLink * | link, |
size_t | idx | ||
) |
Access a frame in the link fifo without consuming it.
The first frame is numbered 0; the designated frame must exist.
Definition at line 1532 of file avfilter.c.
Referenced by activate(), xfade_activate(), and xfade_opencl_activate().
int ff_inlink_make_frame_writable | ( | AVFilterLink * | link, |
AVFrame ** | rframe | ||
) |
Make sure a frame is writable.
This is similar to av_frame_make_writable() except it uses the link's buffer allocation callback, and therefore allows direct rendering.
Definition at line 1538 of file avfilter.c.
Referenced by activate(), apply_palette(), ff_framesync_dualinput_get_writable(), filter_frame(), filter_frame_framed(), overlay_cuda_blend(), and plot_spectrum_column().
int ff_inlink_acknowledge_status | ( | AVFilterLink * | link, |
int * | rstatus, | ||
int64_t * | rpts | ||
) |
Test and acknowledge the change of status on the link.
Status means EOF or an error condition; a change from the normal (0) status to a non-zero status can be queued in a filter's input link, it becomes relevant after the frames queued in the link's FIFO are processed. This function tests if frames are still queued and if a queued status change has not yet been processed. In that case it performs basic treatment (updating the link's timestamp) and returns a positive value to let the filter do its own treatments (flushing...).
Filters implementing the activate callback should call this function when they think it might succeed (usually after checking unsuccessfully for a queued frame). Filters implementing the filter_frame and request_frame callbacks do not need to call that since the same treatment happens in ff_filter_frame().
[out] | rstatus | new or current status |
[out] | rpts | current timestamp of the link in link time base |
Definition at line 1438 of file avfilter.c.
Referenced by activate(), consume_from_fifos(), dnn_classify_activate(), dnn_detect_activate(), forward_frame(), generate_output(), get_frame_internal(), handle_input(), request_frame(), xfade_activate(), and xfade_opencl_activate().
void ff_inlink_request_frame | ( | AVFilterLink * | link | ) |
Mark that a frame is wanted on the link.
Unlike ff_filter_frame(), it must not be called when the link has a non-zero status, and thus does not acknowledge it. Also it cannot fail.
Definition at line 1594 of file avfilter.c.
Referenced by activate(), check_ir(), consume_from_fifos(), filter_frame(), forward_frame(), get_frame_internal(), if(), libplacebo_activate(), request_samples(), spatial_activate(), xfade_activate(), and xfade_opencl_activate().
void ff_inlink_set_status | ( | AVFilterLink * | link, |
int | status | ||
) |
Set the status on an input link.
Also discard all frames in the link's FIFO.
Definition at line 1603 of file avfilter.c.
Referenced by activate(), filter_activate_default(), if(), and xfade_activate().
int ff_outlink_frame_wanted | ( | AVFilterLink * | link | ) |
Test if a frame is wanted on an output link.
Definition at line 1661 of file avfilter.c.
Referenced by ff_inoutlink_check_flow().
int ff_outlink_get_status | ( | AVFilterLink * | link | ) |
Get the status on an output link.
Definition at line 1619 of file avfilter.c.
Referenced by activate(), create_frame(), draw_items(), filter_frame(), filter_have_eof(), and xfade_opencl_activate().
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.
The pts should reflect the timestamp of the status change, in link time base and relative to the frames timeline. In particular, for AVERROR_EOF, it should reflect the end time of the last frame.
Definition at line 260 of file avfilter.c.
Referenced by av_buffersrc_close(), ff_outlink_set_status(), and request_frame_to_filter().
|
inlinestatic |
Set the status field of a link from the source filter.
The pts should reflect the timestamp of the status change, in link time base and relative to the frames timeline. In particular, for AVERROR_EOF, it should reflect the end time of the last frame.
Definition at line 424 of file filters.h.
Referenced by activate(), dnn_classify_activate(), dnn_detect_activate(), forward_frame(), framesync_eof(), fsync_config_props(), generate_output(), libplacebo_activate(), output_frame(), request_frame(), testsrc_vulkan_activate(), try_push_frame(), xfade_activate(), and xfade_opencl_activate().
int ff_inoutlink_check_flow | ( | AVFilterLink * | inlink, |
AVFilterLink * | outlink | ||
) |
Check for flow control between input and output.
This is necessary for filters that may produce several output frames for a single input event, otherwise they may produce them all at once, causing excessive memory consumption.
Definition at line 1625 of file avfilter.c.
Referenced by activate().
int ff_filter_init_hw_frames | ( | AVFilterContext * | avctx, |
AVFilterLink * | link, | ||
int | default_pool_size | ||
) |
Perform any additional setup required for hardware frames.
link->hw_frames_ctx must be set before calling this function. Inside link->hw_frames_ctx, the fields format, sw_format, width and height must be set. If dynamically allocated pools are not supported, then initial_pool_size must also be set, to the minimum hardware frame pool size necessary for the filter to work (taking into account any frames which need to stored for use in operations as appropriate). If default_pool_size is nonzero, then it will be used as the pool size if no other modification takes place (this can be used to preserve compatibility).
Definition at line 1639 of file avfilter.c.
Referenced by config_output(), ff_vaapi_vpp_config_output(), scale_vt_config_output(), and transpose_vt_recreate_hw_ctx().
int ff_filter_process_command | ( | AVFilterContext * | ctx, |
const char * | cmd, | ||
const char * | arg, | ||
char * | res, | ||
int | res_len, | ||
int | flags | ||
) |
Generic processing of user supplied commands that are set in the same way as the filter options.
NOTE: 'enable' option is handled separately, and not by this function.
Definition at line 901 of file avfilter.c.
Referenced by command(), libplacebo_process_command(), oscilloscope_process_command(), pixscope_process_command(), and process_command().
int ff_filter_get_nb_threads | ( | AVFilterContext * | ctx | ) |
Get number of threads for current filter instance.
This number is always same or less than graph->nb_threads.
Definition at line 841 of file avfilter.c.
Referenced by activate(), analyze_frame(), blend_frame(), blend_frames(), blur_frame(), config_input(), config_input_ref(), config_output(), config_props(), convert_frame(), do_blend(), do_convolve(), do_morpho(), draw_sierpinski(), filter(), filter_frame(), fir_frame(), gaussianiir2d(), geq_filter_frame(), init(), nlmeans_plane(), open_stream(), output_frame(), param_init(), prepare_impulse(), prepare_secondary(), process_frame(), scroll(), and xfade_frame().
int ff_filter_frame | ( | AVFilterLink * | link, |
AVFrame * | frame | ||
) |
Send a frame of data to the next filter.
link | the output link over which the data is being sent |
frame | a reference to the buffer of data being sent. The receiving filter will free this reference when it no longer needs it or pass it on to the next filter. |
Definition at line 1062 of file avfilter.c.
Referenced by activate(), addroi_filter_frame(), apply_filter(), audio_frame(), av_buffersrc_add_frame_flags(), avgblur_opencl_filter_frame(), avgblur_vulkan_filter_frame(), blend_frame(), blend_frame_for_dualinput(), blockdetect_filter_frame(), blur_frame(), blurdetect_filter_frame(), channelmap_filter_frame(), chromaber_vulkan_filter_frame(), compand_delay(), compand_drain(), compand_nodelay(), convolution_opencl_filter_frame(), create_frame(), cuda_bilateral_filter_frame(), cudachromakey_filter_frame(), cudacolorspace_filter_frame(), cudascale_filter_frame(), cudaupload_filter_frame(), ddagrab_request_frame(), decode_packet(), default_filter_frame(), deint_vaapi_filter_frame(), dnn_classify_activate(), dnn_classify_flush_frame(), dnn_detect_activate(), dnn_detect_flush_frame(), do_alphamerge(), do_blend(), do_convolve(), do_corr(), do_identity(), do_morpho(), do_psnr(), do_scale(), do_ssim(), do_ssim360(), do_vmaf(), do_xpsnr(), draw_spatial(), drawbox_vaapi_filter_frame(), end_last_frame(), extract_plane(), ff_qsvvpp_init(), ff_yadif_filter_frame(), filter(), filter_callback(), filter_frame(), filter_frame_ref(), fir_frame(), flip_bayer(), flush_frame(), forward_frame(), gblur_vulkan_filter_frame(), generate_output(), geq_filter_frame(), get_frame(), headphone_frame(), hwdownload_filter_frame(), hwmap_filter_frame(), hwupload_filter_frame(), iccdetect_filter_frame(), iccgen_filter_frame(), load_apply_palette(), misc_vaapi_filter_frame(), neighbor_opencl_filter_frame(), nlmeans_opencl_filter_frame(), nppscale_filter_frame(), nppscale_filter_frame_ref(), nppsharpen_filter_frame(), npptranspose_filter_frame(), oscilloscope_filter_frame(), output_frame(), output_single_frame(), overlay_cuda_blend(), overlay_opencl_blend(), overlay_vaapi_blend(), overlay_vulkan_blend(), pad_vaapi_filter_frame(), pixscope_filter_frame(), plot_freqs(), plot_spectrum_column(), pp_filter_frame(), procamp_vaapi_filter_frame(), process_frame(), program_opencl_run(), push_frame(), push_samples(), remap_opencl_process_frame(), request_frame(), return_frame(), scale_vaapi_filter_frame(), scale_vt_filter_frame(), scale_vulkan_filter_frame(), send_silence(), shuffleplanes_filter_frame(), sierpinski_request_frame(), source_request_frame(), testsrc_vulkan_activate(), tonemap_opencl_filter_frame(), tonemap_vaapi_filter_frame(), transpose_opencl_filter_frame(), transpose_vaapi_filter_frame(), transpose_vt_filter_frame(), try_push_frame(), unsharp_opencl_filter_frame(), varblur_frame(), video_frame(), write_frame(), xfade_activate(), xfade_frame(), and xfade_opencl_activate().
int ff_request_frame | ( | AVFilterLink * | link | ) |
Request an input frame from the filter at the other end of the link.
This function must not be used by filters using the activate callback, use ff_link_set_frame_wanted() instead.
The input filter may pass the request on to its inputs, fulfill the request from an internal buffer or any other means specific to its function.
When the end of a stream is reached AVERROR_EOF is returned and no further frames are returned after that.
When a filter is unable to output a frame for example due to its sources being unable to do so or because it depends on external means pushing data into it then AVERROR(EAGAIN) is returned. It is important that a AVERROR(EAGAIN) return is returned all the way to the caller (generally eventually a user application) as this step may (but does not have to be) necessary to provide the input with the next frame.
If a request is successful then some progress has been made towards providing a frame on the link (through ff_filter_frame()). A filter that needs several frames to produce one is allowed to return success if one more frame has been processed but no output has been produced yet. A filter is also allowed to simply forward a success return value.
link | the input link |
Definition at line 475 of file avfilter.c.
Referenced by avfilter_graph_request_oldest(), deint_vaapi_request_frame(), ff_yadif_request_frame(), request_frame(), request_frame_ref(), and request_frame_to_filter().
int ff_append_inpad | ( | AVFilterContext * | f, |
AVFilterPad * | p | ||
) |
Append a new input/output pad to the filter's list of such pads.
The *_free_name versions will set the AVFILTERPAD_FLAG_FREE_NAME flag ensuring that the name will be freed generically (even on insertion error).
Definition at line 127 of file avfilter.c.
Referenced by decimate_init(), ff_append_inpad_free_name(), fieldmatch_init(), and init().
int ff_append_outpad | ( | AVFilterContext * | f, |
AVFilterPad * | p | ||
) |
Definition at line 138 of file avfilter.c.
Referenced by ff_append_outpad_free_name(), and init().
int ff_append_inpad_free_name | ( | AVFilterContext * | f, |
AVFilterPad * | p | ||
) |
Definition at line 132 of file avfilter.c.
Referenced by init(), join_init(), libplacebo_init(), parse_definition(), program_opencl_init(), and stack_init().
int ff_append_outpad_free_name | ( | AVFilterContext * | f, |
AVFilterPad * | p | ||
) |
Definition at line 143 of file avfilter.c.
Referenced by init(), movie_common_init(), parse_definition(), and split_init().
int ff_fmt_is_in | ( | int | fmt, |
const int * | fmts | ||
) |
Tell if an integer is contained in the provided -1-terminated list of integers.
This is useful for determining (for instance) if an AVPixelFormat is in an array of supported formats.
fmt | provided format |
fmts | -1-terminated list of formats |
Definition at line 406 of file formats.c.
Referenced by config_input(), config_input_main(), config_input_overlay(), config_out_props(), config_props(), filter_frame(), and init().
int ff_filter_execute | ( | AVFilterContext * | ctx, |
avfilter_action_func * | func, | ||
void * | arg, | ||
int * | ret, | ||
int | nb_jobs | ||
) |
Definition at line 1667 of file avfilter.c.
Referenced by activate(), analyze_frame(), apply_unsharp(), blend_frame(), blend_frames(), blur_frame(), chromatic_adaptation(), compute_vif2(), config_output(), convert_frame(), do_blend(), do_convolve(), do_corr(), do_identity(), do_morpho(), do_psnr(), do_ssim(), draw_sierpinski(), filter(), filter_frame(), filter_grey_edge(), fir_frame(), gaussianiir2d(), geq_filter_frame(), get_deriv(), get_frame(), headphone_frame(), nlmeans_plane(), output_frame(), plot_spectrum_column(), prepare_impulse(), prepare_secondary(), process_frame(), scroll(), spatial_activate(), and xfade_frame().