Struct libspa_sys::spa_handle_factory
source · #[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
impl Clone for spa_handle_factory
source§fn clone(&self) -> spa_handle_factory
fn clone(&self) -> spa_handle_factory
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for spa_handle_factory
impl Debug for spa_handle_factory
source§impl PartialEq for spa_handle_factory
impl PartialEq for spa_handle_factory
source§fn eq(&self, other: &spa_handle_factory) -> bool
fn eq(&self, other: &spa_handle_factory) -> bool
self
and other
values to be equal, and is used
by ==
.