#[repr(C)]
pub struct spa_handle_factory { pub version: u32, pub name: *const c_char, pub info: *const spa_dict, pub get_size: Option<unsafe extern "C" fn(factory: *const spa_handle_factory, params: *const spa_dict) -> usize>, pub init: Option<unsafe extern "C" fn(factory: *const spa_handle_factory, handle: *mut spa_handle, info: *const spa_dict, support: *const spa_support, n_support: u32) -> c_int>, pub enum_interface_info: Option<unsafe extern "C" fn(factory: *const spa_handle_factory, info: *mut *const spa_interface_info, index: *mut u32) -> c_int>, }

Fields§

§version: u32§name: *const c_char

The name of the factory contains a logical name that describes the function of the handle. Other plugins might contain an alternative implementation with the same name.

See utils/names.h for the list of standard names.

Examples include:

api.alsa.pcm.sink: an object to write PCM samples to an alsa PLAYBACK device api.v4l2.source: an object to read from a v4l2 source.

§info: *const spa_dict

Extra information about the handles of this factory.

§get_size: Option<unsafe extern "C" fn(factory: *const spa_handle_factory, params: *const spa_dict) -> usize>

Get the size of handles from this factory.

\param factory a spa_handle_factory \param params extra parameters that determine the size of the handle.

§init: Option<unsafe extern "C" fn(factory: *const spa_handle_factory, handle: *mut spa_handle, info: *const spa_dict, support: *const spa_support, n_support: u32) -> c_int>

Initialize an instance of this factory. The caller should allocate memory at least size bytes and pass this as \a handle.

\a support can optionally contain extra interfaces or data items that the plugin can use such as a logger.

\param factory a spa_handle_factory \param handle a pointer to memory \param info extra handle specific information, usually obtained from a spa_device. This can be used to configure the handle. \param support support items \param n_support number of elements in \a support \return 0 on success < 0 errno type error

§enum_interface_info: Option<unsafe extern "C" fn(factory: *const spa_handle_factory, info: *mut *const spa_interface_info, index: *mut u32) -> c_int>

spa_handle_factory::enum_interface_info: \param factory: a #spa_handle_factory \param info: result to hold spa_interface_info. \param index: index to keep track of the enumeration, 0 for first item

Enumerate the interface information for \a factory.

\return 1 when an item is available 0 when no more items are available < 0 errno type error

Trait Implementations§

source§

impl Clone for spa_handle_factory

source§

fn clone(&self) -> spa_handle_factory

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 spa_handle_factory

source§

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

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

impl PartialEq for spa_handle_factory

source§

fn eq(&self, other: &spa_handle_factory) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for spa_handle_factory

source§

impl Eq for spa_handle_factory

source§

impl StructuralPartialEq for spa_handle_factory

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> 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,

§

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>,

§

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>,

§

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.