mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
use id to store default sink/source
This is easier to handle in general and we should not use the name as a unique id. If the session manager wants to save things, it can use whatever fields it wants from the object to create a unique persistent name.
This commit is contained in:
parent
db0c224b06
commit
266e1301d2
5 changed files with 72 additions and 94 deletions
|
|
@ -1619,8 +1619,10 @@ static void do_default_node(pa_operation *o, void *userdata)
|
|||
if (g == NULL) {
|
||||
error = PA_ERR_NOENTITY;
|
||||
} else if (c->metadata) {
|
||||
char buf[16];
|
||||
snprintf(buf, sizeof(buf), "%d", g->id);
|
||||
pw_metadata_set_property(c->metadata->proxy,
|
||||
PW_ID_CORE, d->key, "text/plain", d->name);
|
||||
PW_ID_CORE, d->key, SPA_TYPE_INFO_BASE"Id", buf);
|
||||
} else {
|
||||
error = PA_ERR_NOTIMPLEMENTED;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue