25 #ifndef PIPEWIRE_IMPL_NODE_H 26 #define PIPEWIRE_IMPL_NODE_H 52 #define PW_VERSION_IMPL_NODE_EVENTS 0 102 size_t user_data_size );
147 int (*callback) (
void *
data,
struct pw_impl_port *
port),
151 int seq, uint32_t param_id,
152 uint32_t index, uint32_t max,
154 int (*callback) (
void *
data,
int seq,
155 uint32_t
id, uint32_t index, uint32_t next,
161 struct pw_impl_port *
#define pw_direction
The direction of a port.
Definition: port.h:56
void(* event)(void *data, const struct spa_event *event)
an event is emitted
Definition: impl-node.h:87
Definition: properties.h:49
Definition: x86_64-redhat-linux-gnu/doc/spa/node/node.h:52
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.
Definition: impl-node.c:1974
int pw_impl_node_initialized(struct pw_impl_node *node)
Definition: impl-node.c:726
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:76
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.
Definition: impl-node.c:1939
const struct pw_properties * pw_impl_node_get_properties(struct pw_impl_node *node)
Get the node properties.
Definition: impl-node.c:1267
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
int pw_impl_node_update_properties(struct pw_impl_node *node, const struct spa_dict *dict)
Update the node properties.
Definition: impl-node.c:1297
static uint32_t int int res
Definition: core.h:328
bool pw_impl_node_is_active(struct pw_impl_node *node)
Check if a node is active.
Definition: impl-node.c:2144
uint32_t version
Definition: impl-node.h:53
static uint32_t int seq
Definition: core.h:328
int pw_impl_node_set_implementation(struct pw_impl_node *node, struct spa_node *spa_node)
Set the node implementation.
Definition: impl-node.c:1674
Definition: utils/dict.h:48
void(* peer_added)(void *data, struct pw_impl_node *peer)
a peer was added
Definition: impl-node.h:93
void(* port_info_changed)(void *data, struct pw_impl_port *port, const struct pw_port_info *info)
a port on the node changed info
Definition: impl-node.h:72
void(* port_added)(void *data, struct pw_impl_port *port)
a port was added
Definition: impl-node.h:65
struct pw_global * pw_impl_node_get_global(struct pw_impl_node *node)
Get the global of this node.
Definition: impl-node.c:1261
void(* state_request)(void *data, enum pw_node_state state)
a new state is requested on the node
Definition: impl-node.h:78
void(* state_changed)(void *data, enum pw_node_state old, enum pw_node_state state, const char *error)
the state of the node changed
Definition: impl-node.h:80
struct spa_node * pw_impl_node_get_implementation(struct pw_impl_node *node)
Get the node implementation.
Definition: impl-node.c:1697
int pw_impl_node_register(struct pw_impl_node *node, struct pw_properties *properties)
Complete initialization of the node and register.
Definition: impl-node.c:650
void(* info_changed)(void *data, const struct pw_node_info *info)
the node info changed
Definition: impl-node.h:70
pw_node_state
The different node states.
Definition: src/pipewire/node.h:56
const struct pw_node_info * pw_impl_node_get_info(struct pw_impl_node *node)
Get the node info.
Definition: impl-node.c:1243
void * pw_impl_node_get_user_data(struct pw_impl_node *node)
Get node user_data.
Definition: impl-node.c:1249
int pw_impl_node_set_active(struct pw_impl_node *node, bool active)
Set a node active.
Definition: impl-node.c:2126
void(* result)(void *data, int seq, int res, uint32_t type, const void *result)
a result was received
Definition: impl-node.h:84
void(* active_changed)(void *data, bool active)
the node active state changed
Definition: impl-node.h:75
struct pw_context * pw_impl_node_get_context(struct pw_impl_node *node)
Get the context of this node.
Definition: impl-node.c:1255
void(* driver_changed)(void *data, struct pw_impl_node *old, struct pw_impl_node *driver)
the driver of the node changed
Definition: impl-node.h:90
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.
Definition: impl-node.c:1124
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.
Definition: impl-node.c:1795
void pw_impl_node_destroy(struct pw_impl_node *node)
Destroy a node.
Definition: impl-node.c:1718
Definition: pod/event.h:43
void(* peer_removed)(void *data, struct pw_impl_node *peer)
a peer was removed
Definition: impl-node.h:95
void(* initialized)(void *data)
the node is initialized
Definition: impl-node.h:60
void(* free)(void *data)
the node is about to be freed
Definition: impl-node.h:58
The node information.
Definition: src/pipewire/node.h:70
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.
Definition: impl-node.c:1703
void(* port_init)(void *data, struct pw_impl_port *port)
a port is being initialized on the node
Definition: impl-node.h:63
void(* port_removed)(void *data, struct pw_impl_port *port)
a port was removed
Definition: impl-node.h:67
Node events, listen to them with pw_impl_node_add_listener.
Definition: impl-node.h:51
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)
Definition: impl-node.c:1850
void(* destroy)(void *data)
the node is destroyed
Definition: impl-node.h:56