pulse-server: implement stream-restore EVENT

Add method to update the client routes. Add an event when the client
routes changed.

Listen for route_changed events on clients that do a subscribe on the
stream-restore extension. Emit an EVENT when the routes change.

This keeps the system notifications volumes in sync between
gnome-control center and pavucontrol and probably in other tools
as well.

Fixes #3805
This commit is contained in:
Wim Taymans 2024-01-23 13:28:44 +01:00
parent d71fb40989
commit ac91c0dc1c
4 changed files with 138 additions and 13 deletions

View file

@ -989,12 +989,8 @@ static void manager_metadata(void *data, struct pw_manager_object *o,
if (changed)
send_default_change_subscribe_event(client, true, true);
}
if (subject == PW_ID_CORE && o == client->metadata_routes) {
if (key == NULL)
pw_properties_clear(client->routes);
else
pw_properties_set(client->routes, key, value);
}
if (subject == PW_ID_CORE && o == client->metadata_routes)
client_update_routes(client, key, value);
}