filter-graph: pass context to plugins

Make it possible to pass context to plugins and nodes in the
filter-chain.

We can use this to make filters aware of the graph clock or
latency, for example.
This commit is contained in:
Wim Taymans 2026-06-04 16:53:03 +02:00
parent aa075c2a12
commit 5e521d3532
10 changed files with 48 additions and 17 deletions

View file

@ -1278,7 +1278,8 @@ static int setup_filter_graph(struct impl *this, struct filter_graph *g,
res = spa_filter_graph_activate(g->graph,
&SPA_DICT_ITEMS(
SPA_DICT_ITEM(SPA_KEY_AUDIO_RATE, rate_str),
SPA_DICT_ITEM("filter-graph.n_inputs", channels ? in_ports : NULL)));
SPA_DICT_ITEM("filter-graph.n_inputs", channels ? in_ports : NULL)),
0, NULL);
g->setup = res >= 0;