Remove direction

Direction is tied to the port id.
Handle nodes with fixed ports.
This commit is contained in:
Wim Taymans 2016-08-29 18:31:53 +02:00
parent 7d8e2d53f7
commit 9485bd77e7
25 changed files with 246 additions and 165 deletions

View file

@ -573,11 +573,21 @@ pinos_daemon_find_port (PinosDaemon *daemon,
}
}
if (best == NULL && node_found) {
g_debug ("node %p: making port", n);
best = pinos_node_add_port (n, direction, 0, NULL);
if (best != NULL) {
created_port = TRUE;
break;
guint id;
id = pinos_node_get_free_port_id (n, direction);
if (id != SPA_ID_INVALID) {
g_debug ("node %p: making port with id %u", n, id);
best = pinos_node_add_port (n, id, NULL);
if (best != NULL) {
created_port = TRUE;
break;
}
} else {
g_debug ("node %p: using port with id %u", n, id);
best = pinos_node_find_port_by_id (n, id);
if (best != NULL)
break;
}
}
}