Struct AVFilterPad

Source
#[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

Source§

fn clone(&self) -> AVFilterPad

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AVFilterPad

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for AVFilterPad

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.