Go to the documentation of this file.
47 #define spa_debug(...)
73 #define spa_graph_link_signal(l) ((l)->signal((l)->signal_data))
75 #define spa_graph_state_dec(s,c) (__atomic_sub_fetch(&(s)->pending, c, __ATOMIC_SEQ_CST) == 0)
97 #define SPA_VERSION_GRAPH_NODE_CALLBACKS 0
102 uint32_t port_id, uint32_t buffer_id);
118 #define spa_graph_node_call(n,method,version,...) \
121 spa_callbacks_call_res(&(n)->callbacks, \
122 struct spa_graph_node_callbacks, __res, \
123 method, version, ##__VA_ARGS__); \
127 #define spa_graph_node_process(n) spa_graph_node_call(n, process, 0, n)
128 #define spa_graph_node_reuse_buffer(n,p,i) spa_graph_node_call(n, reuse_buffer, 0, n, p, i)
155 graph->state->pending,
graph->state->required);
162 spa_debug(
"graph %p node %p: state %p pending %d/%d status %d",
graph, n,
214 link->state->required--;
226 node->subgraph = NULL;
228 node->state->required =
node->state->pending = 0;
231 node->graph_link.signal_data =
node;
251 node->subgraph = subgraph;
270 node->state->required++;
271 spa_debug(
"node %p add to graph %p, state %p required %d",
278 spa_debug(
"node %p remove from graph %p, state %p required %d",
281 node->state->required--;
292 spa_debug(
"port %p init type %d id %d",
port, direction, port_id);
326 port->peer->peer = NULL;
344 uint32_t port_id, uint32_t buffer_id)
void spa_graph_state_reset(struct spa_graph_state *state)
Definition: graph.h:61
Definition: module-filter-chain.c:176
const struct spa_graph_node_callbacks spa_graph_node_impl_default
Definition: graph.h:350
struct spa_graph_state * state
Definition: graph.h:68
spa_direction
Definition: defs.h:78
void spa_graph_port_link(struct spa_graph_port *out, struct spa_graph_port *in)
Definition: graph.h:314
void spa_graph_init(struct spa_graph *graph, struct spa_graph_state *state)
Definition: graph.h:193
struct spa_list link
link in struct endpoint_link link_list or struct impl link_list
Definition: module-filter-chain.c:177
int(* reuse_buffer)(void *data, struct spa_graph_node *node, uint32_t port_id, uint32_t buffer_id)
Definition: graph.h:101
struct spa_graph_node * parent
Definition: graph.h:91
int spa_graph_finish(struct spa_graph *graph)
Definition: graph.h:173
int(* signal)(void *data)
Definition: graph.h:69
struct spa_list sched_link
link for scheduler
Definition: graph.h:115
int status
current status
Definition: graph.h:56
struct spa_list link
link in impl node_list
Definition: module-filter-chain.c:156
user data to add to an object
Definition: filter.c:75
uint32_t flags
port flags
Definition: graph.h:135
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
@ SPA_DIRECTION_INPUT
Definition: defs.h:79
void spa_graph_node_set_callbacks(struct spa_graph_node *node, const struct spa_graph_node_callbacks *callbacks, void *data)
Definition: graph.h:257
struct spa_graph_node * node
owner node
Definition: graph.h:132
Definition: module-filter-chain.c:155
void spa_graph_link_add(struct spa_graph_node *out, struct spa_graph_state *state, struct spa_graph_link *link)
Definition: graph.h:202
uint32_t version
Definition: graph.h:98
void spa_graph_node_init(struct spa_graph_node *node, struct spa_graph_state *state)
Definition: graph.h:220
int32_t required
required number of signals
Definition: graph.h:57
#define spa_node_process(n)
Definition: build-12775836/doc/spa/node/node.h:663
const struct spa_graph_node_callbacks spa_graph_node_sub_impl_default
Definition: graph.h:243
struct spa_node * node
Definition: buffers.c:45
int spa_graph_link_signal_node(void *data)
Definition: graph.h:180
Definition: module-filter-chain.c:197
struct spa_list link
Definition: filter.c:89
#define spa_graph_link_signal(l)
Definition: graph.h:73
#define spa_graph_node_process(n)
Definition: graph.h:127
enum spa_direction direction
port direction
Definition: graph.h:133
struct spa_graph_state * state
Definition: graph.h:92
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
void * signal_data
Definition: graph.h:70
uint32_t flags
Definition: graph.h:90
int spa_graph_run(struct spa_graph *graph)
Definition: graph.h:148
uint32_t flags
node flags
Definition: graph.h:110
struct spa_callbacks callbacks
Definition: graph.h:114
Definition: build-12775836/doc/spa/node/node.h:53
Callbacks, contains the structure with functions and the data passed to the functions.
Definition: hook.h:130
#define spa_graph_state_dec(s, c)
Definition: graph.h:75
void spa_graph_port_remove(struct spa_graph_port *port)
Definition: graph.h:307
void spa_graph_port_unlink(struct spa_graph_port *port)
Definition: graph.h:322
uint32_t port_id
port id
Definition: graph.h:134
#define spa_node_port_reuse_buffer(n,...)
Definition: build-12775836/doc/spa/node/node.h:662
int spa_graph_link_signal_graph(void *data)
Definition: graph.h:187
void spa_list_init(struct spa_list *list)
Definition: list.h:44
#define spa_list_for_each_safe(pos, tmp, head, member)
Definition: list.h:129
struct spa_list ports[2]
list of input and output ports
Definition: graph.h:108
#define spa_debug(...)
Definition: graph.h:47
@ SPA_DIRECTION_OUTPUT
Definition: defs.h:80
struct spa_graph * graph
owner graph
Definition: graph.h:107
uint32_t port_id
Definition: buffers.c:47
struct graph * graph
Definition: module-filter-chain.c:157
uint32_t flags
Definition: filter.c:95
void spa_graph_node_set_subgraph(struct spa_graph_node *node, struct spa_graph *subgraph)
Definition: graph.h:248
int spa_graph_link_trigger(struct spa_graph_link *link)
Definition: graph.h:77
int spa_graph_node_impl_process(void *data, struct spa_graph_node *node)
Definition: graph.h:331
struct spa_graph_link graph_link
link in graph
Definition: graph.h:112
struct spa_graph_port * peer
peer
Definition: graph.h:136
void spa_graph_port_add(struct spa_graph_node *node, struct spa_graph_port *port)
Definition: graph.h:299
void spa_graph_link_remove(struct spa_graph_link *link)
Definition: graph.h:212
int(* process)(void *data, struct spa_graph_node *node)
Definition: graph.h:100
int spa_graph_node_impl_sub_process(void *data, struct spa_graph_node *node)
Definition: graph.h:236
void spa_graph_node_remove(struct spa_graph_node *node)
Definition: graph.h:276
int spa_graph_node_impl_reuse_buffer(void *data, struct spa_graph_node *node, uint32_t port_id, uint32_t buffer_id)
Definition: graph.h:343
void spa_graph_port_init(struct spa_graph_port *port, enum spa_direction direction, uint32_t port_id, uint32_t flags)
Definition: graph.h:287
int spa_graph_node_trigger(struct spa_graph_node *node)
Definition: graph.h:139
#define SPA_STATUS_OK
Definition: io.h:94
struct spa_graph_state * state
state of the node
Definition: graph.h:111
#define SPA_CALLBACKS_INIT(_funcs, _data)
Initialize the set of functions funcs as a spa_callbacks, together with _data.
Definition: hook.h:142
enum spa_direction direction
Definition: buffers.c:46
struct spa_list links
list of links to next nodes
Definition: graph.h:109
struct spa_graph * subgraph
subgraph or NULL
Definition: graph.h:113
#define SPA_VERSION_GRAPH_NODE_CALLBACKS
Definition: graph.h:97
int32_t pending
number of pending signals
Definition: graph.h:58
struct spa_list nodes
Definition: graph.h:93
#define spa_list_append(list, item)
Definition: list.h:81
void spa_graph_node_add(struct spa_graph *graph, struct spa_graph_node *node)
Definition: graph.h:265