Go to the documentation of this file.
50 #define SPA_TYPE_INTERFACE_Node SPA_TYPE_INFO_INTERFACE_BASE "Node"
52 #define SPA_VERSION_NODE 0
63 #define SPA_NODE_CHANGE_MASK_FLAGS (1u<<0)
64 #define SPA_NODE_CHANGE_MASK_PROPS (1u<<1)
65 #define SPA_NODE_CHANGE_MASK_PARAMS (1u<<2)
68 #define SPA_NODE_FLAG_RT (1u<<0)
69 #define SPA_NODE_FLAG_IN_DYNAMIC_PORTS (1u<<1)
70 #define SPA_NODE_FLAG_OUT_DYNAMIC_PORTS (1u<<2)
71 #define SPA_NODE_FLAG_IN_PORT_CONFIG (1u<<3)
73 #define SPA_NODE_FLAG_OUT_PORT_CONFIG (1u<<4)
75 #define SPA_NODE_FLAG_NEED_CONFIGURE (1u<<5)
77 #define SPA_NODE_FLAG_ASYNC (1u<<6)
87 #define SPA_NODE_INFO_INIT() (struct spa_node_info) { 0, }
95 #define SPA_PORT_CHANGE_MASK_FLAGS (1u<<0)
96 #define SPA_PORT_CHANGE_MASK_RATE (1u<<1)
97 #define SPA_PORT_CHANGE_MASK_PROPS (1u<<2)
98 #define SPA_PORT_CHANGE_MASK_PARAMS (1u<<3)
101 #define SPA_PORT_FLAG_REMOVABLE (1u<<0)
102 #define SPA_PORT_FLAG_OPTIONAL (1u<<1)
103 #define SPA_PORT_FLAG_CAN_ALLOC_BUFFERS (1u<<2)
104 #define SPA_PORT_FLAG_IN_PLACE (1u<<3)
106 #define SPA_PORT_FLAG_NO_REF (1u<<4)
110 #define SPA_PORT_FLAG_LIVE (1u<<5)
112 #define SPA_PORT_FLAG_PHYSICAL (1u<<6)
113 #define SPA_PORT_FLAG_TERMINAL (1u<<7)
116 #define SPA_PORT_FLAG_DYNAMIC_DATA (1u<<8)
120 struct spa_fraction rate;
121 const struct spa_dict *props;
122 struct spa_param_info *params;
126 #define SPA_PORT_INFO_INIT() (struct spa_port_info) { 0, }
128 #define SPA_RESULT_TYPE_NODE_ERROR 1
129 #define SPA_RESULT_TYPE_NODE_PARAMS 2
144 #define SPA_NODE_EVENT_INFO 0
145 #define SPA_NODE_EVENT_PORT_INFO 1
146 #define SPA_NODE_EVENT_RESULT 2
147 #define SPA_NODE_EVENT_EVENT 3
148 #define SPA_NODE_EVENT_NUM 4
157 #define SPA_VERSION_NODE_EVENTS 0
184 void (*result) (
void *
data,
int seq,
int res,
185 uint32_t type,
const void *result);
197 #define SPA_NODE_CALLBACK_READY 0
198 #define SPA_NODE_CALLBACK_REUSE_BUFFER 1
199 #define SPA_NODE_CALLBACK_XRUN 2
200 #define SPA_NODE_CALLBACK_NUM 3
208 #define SPA_VERSION_NODE_CALLBACKS 0
218 int (*ready) (
void *
data,
int state);
230 int (*reuse_buffer) (
void *
data,
244 int (*xrun) (
void *
data, uint64_t trigger, uint64_t delay,
250 #define SPA_NODE_PARAM_FLAG_TEST_ONLY (1 << 0)
251 #define SPA_NODE_PARAM_FLAG_FIXATE (1 << 1)
252 #define SPA_NODE_PARAM_FLAG_NEAREST (1 << 2)
256 #define SPA_NODE_BUFFERS_FLAG_ALLOC (1 << 0)
261 #define SPA_NODE_METHOD_ADD_LISTENER 0
262 #define SPA_NODE_METHOD_SET_CALLBACKS 1
263 #define SPA_NODE_METHOD_SYNC 2
264 #define SPA_NODE_METHOD_ENUM_PARAMS 3
265 #define SPA_NODE_METHOD_SET_PARAM 4
266 #define SPA_NODE_METHOD_SET_IO 5
267 #define SPA_NODE_METHOD_SEND_COMMAND 6
268 #define SPA_NODE_METHOD_ADD_PORT 7
269 #define SPA_NODE_METHOD_REMOVE_PORT 8
270 #define SPA_NODE_METHOD_PORT_ENUM_PARAMS 9
271 #define SPA_NODE_METHOD_PORT_SET_PARAM 10
272 #define SPA_NODE_METHOD_PORT_USE_BUFFERS 11
273 #define SPA_NODE_METHOD_PORT_SET_IO 12
274 #define SPA_NODE_METHOD_PORT_REUSE_BUFFER 13
275 #define SPA_NODE_METHOD_PROCESS 14
276 #define SPA_NODE_METHOD_NUM 15
284 #define SPA_VERSION_NODE_METHODS 0
301 int (*add_listener) (
void *object,
318 int (*set_callbacks) (
void *object,
336 int (*
sync) (
void *object,
int seq);
369 int (*enum_params) (
void *object,
int seq,
370 uint32_t id, uint32_t
start, uint32_t max,
394 int (*set_param) (
void *object,
395 uint32_t id, uint32_t
flags,
416 int (*set_io) (
void *object,
417 uint32_t id,
void *
data,
size_t size);
433 int (*send_command) (
void *object,
const struct spa_command *command);
451 int (*add_port) (
void *object,
465 int (*remove_port) (
void *object,
498 int (*port_enum_params) (
void *object,
int seq,
500 uint32_t id, uint32_t
start, uint32_t max,
526 int (*port_set_param) (
void *object,
529 uint32_t id, uint32_t
flags,
572 int (*port_use_buffers) (
void *object,
599 int (*port_set_io) (
void *object,
603 void *
data,
size_t size);
616 int (*port_reuse_buffer) (
void *object, uint32_t port_id, uint32_t buffer_id);
635 int (*process) (
void *object);
638 #define spa_node_method(o,method,version,...) \
640 int _res = -ENOTSUP; \
641 struct spa_node *_n = o; \
642 spa_interface_call_res(&_n->iface, \
643 struct spa_node_methods, _res, \
644 method, version, ##__VA_ARGS__); \
648 #define spa_node_add_listener(n,...) spa_node_method(n, add_listener, 0, __VA_ARGS__)
649 #define spa_node_set_callbacks(n,...) spa_node_method(n, set_callbacks, 0, __VA_ARGS__)
650 #define spa_node_sync(n,...) spa_node_method(n, sync, 0, __VA_ARGS__)
651 #define spa_node_enum_params(n,...) spa_node_method(n, enum_params, 0, __VA_ARGS__)
652 #define spa_node_set_param(n,...) spa_node_method(n, set_param, 0, __VA_ARGS__)
653 #define spa_node_set_io(n,...) spa_node_method(n, set_io, 0, __VA_ARGS__)
654 #define spa_node_send_command(n,...) spa_node_method(n, send_command, 0, __VA_ARGS__)
655 #define spa_node_add_port(n,...) spa_node_method(n, add_port, 0, __VA_ARGS__)
656 #define spa_node_remove_port(n,...) spa_node_method(n, remove_port, 0, __VA_ARGS__)
657 #define spa_node_port_enum_params(n,...) spa_node_method(n, port_enum_params, 0, __VA_ARGS__)
658 #define spa_node_port_set_param(n,...) spa_node_method(n, port_set_param, 0, __VA_ARGS__)
659 #define spa_node_port_use_buffers(n,...) spa_node_method(n, port_use_buffers, 0, __VA_ARGS__)
660 #define spa_node_port_set_io(n,...) spa_node_method(n, port_set_io, 0, __VA_ARGS__)
662 #define spa_node_port_reuse_buffer(n,...) spa_node_method(n, port_reuse_buffer, 0, __VA_ARGS__)
663 #define spa_node_process(n) spa_node_method(n, process, 0)
spa_direction
Definition: defs.h:78
Node callbacks.
Definition: build-12683127/doc/spa/node/node.h:207
uint32_t next
next index of iteration
Definition: build-12683127/doc/spa/node/node.h:140
const char * message
Definition: build-12683127/doc/spa/node/node.h:133
Node information structure.
Definition: build-12683127/doc/spa/node/node.h:60
struct spa_dict * props
extra node properties
Definition: build-12683127/doc/spa/node/node.h:82
user data to add to an object
Definition: filter.c:75
uint64_t flags
port flags
Definition: build-12683127/doc/spa/node/node.h:119
uint32_t id
id of parameter
Definition: build-12683127/doc/spa/node/node.h:138
uint32_t index
index of parameter
Definition: build-12683127/doc/spa/node/node.h:139
an error result
Definition: build-12683127/doc/spa/node/node.h:132
uint32_t max_output_ports
Definition: build-12683127/doc/spa/node/node.h:62
Definition: media-session.c:119
struct spa_pod * param
the result param
Definition: build-12683127/doc/spa/node/node.h:141
Node methods.
Definition: build-12683127/doc/spa/node/node.h:281
A Buffer.
Definition: buffer/buffer.h:93
uint32_t version
Definition: build-12683127/doc/spa/node/node.h:209
Definition: build-12683127/doc/spa/node/node.h:53
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
the result of enum_params or port_enum_params.
Definition: build-12683127/doc/spa/node/node.h:137
uint32_t n_params
number of items in params
Definition: build-12683127/doc/spa/node/node.h:84
uint64_t change_mask
Definition: build-12683127/doc/spa/node/node.h:99
information about a parameter
Definition: param.h:64
uint32_t size
Definition: pod/pod.h:51
Definition: utils/dict.h:48
Port information structure.
Definition: build-12683127/doc/spa/node/node.h:94
struct spa_interface iface
Definition: build-12683127/doc/spa/node/node.h:53
Definition: pod/command.h:44
Definition: pod/event.h:43
uint32_t max_input_ports
Definition: build-12683127/doc/spa/node/node.h:61
uint32_t version
version of this structure
Definition: build-12683127/doc/spa/node/node.h:158
events from the spa_node.
Definition: build-12683127/doc/spa/node/node.h:156
struct spa_param_info * params
parameter information
Definition: build-12683127/doc/spa/node/node.h:83
uint64_t change_mask
Definition: build-12683127/doc/spa/node/node.h:66
uint32_t version
Definition: build-12683127/doc/spa/node/node.h:285
const struct spa_dict * props
extra port properties
Definition: build-12683127/doc/spa/node/node.h:121