impl-node: handle node <-> driver links with node_peer

Also handle the relation between a node and the driver with pw_node_peer,
like we do with the links.

Because these are refcounted, we only make one peer for a node that is
linked to another node that is also the driver (pw-play -> sink) and we
save some fds as well as some admin stuff and overhead for the refcounts.

This in return then results in less problems getting all the refcounts
right when adding/removing nodes.
This commit is contained in:
Wim Taymans 2024-06-14 11:41:14 +02:00
parent 1466d0ae78
commit c89a68b0b4
5 changed files with 30 additions and 31 deletions

View file

@ -225,7 +225,7 @@ static void context_do_profile(void *data)
struct pw_node_activation *na;
struct spa_fraction latency;
if (t->id == id || t->flags & PW_NODE_TARGET_PEER)
if (t->id == id)
continue;
if (n != NULL) {