mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
pw-link: --wait: allow linking with nodes
Previously, on new node event, we registered a core sync. Linking was attempted at core sync done but the node did not yet have time to register its ports. Only listen to new ports. This delays the linking attempt to when nodes have had time to create their ports.
This commit is contained in:
parent
6a7d83f051
commit
7ebc1b05d2
1 changed files with 5 additions and 5 deletions
|
|
@ -609,15 +609,15 @@ static void registry_event_global(void *data, uint32_t id, uint32_t permissions,
|
|||
if (props == NULL)
|
||||
return;
|
||||
|
||||
spa_zero(extra);
|
||||
if (spa_streq(type, PW_TYPE_INTERFACE_Node)) {
|
||||
t = OBJECT_NODE;
|
||||
} else if (spa_streq(type, PW_TYPE_INTERFACE_Port)) {
|
||||
if (!d->new_object && d->opt_wait && spa_list_is_empty(&d->target_links)) {
|
||||
d->new_object = true;
|
||||
core_sync(d);
|
||||
}
|
||||
|
||||
spa_zero(extra);
|
||||
if (spa_streq(type, PW_TYPE_INTERFACE_Node)) {
|
||||
t = OBJECT_NODE;
|
||||
} else if (spa_streq(type, PW_TYPE_INTERFACE_Port)) {
|
||||
t = OBJECT_PORT;
|
||||
if ((str = spa_dict_lookup(props, PW_KEY_PORT_DIRECTION)) == NULL)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue