mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
jack: also find uuid for monitor nodes
This commit is contained in:
parent
40cbcf2887
commit
2ce1dc113e
1 changed files with 7 additions and 3 deletions
|
|
@ -3203,20 +3203,24 @@ char *jack_get_uuid_for_client_name (jack_client_t *client,
|
||||||
struct client *c = (struct client *) client;
|
struct client *c = (struct client *) client;
|
||||||
struct object *o;
|
struct object *o;
|
||||||
char *uuid = NULL;
|
char *uuid = NULL;
|
||||||
|
bool monitor;
|
||||||
|
|
||||||
spa_return_val_if_fail(c != NULL, NULL);
|
spa_return_val_if_fail(c != NULL, NULL);
|
||||||
spa_return_val_if_fail(client_name != NULL, NULL);
|
spa_return_val_if_fail(client_name != NULL, NULL);
|
||||||
|
|
||||||
|
monitor = spa_strendswith(client_name, MONITOR_EXT);
|
||||||
|
|
||||||
pthread_mutex_lock(&c->context.lock);
|
pthread_mutex_lock(&c->context.lock);
|
||||||
|
|
||||||
spa_list_for_each(o, &c->context.nodes, link) {
|
spa_list_for_each(o, &c->context.nodes, link) {
|
||||||
if (spa_streq(o->node.name, client_name)) {
|
if (spa_streq(o->node.name, client_name) ||
|
||||||
|
(monitor && spa_strneq(o->node.name, client_name,
|
||||||
|
strlen(client_name) - strlen(MONITOR_EXT)))) {
|
||||||
uuid = spa_aprintf( "%" PRIu64, client_make_uuid(o->id));
|
uuid = spa_aprintf( "%" PRIu64, client_make_uuid(o->id));
|
||||||
pw_log_debug(NAME" %p: name %s -> %s",
|
|
||||||
client, client_name, uuid);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pw_log_debug(NAME" %p: name %s -> %s", client, client_name, uuid);
|
||||||
pthread_mutex_unlock(&c->context.lock);
|
pthread_mutex_unlock(&c->context.lock);
|
||||||
return uuid;
|
return uuid;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue