mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
node: add port_id
Decouple the SPA port ids from the pinos port ids, this allows us to more easily link and relink things and do dynamic connection later. Implement multiple output ports on a pinos node.
This commit is contained in:
parent
36bcdaa4bc
commit
e34ef88dac
5 changed files with 213 additions and 89 deletions
|
|
@ -214,12 +214,16 @@ on_port_added (PinosNode *node, PinosDirection direction, guint port_id, PinosCl
|
|||
return;
|
||||
}
|
||||
|
||||
new_port = pinos_node_get_free_port_id (target, pinos_direction_reverse (direction));
|
||||
new_port = pinos_node_get_free_port (target, pinos_direction_reverse (direction));
|
||||
if (new_port == SPA_ID_INVALID) {
|
||||
g_debug ("daemon %p: can't create free port", this);
|
||||
return;
|
||||
}
|
||||
link = pinos_node_link (node, port_id, target, new_port, NULL, NULL);
|
||||
if (direction == PINOS_DIRECTION_OUTPUT)
|
||||
link = pinos_node_link (node, port_id, target, new_port, NULL, NULL);
|
||||
else
|
||||
link = pinos_node_link (target, new_port, node, port_id, NULL, NULL);
|
||||
|
||||
pinos_client_add_object (client, G_OBJECT (link));
|
||||
g_object_unref (link);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue