51 #define SPA_TYPE_INTERFACE_Node SPA_TYPE_INFO_INTERFACE_BASE "Node" 53 #define SPA_VERSION_NODE 0 64 #define SPA_NODE_CHANGE_MASK_FLAGS (1u<<0) 65 #define SPA_NODE_CHANGE_MASK_PROPS (1u<<1) 66 #define SPA_NODE_CHANGE_MASK_PARAMS (1u<<2) 69 #define SPA_NODE_FLAG_RT (1u<<0) 70 #define SPA_NODE_FLAG_IN_DYNAMIC_PORTS (1u<<1) 71 #define SPA_NODE_FLAG_OUT_DYNAMIC_PORTS (1u<<2) 72 #define SPA_NODE_FLAG_IN_PORT_CONFIG (1u<<3) 74 #define SPA_NODE_FLAG_OUT_PORT_CONFIG (1u<<4) 76 #define SPA_NODE_FLAG_NEED_CONFIGURE (1u<<5) 78 #define SPA_NODE_FLAG_ASYNC (1u<<6) 88 #define SPA_NODE_INFO_INIT() (struct spa_node_info) { 0, } 96 #define SPA_PORT_CHANGE_MASK_FLAGS (1u<<0) 97 #define SPA_PORT_CHANGE_MASK_RATE (1u<<1) 98 #define SPA_PORT_CHANGE_MASK_PROPS (1u<<2) 99 #define SPA_PORT_CHANGE_MASK_PARAMS (1u<<3) 102 #define SPA_PORT_FLAG_REMOVABLE (1u<<0) 103 #define SPA_PORT_FLAG_OPTIONAL (1u<<1) 104 #define SPA_PORT_FLAG_CAN_ALLOC_BUFFERS (1u<<2) 105 #define SPA_PORT_FLAG_IN_PLACE (1u<<3) 107 #define SPA_PORT_FLAG_NO_REF (1u<<4) 111 #define SPA_PORT_FLAG_LIVE (1u<<5) 113 #define SPA_PORT_FLAG_PHYSICAL (1u<<6) 114 #define SPA_PORT_FLAG_TERMINAL (1u<<7) 117 #define SPA_PORT_FLAG_DYNAMIC_DATA (1u<<8) 121 struct spa_fraction rate; 122 const struct spa_dict *props; 123 struct spa_param_info *params; 127 #define SPA_PORT_INFO_INIT() (struct spa_port_info) { 0, } 129 #define SPA_RESULT_TYPE_NODE_ERROR 1 130 #define SPA_RESULT_TYPE_NODE_PARAMS 2 145 #define SPA_NODE_EVENT_INFO 0 146 #define SPA_NODE_EVENT_PORT_INFO 1 147 #define SPA_NODE_EVENT_RESULT 2 148 #define SPA_NODE_EVENT_EVENT 3 149 #define SPA_NODE_EVENT_NUM 4 158 #define SPA_VERSION_NODE_EVENTS 0 165 void (*port_info) (
void *data,
185 void (*result) (
void *data,
int seq,
int res,
186 uint32_t type,
const void *result);
195 void (*event) (
void *data,
const struct spa_event *event);
198 #define SPA_NODE_CALLBACK_READY 0 199 #define SPA_NODE_CALLBACK_REUSE_BUFFER 1 200 #define SPA_NODE_CALLBACK_XRUN 2 201 #define SPA_NODE_CALLBACK_NUM 3 209 #define SPA_VERSION_NODE_CALLBACKS 0 219 int (*ready) (
void *data,
int state);
231 int (*reuse_buffer) (
void *data,
245 int (*xrun) (
void *data, uint64_t trigger, uint64_t delay,
251 #define SPA_NODE_PARAM_FLAG_TEST_ONLY (1 << 0) 252 #define SPA_NODE_PARAM_FLAG_FIXATE (1 << 1) 253 #define SPA_NODE_PARAM_FLAG_NEAREST (1 << 2) 257 #define SPA_NODE_BUFFERS_FLAG_ALLOC (1 << 0) 262 #define SPA_NODE_METHOD_ADD_LISTENER 0 263 #define SPA_NODE_METHOD_SET_CALLBACKS 1 264 #define SPA_NODE_METHOD_SYNC 2 265 #define SPA_NODE_METHOD_ENUM_PARAMS 3 266 #define SPA_NODE_METHOD_SET_PARAM 4 267 #define SPA_NODE_METHOD_SET_IO 5 268 #define SPA_NODE_METHOD_SEND_COMMAND 6 269 #define SPA_NODE_METHOD_ADD_PORT 7 270 #define SPA_NODE_METHOD_REMOVE_PORT 8 271 #define SPA_NODE_METHOD_PORT_ENUM_PARAMS 9 272 #define SPA_NODE_METHOD_PORT_SET_PARAM 10 273 #define SPA_NODE_METHOD_PORT_USE_BUFFERS 11 274 #define SPA_NODE_METHOD_PORT_SET_IO 12 275 #define SPA_NODE_METHOD_PORT_REUSE_BUFFER 13 276 #define SPA_NODE_METHOD_PROCESS 14 277 #define SPA_NODE_METHOD_NUM 15 285 #define SPA_VERSION_NODE_METHODS 0 302 int (*add_listener) (
void *object,
319 int (*set_callbacks) (
void *object,
337 int (*sync) (
void *object,
int seq);
370 int (*enum_params) (
void *object,
int seq,
371 uint32_t id, uint32_t start, uint32_t max,
395 int (*set_param) (
void *object,
396 uint32_t id, uint32_t
flags,
417 int (*set_io) (
void *object,
418 uint32_t id,
void *data,
size_t size);
434 int (*send_command) (
void *object,
const struct spa_command *command);
452 int (*add_port) (
void *object,
466 int (*remove_port) (
void *object,
499 int (*port_enum_params) (
void *object,
int seq,
501 uint32_t id, uint32_t start, uint32_t max,
527 int (*port_set_param) (
void *object,
530 uint32_t id, uint32_t
flags,
573 int (*port_use_buffers) (
void *object,
600 int (*port_set_io) (
void *object,
604 void *data,
size_t size);
617 int (*port_reuse_buffer) (
void *object, uint32_t port_id, uint32_t buffer_id);
636 int (*process) (
void *object);
639 #define spa_node_method(o,method,version,...) \ 641 int _res = -ENOTSUP; \ 642 struct spa_node *_n = o; \ 643 spa_interface_call_res(&_n->iface, \ 644 struct spa_node_methods, _res, \ 645 method, version, ##__VA_ARGS__); \ 649 #define spa_node_add_listener(n,...) spa_node_method(n, add_listener, 0, __VA_ARGS__) 650 #define spa_node_set_callbacks(n,...) spa_node_method(n, set_callbacks, 0, __VA_ARGS__) 651 #define spa_node_sync(n,...) spa_node_method(n, sync, 0, __VA_ARGS__) 652 #define spa_node_enum_params(n,...) spa_node_method(n, enum_params, 0, __VA_ARGS__) 653 #define spa_node_set_param(n,...) spa_node_method(n, set_param, 0, __VA_ARGS__) 654 #define spa_node_set_io(n,...) spa_node_method(n, set_io, 0, __VA_ARGS__) 655 #define spa_node_send_command(n,...) spa_node_method(n, send_command, 0, __VA_ARGS__) 656 #define spa_node_add_port(n,...) spa_node_method(n, add_port, 0, __VA_ARGS__) 657 #define spa_node_remove_port(n,...) spa_node_method(n, remove_port, 0, __VA_ARGS__) 658 #define spa_node_port_enum_params(n,...) spa_node_method(n, port_enum_params, 0, __VA_ARGS__) 659 #define spa_node_port_set_param(n,...) spa_node_method(n, port_set_param, 0, __VA_ARGS__) 660 #define spa_node_port_use_buffers(n,...) spa_node_method(n, port_use_buffers, 0, __VA_ARGS__) 661 #define spa_node_port_set_io(n,...) spa_node_method(n, port_set_io, 0, __VA_ARGS__) 663 #define spa_node_port_reuse_buffer(n,...) spa_node_method(n, port_reuse_buffer, 0, __VA_ARGS__) 664 #define spa_node_process(n) spa_node_method(n, process, 0)
uint64_t change_mask
Definition: node.h:128
Node information structure.
Definition: node.h:68
the result of enum_params or port_enum_params.
Definition: node.h:187
uint32_t n_params
number of items in params
Definition: node.h:108
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:351
struct spa_param_info * params
parameter information
Definition: node.h:107
an error result
Definition: node.h:182
Port information structure.
Definition: node.h:119
events from the spa_node.
Definition: node.h:211
struct spa_interface iface
Definition: node.h:61
information about a parameter
Definition: param.h:70
A Buffer.
Definition: buffer.h:105
uint64_t change_mask
Definition: node.h:77
Node methods.
Definition: node.h:365
uint32_t max_output_ports
Definition: node.h:70
uint64_t flags
port flags
Definition: node.h:166
uint32_t size
Definition: pod.h:64
Node callbacks.
Definition: node.h:267
spa_direction
Definition: defs.h:90
uint32_t max_input_ports
Definition: node.h:69