make static inline -> SPA_API_IMPL

So that we can export the symbols as well.
This commit is contained in:
Wim Taymans 2024-11-20 11:48:08 +01:00
parent 84bd4b7ea9
commit 90b0e45037
91 changed files with 563 additions and 552 deletions

View file

@ -40,7 +40,7 @@ struct spa_graph_state {
int32_t pending; /**< number of pending signals */
};
static inline void spa_graph_state_reset(struct spa_graph_state *state)
SPA_API_IMPL void spa_graph_state_reset(struct spa_graph_state *state)
{
state->pending = state->required;
}
@ -56,7 +56,7 @@ struct spa_graph_link {
#define spa_graph_state_dec(s) (SPA_ATOMIC_DEC(s->pending) == 0)
static inline int spa_graph_link_trigger(struct spa_graph_link *link)
SPA_API_IMPL int spa_graph_link_trigger(struct spa_graph_link *link)
{
struct spa_graph_state *state = link->state;
@ -118,7 +118,7 @@ struct spa_graph_port {
struct spa_graph_port *peer; /**< peer */
};
static inline int spa_graph_node_trigger(struct spa_graph_node *node)
SPA_API_IMPL int spa_graph_node_trigger(struct spa_graph_node *node)
{
struct spa_graph_link *l;
spa_debug("node %p trigger", node);
@ -127,7 +127,7 @@ static inline int spa_graph_node_trigger(struct spa_graph_node *node)
return 0;
}
static inline int spa_graph_run(struct spa_graph *graph)
SPA_API_IMPL int spa_graph_run(struct spa_graph *graph)
{
struct spa_graph_node *n, *t;
struct spa_list pending;
@ -152,27 +152,27 @@ static inline int spa_graph_run(struct spa_graph *graph)
return 0;
}
static inline int spa_graph_finish(struct spa_graph *graph)
SPA_API_IMPL int spa_graph_finish(struct spa_graph *graph)
{
spa_debug("graph %p finish", graph);
if (graph->parent)
return spa_graph_node_trigger(graph->parent);
return 0;
}
static inline int spa_graph_link_signal_node(void *data)
SPA_API_IMPL int spa_graph_link_signal_node(void *data)
{
struct spa_graph_node *node = (struct spa_graph_node *)data;
spa_debug("node %p call process", node);
return spa_graph_node_process(node);
}
static inline int spa_graph_link_signal_graph(void *data)
SPA_API_IMPL int spa_graph_link_signal_graph(void *data)
{
struct spa_graph_node *node = (struct spa_graph_node *)data;
return spa_graph_finish(node->graph);
}
static inline void spa_graph_init(struct spa_graph *graph, struct spa_graph_state *state)
SPA_API_IMPL void spa_graph_init(struct spa_graph *graph, struct spa_graph_state *state)
{
spa_list_init(&graph->nodes);
graph->flags = 0;
@ -180,7 +180,7 @@ static inline void spa_graph_init(struct spa_graph *graph, struct spa_graph_stat
spa_debug("graph %p init state %p", graph, state);
}
static inline void
SPA_API_IMPL void
spa_graph_link_add(struct spa_graph_node *out,
struct spa_graph_state *state,
struct spa_graph_link *link)
@ -191,14 +191,14 @@ spa_graph_link_add(struct spa_graph_node *out,
spa_list_append(&out->links, &link->link);
}
static inline void spa_graph_link_remove(struct spa_graph_link *link)
SPA_API_IMPL void spa_graph_link_remove(struct spa_graph_link *link)
{
link->state->required--;
spa_debug("link %p state %p remove %d", link, link->state, link->state->required);
spa_list_remove(&link->link);
}
static inline void
SPA_API_IMPL void
spa_graph_node_init(struct spa_graph_node *node, struct spa_graph_state *state)
{
spa_list_init(&node->ports[SPA_DIRECTION_INPUT]);
@ -215,7 +215,7 @@ spa_graph_node_init(struct spa_graph_node *node, struct spa_graph_state *state)
}
static inline int spa_graph_node_impl_sub_process(void *data SPA_UNUSED, struct spa_graph_node *node)
SPA_API_IMPL int spa_graph_node_impl_sub_process(void *data SPA_UNUSED, struct spa_graph_node *node)
{
struct spa_graph *graph = node->subgraph;
spa_debug("node %p: sub process %p", node, graph);
@ -227,7 +227,7 @@ static const struct spa_graph_node_callbacks spa_graph_node_sub_impl_default = {
.process = spa_graph_node_impl_sub_process,
};
static inline void spa_graph_node_set_subgraph(struct spa_graph_node *node,
SPA_API_IMPL void spa_graph_node_set_subgraph(struct spa_graph_node *node,
struct spa_graph *subgraph)
{
node->subgraph = subgraph;
@ -235,7 +235,7 @@ static inline void spa_graph_node_set_subgraph(struct spa_graph_node *node,
spa_debug("node %p set subgraph %p", node, subgraph);
}
static inline void
SPA_API_IMPL void
spa_graph_node_set_callbacks(struct spa_graph_node *node,
const struct spa_graph_node_callbacks *callbacks,
void *data)
@ -243,7 +243,7 @@ spa_graph_node_set_callbacks(struct spa_graph_node *node,
node->callbacks = SPA_CALLBACKS_INIT(callbacks, data);
}
static inline void
SPA_API_IMPL void
spa_graph_node_add(struct spa_graph *graph,
struct spa_graph_node *node)
{
@ -255,7 +255,7 @@ spa_graph_node_add(struct spa_graph *graph,
spa_graph_link_add(node, graph->state, &node->graph_link);
}
static inline void spa_graph_node_remove(struct spa_graph_node *node)
SPA_API_IMPL void spa_graph_node_remove(struct spa_graph_node *node)
{
spa_debug("node %p remove from graph %p, state %p required %d",
node, node->graph, node->state, node->state->required);
@ -265,7 +265,7 @@ static inline void spa_graph_node_remove(struct spa_graph_node *node)
}
static inline void
SPA_API_IMPL void
spa_graph_port_init(struct spa_graph_port *port,
enum spa_direction direction,
uint32_t port_id,
@ -277,7 +277,7 @@ spa_graph_port_init(struct spa_graph_port *port,
port->flags = flags;
}
static inline void
SPA_API_IMPL void
spa_graph_port_add(struct spa_graph_node *node,
struct spa_graph_port *port)
{
@ -286,13 +286,13 @@ spa_graph_port_add(struct spa_graph_node *node,
spa_list_append(&node->ports[port->direction], &port->link);
}
static inline void spa_graph_port_remove(struct spa_graph_port *port)
SPA_API_IMPL void spa_graph_port_remove(struct spa_graph_port *port)
{
spa_debug("port %p remove", port);
spa_list_remove(&port->link);
}
static inline void
SPA_API_IMPL void
spa_graph_port_link(struct spa_graph_port *out, struct spa_graph_port *in)
{
spa_debug("port %p link to %p %p %p", out, in, in->node, in->node->state);
@ -300,7 +300,7 @@ spa_graph_port_link(struct spa_graph_port *out, struct spa_graph_port *in)
in->peer = out;
}
static inline void
SPA_API_IMPL void
spa_graph_port_unlink(struct spa_graph_port *port)
{
spa_debug("port %p unlink from %p", port, port->peer);
@ -310,7 +310,7 @@ spa_graph_port_unlink(struct spa_graph_port *port)
}
}
static inline int spa_graph_node_impl_process(void *data, struct spa_graph_node *node)
SPA_API_IMPL int spa_graph_node_impl_process(void *data, struct spa_graph_node *node)
{
struct spa_node *n = (struct spa_node *)data;
struct spa_graph_state *state = node->state;
@ -322,7 +322,7 @@ static inline int spa_graph_node_impl_process(void *data, struct spa_graph_node
return state->status;
}
static inline int spa_graph_node_impl_reuse_buffer(void *data, struct spa_graph_node *node SPA_UNUSED,
SPA_API_IMPL int spa_graph_node_impl_reuse_buffer(void *data, struct spa_graph_node *node SPA_UNUSED,
uint32_t port_id, uint32_t buffer_id)
{
struct spa_node *n = (struct spa_node *)data;