mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
jack: also find port by aliases
one can also use the aliases to connect ports, qjackctl does this. Fixes #527
This commit is contained in:
parent
134f27a201
commit
776147c125
1 changed files with 6 additions and 1 deletions
|
|
@ -546,7 +546,9 @@ static struct object *find_port(struct client *c, const char *name)
|
||||||
struct object *o;
|
struct object *o;
|
||||||
|
|
||||||
spa_list_for_each(o, &c->context.ports, link) {
|
spa_list_for_each(o, &c->context.ports, link) {
|
||||||
if (!strcmp(o->port.name, name))
|
if (strcmp(o->port.name, name) == 0 ||
|
||||||
|
strcmp(o->port.alias1, name) == 0 ||
|
||||||
|
strcmp(o->port.alias2, name) == 0)
|
||||||
return o;
|
return o;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -3528,6 +3530,8 @@ int jack_port_connected (const jack_port_t *port)
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&c->context.lock);
|
pthread_mutex_unlock(&c->context.lock);
|
||||||
|
|
||||||
|
pw_log_debug(NAME" %p: id:%d res:%d", port, o->id, res);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3564,6 +3568,7 @@ int jack_port_connected_to (const jack_port_t *port,
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
pthread_mutex_unlock(&c->context.lock);
|
pthread_mutex_unlock(&c->context.lock);
|
||||||
|
pw_log_debug(NAME" %p: id:%d name:%s res:%d", port, o->id, port_name, res);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue