mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
filter-graph: activate nodes after linking
Don't activate the nodes while linking but make a last stage where all the nodes are activated. This makes it possible to better set up the nodes based on the port data.
This commit is contained in:
parent
1bead99daf
commit
f0f9fbb009
1 changed files with 11 additions and 1 deletions
|
|
@ -1462,7 +1462,7 @@ static int impl_activate(void *object, const struct spa_fraction *rate)
|
|||
}
|
||||
}
|
||||
|
||||
/* then link ports and activate */
|
||||
/* then link ports */
|
||||
spa_list_for_each(node, &graph->node_list, link) {
|
||||
desc = node->desc;
|
||||
d = desc->desc;
|
||||
|
|
@ -1515,12 +1515,22 @@ static int impl_activate(void *object, const struct spa_fraction *rate)
|
|||
&port->control_data[i]);
|
||||
d->connect_port(node->hndl[i], port->p, &port->control_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* now activate */
|
||||
spa_list_for_each(node, &graph->node_list, link) {
|
||||
desc = node->desc;
|
||||
d = desc->desc;
|
||||
|
||||
for (i = 0; i < node->n_hndl; i++) {
|
||||
if (d->activate)
|
||||
d->activate(node->hndl[i]);
|
||||
if (node->control_changed && d->control_changed)
|
||||
d->control_changed(node->hndl[i]);
|
||||
}
|
||||
}
|
||||
|
||||
spa_filter_graph_emit_props_changed(&impl->hooks, SPA_DIRECTION_INPUT);
|
||||
return 0;
|
||||
error:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue