PipeWire
0.3.33
|
A port can be used to link two nodes. More...
Data Structures | |
struct | pw_impl_port_events |
Port events, use pw_impl_port_add_listener. More... | |
Enumerations | |
enum | pw_impl_port_state { PW_IMPL_PORT_STATE_ERROR = -1, PW_IMPL_PORT_STATE_INIT = 0, PW_IMPL_PORT_STATE_CONFIGURE = 1, PW_IMPL_PORT_STATE_READY = 2, PW_IMPL_PORT_STATE_PAUSED = 3 } |
Functions | |
struct pw_impl_port * | pw_context_create_port (struct pw_context *context, enum pw_direction direction, uint32_t port_id, const struct spa_port_info *info, size_t user_data_size) |
Create a new port. More... | |
enum pw_direction | pw_impl_port_get_direction (struct pw_impl_port *port) |
Get the port direction. More... | |
const struct pw_properties * | pw_impl_port_get_properties (struct pw_impl_port *port) |
Get the port properties. More... | |
int | pw_impl_port_update_properties (struct pw_impl_port *port, const struct spa_dict *dict) |
Update the port properties. More... | |
const struct pw_port_info * | pw_impl_port_get_info (struct pw_impl_port *port) |
Get the port info. More... | |
uint32_t | pw_impl_port_get_id (struct pw_impl_port *port) |
Get the port id. More... | |
struct pw_impl_node * | pw_impl_port_get_node (struct pw_impl_port *port) |
Get the port parent node or NULL when not yet set. More... | |
int | pw_impl_port_is_linked (struct pw_impl_port *port) |
check is a port has links, return 0 if not, 1 if it is linked More... | |
int | pw_impl_port_add (struct pw_impl_port *port, struct pw_impl_node *node) |
Add a port to a node. More... | |
void | pw_impl_port_add_listener (struct pw_impl_port *port, struct spa_hook *listener, const struct pw_impl_port_events *events, void *data) |
Add an event listener on the port. More... | |
A port can be used to link two nodes.
enum pw_impl_port_state |
struct pw_impl_port* pw_context_create_port | ( | struct pw_context * | context, |
enum pw_direction | direction, | ||
uint32_t | port_id, | ||
const struct spa_port_info * | info, | ||
size_t | user_data_size | ||
) |
Create a new port.
References impl::cache_params, spa_port_info::change_mask, pw_properties::dict, spa_port_info::flags, NAME, impl::param_list, spa_port_info::params, impl::pending_list, spa_port_info::props, pw_direction_as_string(), PW_DIRECTION_INPUT, PW_IMPL_PORT_STATE_INIT, PW_KEY_PORT_ID, PW_KEY_PORT_PHYSICAL, PW_KEY_PORT_TERMINAL, pw_log_debug, PW_PORT_CHANGE_MASK_PROPS, pw_properties_new(), pw_properties_new_dict(), pw_properties_set(), pw_properties_setf(), SPA_FLAG_IS_SET, spa_hook_list_init(), SPA_IO_BUFFERS_INIT, spa_list_init(), SPA_PORT_CHANGE_MASK_PROPS, SPA_PORT_FLAG_PHYSICAL, SPA_PORT_FLAG_TERMINAL, SPA_PTROFF, and impl::this.
int pw_impl_port_add | ( | struct pw_impl_port * | port, |
struct pw_impl_node * | node | ||
) |
Add a port to a node.
References port::direction, port::node, port::port_id, and PW_DIRECTION_INPUT.
void pw_impl_port_add_listener | ( | struct pw_impl_port * | port, |
struct spa_hook * | listener, | ||
const struct pw_impl_port_events * | events, | ||
void * | data | ||
) |
Add an event listener on the port.
References spa_hook_list_append().
enum pw_direction pw_impl_port_get_direction | ( | struct pw_impl_port * | port | ) |
Get the port direction.
uint32_t pw_impl_port_get_id | ( | struct pw_impl_port * | port | ) |
Get the port id.
References port::port_id.
const struct pw_port_info* pw_impl_port_get_info | ( | struct pw_impl_port * | port | ) |
Get the port info.
References port::info.
struct pw_impl_node* pw_impl_port_get_node | ( | struct pw_impl_port * | port | ) |
Get the port parent node or NULL when not yet set.
References port::node.
const struct pw_properties* pw_impl_port_get_properties | ( | struct pw_impl_port * | port | ) |
Get the port properties.
int pw_impl_port_is_linked | ( | struct pw_impl_port * | port | ) |
check is a port has links, return 0 if not, 1 if it is linked
References spa_list_is_empty.
int pw_impl_port_update_properties | ( | struct pw_impl_port * | port, |
const struct spa_dict * | dict | ||
) |
Update the port properties.