PipeWire  0.3.33
impl-node.c File Reference

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

int pw_impl_node_register (struct pw_impl_node *this, struct pw_properties *properties)
 Complete initialization of the node and register. More...
 
int pw_impl_node_initialized (struct pw_impl_node *this)
 
int pw_impl_node_set_driver (struct pw_impl_node *node, struct pw_impl_node *driver)
 
struct pw_impl_node * pw_context_create_node (struct pw_context *context, struct pw_properties *properties, size_t user_data_size)
 Create a new node. More...
 
const struct pw_node_infopw_impl_node_get_info (struct pw_impl_node *node)
 Get the node info. More...
 
void * pw_impl_node_get_user_data (struct pw_impl_node *node)
 Get node user_data. More...
 
struct pw_context * pw_impl_node_get_context (struct pw_impl_node *node)
 Get the context of this node. More...
 
struct pw_global * pw_impl_node_get_global (struct pw_impl_node *node)
 Get the global of this node. More...
 
const struct pw_propertiespw_impl_node_get_properties (struct pw_impl_node *node)
 Get the node properties. More...
 
int pw_impl_node_update_properties (struct pw_impl_node *node, const struct spa_dict *dict)
 Update the node properties. More...
 
int pw_impl_node_set_implementation (struct pw_impl_node *node, struct spa_node *spa_node)
 Set the node implementation. More...
 
struct spa_nodepw_impl_node_get_implementation (struct pw_impl_node *node)
 Get the node implementation. More...
 
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...
 
void pw_impl_node_destroy (struct pw_impl_node *node)
 Destroy a node. More...
 
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...
 
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)
 
int pw_impl_node_set_param (struct pw_impl_node *node, uint32_t id, uint32_t flags, const struct spa_pod *param)
 
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...
 
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...
 
int pw_impl_node_set_state (struct pw_impl_node *node, enum pw_node_state state)
 Set the node state. More...
 
int pw_impl_node_set_active (struct pw_impl_node *node, bool active)
 Set a node active. More...
 
bool pw_impl_node_is_active (struct pw_impl_node *node)
 Check if a node is active. More...
 

Macro Definition Documentation

◆ DEFAULT_SYNC_TIMEOUT

#define DEFAULT_SYNC_TIMEOUT   ((uint64_t)(5 * SPA_NSEC_PER_SEC))

◆ NAME

#define NAME   "node"

◆ SYNC_CHECK

#define SYNC_CHECK   0

◆ SYNC_START

#define SYNC_START   1

◆ SYNC_STOP

#define SYNC_STOP   2

Function Documentation

◆ pw_impl_node_set_driver()

int pw_impl_node_set_driver ( struct pw_impl_node *  node,
struct pw_impl_node *  driver 
)

◆ pw_impl_node_set_param()

int pw_impl_node_set_param ( struct pw_impl_node *  node,
uint32_t  id,
uint32_t  flags,
const struct spa_pod param 
)

◆ pw_impl_node_set_state()

int pw_impl_node_set_state ( struct pw_impl_node *  node,
enum pw_node_state  state 
)

Set the node state.

Parameters
nodea Node
statea pw_node_state
Returns
0 on success < 0 on error

Set the state of node to state.

References node::active, NAME, pw_log_debug, pw_node_state_as_string(), PW_NODE_STATE_CREATING, PW_NODE_STATE_SUSPENDED, and SPA_CONTAINER_OF.