mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
jack: include application name in client name
This commit is contained in:
parent
2909786eb2
commit
13492fd282
2 changed files with 10 additions and 1 deletions
|
|
@ -1981,18 +1981,26 @@ static void registry_event_global(void *data, uint32_t id,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (strcmp(type, PW_TYPE_INTERFACE_Node) == 0) {
|
if (strcmp(type, PW_TYPE_INTERFACE_Node) == 0) {
|
||||||
|
const char *app;
|
||||||
|
|
||||||
o = alloc_object(c);
|
o = alloc_object(c);
|
||||||
object_type = INTERFACE_Node;
|
object_type = INTERFACE_Node;
|
||||||
|
|
||||||
if ((str = spa_dict_lookup(props, PW_KEY_CLIENT_ID)) != NULL)
|
if ((str = spa_dict_lookup(props, PW_KEY_CLIENT_ID)) != NULL)
|
||||||
o->node.client_id = atoi(str);
|
o->node.client_id = atoi(str);
|
||||||
|
|
||||||
|
app = spa_dict_lookup(props, PW_KEY_APP_NAME);
|
||||||
|
|
||||||
if ((str = spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)) == NULL &&
|
if ((str = spa_dict_lookup(props, PW_KEY_NODE_DESCRIPTION)) == NULL &&
|
||||||
(str = spa_dict_lookup(props, PW_KEY_NODE_NICK)) == NULL &&
|
(str = spa_dict_lookup(props, PW_KEY_NODE_NICK)) == NULL &&
|
||||||
(str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL) {
|
(str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL) {
|
||||||
str = "node";
|
str = "node";
|
||||||
}
|
}
|
||||||
snprintf(o->node.name, sizeof(o->node.name), "%s", str);
|
if (app)
|
||||||
|
snprintf(o->node.name, sizeof(o->node.name), "%s:%s", app, str);
|
||||||
|
else
|
||||||
|
snprintf(o->node.name, sizeof(o->node.name), "%s", str);
|
||||||
|
|
||||||
ot = find_node(c, o->node.name);
|
ot = find_node(c, o->node.name);
|
||||||
if (ot != NULL && o->node.client_id != ot->node.client_id)
|
if (ot != NULL && o->node.client_id != ot->node.client_id)
|
||||||
snprintf(o->node.name, sizeof(o->node.name), "%s-%d", str, id);
|
snprintf(o->node.name, sizeof(o->node.name), "%s-%d", str, id);
|
||||||
|
|
|
||||||
|
|
@ -617,6 +617,7 @@ int pw_impl_node_register(struct pw_impl_node *this,
|
||||||
PW_KEY_DEVICE_ID,
|
PW_KEY_DEVICE_ID,
|
||||||
PW_KEY_PRIORITY_SESSION,
|
PW_KEY_PRIORITY_SESSION,
|
||||||
PW_KEY_PRIORITY_MASTER,
|
PW_KEY_PRIORITY_MASTER,
|
||||||
|
PW_KEY_APP_NAME,
|
||||||
PW_KEY_NODE_DESCRIPTION,
|
PW_KEY_NODE_DESCRIPTION,
|
||||||
PW_KEY_NODE_NAME,
|
PW_KEY_NODE_NAME,
|
||||||
PW_KEY_NODE_NICK,
|
PW_KEY_NODE_NICK,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue