#[repr(C)]
pub struct pw_client_node_events {
Show 13 fields pub version: u32, pub transport: Option<unsafe extern "C" fn(data: *mut c_void, readfd: c_int, writefd: c_int, mem_id: u32, offset: u32, size: u32) -> c_int>, pub set_param: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, flags: u32, param: *const spa_pod) -> c_int>, pub set_io: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, mem_id: u32, offset: u32, size: u32) -> c_int>, pub event: Option<unsafe extern "C" fn(data: *mut c_void, event: *const spa_event) -> c_int>, pub command: Option<unsafe extern "C" fn(data: *mut c_void, command: *const spa_command) -> c_int>, pub add_port: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, props: *const spa_dict) -> c_int>, pub remove_port: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32) -> c_int>, pub port_set_param: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, id: u32, flags: u32, param: *const spa_pod) -> c_int>, pub port_use_buffers: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, mix_id: u32, flags: u32, n_buffers: u32, buffers: *mut pw_client_node_buffer) -> c_int>, pub port_set_io: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, mix_id: u32, id: u32, mem_id: u32, offset: u32, size: u32) -> c_int>, pub set_activation: Option<unsafe extern "C" fn(data: *mut c_void, node_id: u32, signalfd: c_int, mem_id: u32, offset: u32, size: u32) -> c_int>, pub port_set_mix_info: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, mix_id: u32, peer_id: u32, props: *const spa_dict) -> c_int>,
}
Expand description

\ref pw_client_node events

Fields§

§version: u32§transport: Option<unsafe extern "C" fn(data: *mut c_void, readfd: c_int, writefd: c_int, mem_id: u32, offset: u32, size: u32) -> c_int>

Notify of a new transport area

The transport area is used to signal the client and the server.

\param readfd fd for signal data can be read \param writefd fd for signal data can be written \param mem_id id for activation memory \param offset offset of activation memory \param size size of activation memory

§set_param: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, flags: u32, param: *const spa_pod) -> c_int>

Notify of a property change

When the server configures the properties on the node this event is sent

\param id the id of the parameter \param flags parameter flags \param param the param to set

§set_io: Option<unsafe extern "C" fn(data: *mut c_void, id: u32, mem_id: u32, offset: u32, size: u32) -> c_int>

Configure an IO area for the client

IO areas are identified with an id and are used to exchange state between client and server

\param id the id of the io area \param mem_id the id of the memory to use \param offset offset of io area in memory \param size size of the io area

§event: Option<unsafe extern "C" fn(data: *mut c_void, event: *const spa_event) -> c_int>

Receive an event from the client node \param event the received event

§command: Option<unsafe extern "C" fn(data: *mut c_void, command: *const spa_command) -> c_int>

Notify of a new node command

\param command the command

§add_port: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, props: *const spa_dict) -> c_int>

A new port was added to the node

The server can at any time add a port to the node when there are free ports available.

\param direction the direction of the port \param port_id the new port id \param props extra properties

§remove_port: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32) -> c_int>

A port was removed from the node

\param direction a port direction \param port_id the remove port id

§port_set_param: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, id: u32, flags: u32, param: *const spa_pod) -> c_int>

A parameter was configured on the port

\param direction a port direction \param port_id the port id \param id the id of the parameter \param flags flags used when setting the param \param param the new param

§port_use_buffers: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, mix_id: u32, flags: u32, n_buffers: u32, buffers: *mut pw_client_node_buffer) -> c_int>

Notify the port of buffers

\param direction a port direction \param port_id the port id \param mix_id the mixer port id \param n_buffer the number of buffers \param buffers and array of buffer descriptions

§port_set_io: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, mix_id: u32, id: u32, mem_id: u32, offset: u32, size: u32) -> c_int>

Configure the io area with \a id of \a port_id.

\param direction the direction of the port \param port_id the port id \param mix_id the mixer port id \param id the id of the io area to set \param mem_id the id of the memory to use \param offset offset of io area in memory \param size size of the io area

§set_activation: Option<unsafe extern "C" fn(data: *mut c_void, node_id: u32, signalfd: c_int, mem_id: u32, offset: u32, size: u32) -> c_int>

Notify the activation record of the next node to trigger

\param node_id the peer node id \param signalfd the fd to wake up the peer \param mem_id the mem id of the memory \param the offset in \a mem_id to map \param the size of \a mem_id to map

§port_set_mix_info: Option<unsafe extern "C" fn(data: *mut c_void, direction: spa_direction, port_id: u32, mix_id: u32, peer_id: u32, props: *const spa_dict) -> c_int>

Notify about the peer of mix_id

\param direction the direction of the port \param port_id the port id \param mix_id the mix id \param peer_id the id of the peer port \param props extra properties

Since version 4:1

Trait Implementations§

source§

impl Clone for pw_client_node_events

source§

fn clone(&self) -> pw_client_node_events

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 pw_client_node_events

source§

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

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

impl Copy for pw_client_node_events

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.