ao_pipewire: set media role during init()

wireplumber uses the media role when the node is first created.
To have the property available at this point reliably we need to set it
directly when creating the stream/node.
This commit is contained in:
Thomas Weißschuh authored and sfan5 committed 2023-07-31 14:01:44 +02:00
1 parent 6e023547ea
commit b3b7ee8f4c
1 file changed
+1 -1
+1 -1
View File
@@ -553,7 +553,7 @@ static int init(struct ao *ao)
struct pw_properties *props = pw_properties_new(
PW_KEY_MEDIA_TYPE, "Audio",
PW_KEY_MEDIA_CATEGORY, "Playback",
PW_KEY_MEDIA_ROLE, "Movie",
PW_KEY_MEDIA_ROLE, ao->init_flags & AO_INIT_MEDIA_ROLE_MUSIC ? "Music" : "Movie",
PW_KEY_NODE_NAME, ao->client_name,
PW_KEY_NODE_DESCRIPTION, ao->client_name,
PW_KEY_APP_NAME, ao->client_name,