#[repr(C)]pub struct AVFilterPad {
pub name: *const c_char,
pub type_: AVMediaType,
pub get_video_buffer: Option<unsafe extern "C" fn(link: *mut AVFilterLink, w: c_int, h: c_int) -> *mut AVFrame>,
pub get_audio_buffer: Option<unsafe extern "C" fn(link: *mut AVFilterLink, nb_samples: c_int) -> *mut AVFrame>,
pub filter_frame: Option<unsafe extern "C" fn(link: *mut AVFilterLink, frame: *mut AVFrame) -> c_int>,
pub poll_frame: Option<unsafe extern "C" fn(link: *mut AVFilterLink) -> c_int>,
pub request_frame: Option<unsafe extern "C" fn(link: *mut AVFilterLink) -> c_int>,
pub config_props: Option<unsafe extern "C" fn(link: *mut AVFilterLink) -> c_int>,
pub needs_fifo: c_int,
pub needs_writable: c_int,
}
Expand description
A filter pad used for either input or output.
Fields§
§name: *const c_char
Pad name. The name is unique among inputs and among outputs, but an input may have the same name as an output. This may be NULL if this pad has no need to ever be referenced by name.
type_: AVMediaType
AVFilterPad type.
get_video_buffer: Option<unsafe extern "C" fn(link: *mut AVFilterLink, w: c_int, h: c_int) -> *mut AVFrame>
Callback function to get a video buffer. If NULL, the filter system will use ff_default_get_video_buffer().
Input video pads only.
get_audio_buffer: Option<unsafe extern "C" fn(link: *mut AVFilterLink, nb_samples: c_int) -> *mut AVFrame>
Callback function to get an audio buffer. If NULL, the filter system will use ff_default_get_audio_buffer().
Input audio pads only.
filter_frame: Option<unsafe extern "C" fn(link: *mut AVFilterLink, frame: *mut AVFrame) -> c_int>
Filtering callback. This is where a filter receives a frame with audio/video data and should do its processing.
Input pads only.
@return >= 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.
poll_frame: Option<unsafe extern "C" fn(link: *mut AVFilterLink) -> c_int>
Frame poll callback. This returns the number of immediately available samples. It should return a positive value if the next request_frame() is guaranteed to return one frame (with no delay).
Defaults to just calling the source poll_frame() method.
Output pads only.
request_frame: Option<unsafe extern "C" fn(link: *mut AVFilterLink) -> c_int>
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.
config_props: Option<unsafe extern "C" fn(link: *mut AVFilterLink) -> c_int>
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.
needs_fifo: c_int
The filter expects a fifo to be inserted on its input link, typically because it has a delay.
input pads only.
needs_writable: c_int
The filter expects writable frames from its input link, duplicating data buffers if needed.
input pads only.
Trait Implementations§
Source§impl Clone for AVFilterPad
impl Clone for AVFilterPad
Source§fn clone(&self) -> AVFilterPad
fn clone(&self) -> AVFilterPad
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more