jack: avoid metadata updates to monitor nodes

Because there is no difference in the node id of the monitor and
the sink carla has problems.

See #1945
This commit is contained in:
Wim Taymans 2021-12-24 11:30:56 +01:00
parent 1f4d3b0a1b
commit 4c0bba953a
2 changed files with 10 additions and 5 deletions

View file

@ -196,10 +196,12 @@ static int update_property(struct client *c,
}
pthread_mutex_unlock(&globals.lock);
if (c->property_callback && changed)
if (c->property_callback && changed) {
pw_log_info("emit %lu %s", subject, key);
c->property_callback(subject, key, change, c->property_arg);
}
return 0;
return changed;
}
@ -222,14 +224,17 @@ int jack_set_property(jack_client_t*client,
if (c->metadata == NULL)
goto done;
if (subject & (1<<30))
goto done;
id = jack_uuid_to_index(subject);
if (type == NULL)
type = "";
pw_log_info("set id:%u (%"PRIu64") '%s' to '%s@%s'", id, subject, key, value, type);
update_property(c, id, key, type, value);
pw_metadata_set_property(c->metadata->proxy, id, key, type, value);
if (update_property(c, subject, key, type, value))
pw_metadata_set_property(c->metadata->proxy, id, key, type, value);
res = 0;
done:
pw_thread_loop_unlock(c->context.loop);

View file

@ -54,7 +54,7 @@ jack_uuid_t jack_port_uuid_generate (uint32_t port_id)
SPA_EXPORT
uint32_t jack_uuid_to_index (jack_uuid_t id)
{
return (id & 0xffffffff) - 1;
return (id & 0xffffff) - 1;
}
SPA_EXPORT