FFmpeg
Loading...
Searching...
No Matches
AVFilterPad Struct Reference

A filter pad used for either input or output. More...

#include <filters.h>

Data Fields

const char * name
 Pad name.
 
enum AVMediaType type
 AVFilterPad type.
 
int flags
 A combination of AVFILTERPAD_FLAG_* flags.
 
union { 
 
   AVFrame *(*   video )(AVFilterLink *link, int w, int h
 
   AVFrame *(*   audio )(AVFilterLink *link, int
      nb_samples) 
 
get_buffer 
 Callback functions to get a video/audio buffers.
 
int(* filter_frame )(AVFilterLink *link, AVFrame *frame)
 Filtering callback.
 
int(* request_frame )(AVFilterLink *link)
 Frame request callback.
 
int(* config_props )(AVFilterLink *link)
 Link configuration callback.
 

Detailed Description

A filter pad used for either input or output.

Definition at line 40 of file filters.h.

Field Documentation

◆ name

const char* AVFilterPad::name

◆ type

◆ flags

int AVFilterPad::flags

A combination of AVFILTERPAD_FLAG_* flags.

Definition at line 69 of file filters.h.

Referenced by append_pad().

◆ video

AVFrame *(* AVFilterPad::video) (AVFilterLink *link, int w, int h)

Definition at line 81 of file filters.h.

Referenced by ff_get_video_buffer(), init(), and init().

◆ audio

AVFrame *(* AVFilterPad::audio) (AVFilterLink *link, int nb_samples)

Definition at line 82 of file filters.h.

Referenced by ff_get_audio_buffer(), init(), and init().

◆ [union]

union { ... } AVFilterPad::get_buffer

Callback functions to get a video/audio buffers.

If NULL, the filter system will use ff_default_get_video_buffer() for video and ff_default_get_audio_buffer() for audio.

The state of the union is determined by type.

Input pads only.

Referenced by ff_get_audio_buffer(), ff_get_video_buffer(), init(), and init().

◆ filter_frame

int(* AVFilterPad::filter_frame) (AVFilterLink *link, AVFrame *frame)

Filtering callback.

This is where a filter receives a frame with audio/video data and should do its processing.

Input pads only.

Returns
>= 0 on success, a negative AVERROR on error. This function must ensure that frame is properly unreferenced on error if it hasn't been passed on to another filter.

Definition at line 95 of file filters.h.

Referenced by init(), and init().

◆ request_frame

int(* AVFilterPad::request_frame) (AVFilterLink *link)

Frame request callback.

A call to this should result in some progress towards producing output over the given link. This should return zero on success, and another value on error.

Output pads only.

Definition at line 104 of file filters.h.

Referenced by request_frame_to_filter().

◆ config_props

int(* AVFilterPad::config_props) (AVFilterLink *link)

Link configuration callback.

For output pads, this should set the link properties such as width/height. This should NOT set the format property - that is negotiated between filters by the filter system using the query_formats() callback before this function is called.

For input pads, this should check the properties of the link, and update the filter's internal state as necessary.

For both input and output filters, this should return zero on success, and another value on error.

Definition at line 120 of file filters.h.

Referenced by decimate_init(), ff_filter_config_links(), fieldmatch_init(), init(), init(), init(), init(), init(), init(), movie_common_init(), parse_definition(), and program_opencl_init().


The documentation for this struct was generated from the following file: