25 #ifndef PIPEWIRE_NODE_H 26 #define PIPEWIRE_NODE_H 50 #define PW_TYPE_INTERFACE_Node PW_TYPE_INFO_INTERFACE_BASE "Node" 52 #define PW_VERSION_NODE 3 74 #define PW_NODE_CHANGE_MASK_INPUT_PORTS (1 << 0) 75 #define PW_NODE_CHANGE_MASK_OUTPUT_PORTS (1 << 1) 76 #define PW_NODE_CHANGE_MASK_STATE (1 << 2) 77 #define PW_NODE_CHANGE_MASK_PROPS (1 << 3) 78 #define PW_NODE_CHANGE_MASK_PARAMS (1 << 4) 79 #define PW_NODE_CHANGE_MASK_ALL ((1 << 5)-1) 97 #define PW_NODE_EVENT_INFO 0 98 #define PW_NODE_EVENT_PARAM 1 99 #define PW_NODE_EVENT_NUM 2 103 #define PW_VERSION_NODE_EVENTS 0 123 uint32_t
id, uint32_t index, uint32_t next,
127 #define PW_NODE_METHOD_ADD_LISTENER 0 128 #define PW_NODE_METHOD_SUBSCRIBE_PARAMS 1 129 #define PW_NODE_METHOD_ENUM_PARAMS 2 130 #define PW_NODE_METHOD_SET_PARAM 3 131 #define PW_NODE_METHOD_SEND_COMMAND 4 132 #define PW_NODE_METHOD_NUM 5 136 #define PW_VERSION_NODE_METHODS 0 167 uint32_t start, uint32_t num,
188 #define pw_node_method(o,method,version,...) \ 190 int _res = -ENOTSUP; \ 191 spa_interface_call_res((struct spa_interface*)o, \ 192 struct pw_node_methods, _res, \ 193 method, version, ##__VA_ARGS__); \ 198 #define pw_node_add_listener(c,...) pw_node_method(c,add_listener,0,__VA_ARGS__) 199 #define pw_node_subscribe_params(c,...) pw_node_method(c,subscribe_params,0,__VA_ARGS__) 200 #define pw_node_enum_params(c,...) pw_node_method(c,enum_params,0,__VA_ARGS__) 201 #define pw_node_set_param(c,...) pw_node_method(c,set_param,0,__VA_ARGS__) 202 #define pw_node_send_command(c,...) pw_node_method(c,send_command,0,__VA_ARGS__) uint32_t n_params
number of items in params
Definition: src/pipewire/node.h:87
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate node parameters.
Definition: src/pipewire/node.h:166
uint32_t n_input_ports
number of inputs
Definition: src/pipewire/node.h:81
struct spa_param_info * params
parameters
Definition: src/pipewire/node.h:86
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:76
uint32_t max_output_ports
maximum number of outputs
Definition: src/pipewire/node.h:73
struct pw_node_info * pw_node_info_update(struct pw_node_info *info, const struct pw_node_info *update)
Definition: introspect.c:168
const char * pw_node_state_as_string(enum pw_node_state state)
Convert a pw_node_state to a readable string.
Definition: introspect.c:34
uint32_t version
Definition: src/pipewire/node.h:137
static uint32_t int seq
Definition: core.h:328
enum pw_node_state state
the current state of the node
Definition: src/pipewire/node.h:83
Definition: utils/dict.h:48
the node is running
Definition: src/pipewire/node.h:63
static uint32_t id
Definition: core.h:328
the node is suspended, the device might be closed
Definition: src/pipewire/node.h:59
uint32_t n_output_ports
number of outputs
Definition: src/pipewire/node.h:82
information about a parameter
Definition: param.h:63
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition: src/pipewire/node.h:152
uint32_t id
id of the global
Definition: src/pipewire/node.h:71
void(* param)(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a node param.
Definition: src/pipewire/node.h:122
struct spa_dict * props
the properties of the node
Definition: src/pipewire/node.h:85
uint32_t max_input_ports
maximum number of inputs
Definition: src/pipewire/node.h:72
void(* info)(void *object, const struct pw_node_info *info)
Notify node info.
Definition: src/pipewire/node.h:110
uint32_t version
Definition: src/pipewire/node.h:104
pw_node_state
The different node states.
Definition: src/pipewire/node.h:56
the node is being created
Definition: src/pipewire/node.h:58
void pw_node_info_free(struct pw_node_info *info)
Definition: introspect.c:226
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_node_events *events, void *data)
Definition: src/pipewire/node.h:139
uint64_t change_mask
bitfield of changed fields since last call
Definition: src/pipewire/node.h:80
the node is running but there is no active port
Definition: src/pipewire/node.h:61
int(* set_param)(void *object, uint32_t id, uint32_t flags, const struct spa_pod *param)
Set a parameter on the node.
Definition: src/pipewire/node.h:177
Definition: pod/command.h:44
Node methods.
Definition: src/pipewire/node.h:135
error state
Definition: src/pipewire/node.h:57
The node information.
Definition: src/pipewire/node.h:70
int(* send_command)(void *object, const struct spa_command *command)
Send a command to the node.
Definition: src/pipewire/node.h:185
Node events.
Definition: src/pipewire/node.h:102
const char * error
an error reason if state is error
Definition: src/pipewire/node.h:84