PipeWire
0.3.15
|
Data Structures | |
struct | result_node_params_data |
Macros | |
#define | NAME "node" |
#define | DEFAULT_SYNC_TIMEOUT ((uint64_t)(5 * SPA_NSEC_PER_SEC)) |
#define | SYNC_CHECK 0 |
#define | SYNC_START 1 |
#define | SYNC_STOP 2 |
Functions | |
SPA_EXPORT int | pw_impl_node_register (struct pw_impl_node *this, struct pw_properties *properties) |
Complete initialization of the node and register. More... | |
SPA_EXPORT int | pw_impl_node_initialized (struct pw_impl_node *this) |
SPA_EXPORT int | pw_impl_node_set_driver (struct pw_impl_node *node, struct pw_impl_node *driver) |
SPA_EXPORT struct pw_impl_node * | pw_context_create_node (struct pw_context *context, struct pw_properties *properties, size_t user_data_size) |
SPA_EXPORT const struct pw_node_info * | pw_impl_node_get_info (struct pw_impl_node *node) |
Get the node info. More... | |
SPA_EXPORT void * | pw_impl_node_get_user_data (struct pw_impl_node *node) |
Get node user_data. More... | |
SPA_EXPORT struct pw_context * | pw_impl_node_get_context (struct pw_impl_node *node) |
Get the context of this node. More... | |
SPA_EXPORT struct pw_global * | pw_impl_node_get_global (struct pw_impl_node *node) |
Get the global of this node. More... | |
SPA_EXPORT const struct pw_properties * | pw_impl_node_get_properties (struct pw_impl_node *node) |
Get the node properties. More... | |
SPA_EXPORT int | pw_impl_node_update_properties (struct pw_impl_node *node, const struct spa_dict *dict) |
Update the node properties. More... | |
SPA_EXPORT int | pw_impl_node_set_implementation (struct pw_impl_node *node, struct spa_node *spa_node) |
Set the node implementation. More... | |
SPA_EXPORT struct spa_node * | pw_impl_node_get_implementation (struct pw_impl_node *node) |
Get the node implementation. More... | |
SPA_EXPORT void | pw_impl_node_add_listener (struct pw_impl_node *node, struct spa_hook *listener, const struct pw_impl_node_events *events, void *data) |
Add an event listener. More... | |
SPA_EXPORT int | pw_impl_node_for_each_port (struct pw_impl_node *node, enum pw_direction direction, int(*callback)(void *data, struct pw_impl_port *port), void *data) |
Iterate the ports in the given direction. More... | |
SPA_EXPORT int | pw_impl_node_for_each_param (struct pw_impl_node *node, int seq, uint32_t param_id, uint32_t index, uint32_t max, const struct spa_pod *filter, int(*callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param), void *data) |
SPA_EXPORT int | pw_impl_node_set_param (struct pw_impl_node *node, uint32_t id, uint32_t flags, const struct spa_pod *param) |
SPA_EXPORT struct pw_impl_port * | pw_impl_node_find_port (struct pw_impl_node *node, enum pw_direction direction, uint32_t port_id) |
Find the port with direction and port_id or NULL when not found. More... | |
SPA_EXPORT uint32_t | pw_impl_node_get_free_port_id (struct pw_impl_node *node, enum pw_direction direction) |
Get a free unused port_id from the node. More... | |
SPA_EXPORT int | pw_impl_node_set_active (struct pw_impl_node *node, bool active) |
Set a node active. More... | |
SPA_EXPORT bool | pw_impl_node_is_active (struct pw_impl_node *node) |
Check if a node is active. More... | |
#define DEFAULT_SYNC_TIMEOUT ((uint64_t)(5 * SPA_NSEC_PER_SEC)) |
#define NAME "node" |
#define SYNC_CHECK 0 |
#define SYNC_START 1 |
#define SYNC_STOP 2 |
SPA_EXPORT struct pw_impl_node* pw_context_create_node | ( | struct pw_context * | context, |
struct pw_properties * | properties, | ||
size_t | user_data_size | ||
) |
References NAME, pw_log::pw_log_debug, pw_properties::pw_properties_new(), res, and impl::this.
SPA_EXPORT void pw_impl_node_add_listener | ( | struct pw_impl_node * | node, |
struct spa_hook * | listener, | ||
const struct pw_impl_node_events * | events, | ||
void * | data | ||
) |
Add an event listener.
SPA_EXPORT struct pw_impl_port* pw_impl_node_find_port | ( | struct pw_impl_node * | node, |
enum pw_direction | direction, | ||
uint32_t | port_id | ||
) |
Find the port with direction and port_id or NULL when not found.
Passing PW_ID_ANY for port_id will return any port, preferably an unlinked one.
References NAME, pw_introspect::pw_direction_as_string(), PW_DIRECTION_INPUT, PW_ID_ANY, pw_log::pw_log_debug, and pw_map::pw_map_lookup().
SPA_EXPORT int pw_impl_node_for_each_param | ( | struct pw_impl_node * | node, |
int | seq, | ||
uint32_t | param_id, | ||
uint32_t | index, | ||
uint32_t | max, | ||
const struct spa_pod * | filter, | ||
int(*)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param) | callback, | ||
void * | data | ||
) |
References result_node_params_data::callback, result_node_params_data::data, res, and seq.
SPA_EXPORT int pw_impl_node_for_each_port | ( | struct pw_impl_node * | node, |
enum pw_direction | direction, | ||
int(*)(void *data, struct pw_impl_port *port) | callback, | ||
void * | data | ||
) |
Iterate the ports in the given direction.
The callback should return 0 to fetch the next item, any other value stops the iteration and returns the value. When all callbacks return 0, this function returns 0 when all items are iterated.
References PW_DIRECTION_INPUT, and res.
SPA_EXPORT struct pw_context* pw_impl_node_get_context | ( | struct pw_impl_node * | node | ) |
Get the context of this node.
SPA_EXPORT uint32_t pw_impl_node_get_free_port_id | ( | struct pw_impl_node * | node, |
enum pw_direction | direction | ||
) |
Get a free unused port_id from the node.
References NAME, pw_introspect::pw_direction_as_string(), PW_DIRECTION_INPUT, pw_log::pw_log_debug, pw_log::pw_log_warn, pw_map::pw_map_insert_new(), and res.
SPA_EXPORT struct pw_global* pw_impl_node_get_global | ( | struct pw_impl_node * | node | ) |
Get the global of this node.
SPA_EXPORT struct spa_node* pw_impl_node_get_implementation | ( | struct pw_impl_node * | node | ) |
Get the node implementation.
SPA_EXPORT const struct pw_node_info* pw_impl_node_get_info | ( | struct pw_impl_node * | node | ) |
Get the node info.
SPA_EXPORT const struct pw_properties* pw_impl_node_get_properties | ( | struct pw_impl_node * | node | ) |
Get the node properties.
SPA_EXPORT void* pw_impl_node_get_user_data | ( | struct pw_impl_node * | node | ) |
Get node user_data.
The size of the memory was given in pw_context_create_node
SPA_EXPORT int pw_impl_node_initialized | ( | struct pw_impl_node * | this | ) |
References NAME, and pw_log::pw_log_debug.
SPA_EXPORT bool pw_impl_node_is_active | ( | struct pw_impl_node * | node | ) |
Check if a node is active.
SPA_EXPORT int pw_impl_node_register | ( | struct pw_impl_node * | this, |
struct pw_properties * | properties | ||
) |
Complete initialization of the node and register.
References NAME, pw_global::pw_global_new(), PW_KEY_APP_NAME, PW_KEY_CLIENT_ID, PW_KEY_DEVICE_ID, PW_KEY_FACTORY_ID, PW_KEY_MEDIA_CATEGORY, PW_KEY_MEDIA_CLASS, PW_KEY_MEDIA_ROLE, PW_KEY_MEDIA_TYPE, PW_KEY_MODULE_ID, PW_KEY_NODE_DESCRIPTION, PW_KEY_NODE_NAME, PW_KEY_NODE_NICK, PW_KEY_NODE_SESSION, PW_KEY_OBJECT_PATH, PW_KEY_PRIORITY_DRIVER, PW_KEY_PRIORITY_SESSION, pw_log::pw_log_debug, PW_TYPE_INTERFACE_Node, and PW_VERSION_NODE.
SPA_EXPORT int pw_impl_node_set_active | ( | struct pw_impl_node * | node, |
bool | active | ||
) |
Set a node active.
This will start negotiation with all linked active nodes and start data transport
References NAME, and pw_log::pw_log_debug.
Referenced by pw_stream_disconnect(), and pw_stream_set_active().
SPA_EXPORT int pw_impl_node_set_driver | ( | struct pw_impl_node * | node, |
struct pw_impl_node * | driver | ||
) |
References res.
SPA_EXPORT int pw_impl_node_set_implementation | ( | struct pw_impl_node * | node, |
struct spa_node * | spa_node | ||
) |
Set the node implementation.
References NAME, pw_log::pw_log_debug, pw_log::pw_log_error, and res.
SPA_EXPORT int pw_impl_node_set_param | ( | struct pw_impl_node * | node, |
uint32_t | id, | ||
uint32_t | flags, | ||
const struct spa_pod * | param | ||
) |
References NAME, and pw_log::pw_log_debug.
SPA_EXPORT int pw_impl_node_update_properties | ( | struct pw_impl_node * | node, |
const struct spa_dict * | dict | ||
) |
Update the node properties.
Referenced by pw_stream_update_properties().