mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-07-01 13:14:10 -04:00
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:
parent
aa075c2a12
commit
5e521d3532
10 changed files with 48 additions and 17 deletions
|
|
@ -1269,6 +1269,8 @@ struct impl {
|
|||
|
||||
struct spa_handle *handle;
|
||||
struct spa_filter_graph *graph;
|
||||
struct spa_filter_graph_ctx ctx[3];
|
||||
uint32_t n_ctx;
|
||||
struct spa_hook graph_listener;
|
||||
uint32_t n_inputs;
|
||||
uint32_t n_outputs;
|
||||
|
|
@ -1402,7 +1404,8 @@ static int activate_graph(struct impl *impl)
|
|||
|
||||
snprintf(rate, sizeof(rate), "%lu", impl->rate);
|
||||
res = spa_filter_graph_activate(impl->graph, &SPA_DICT_ITEMS(
|
||||
SPA_DICT_ITEM(SPA_KEY_AUDIO_RATE, rate)));
|
||||
SPA_DICT_ITEM(SPA_KEY_AUDIO_RATE, rate)),
|
||||
impl->n_ctx, impl->ctx);
|
||||
|
||||
if (res >= 0) {
|
||||
struct pw_loop *data_loop = pw_stream_get_data_loop(impl->playback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue