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.
Unified · Split
| @@ -553,7 +553,7 @@ static int init(struct ao *ao) · 552 unmodified lines | ||
| 553 | 553 | struct pw_properties *props = pw_properties_new( |
| 554 | 554 | PW_KEY_MEDIA_TYPE, "Audio", |
| 555 | 555 | PW_KEY_MEDIA_CATEGORY, "Playback", |
| 556 | − PW_KEY_MEDIA_ROLE, "Movie", | |
| 556 | + PW_KEY_MEDIA_ROLE, ao->init_flags & AO_INIT_MEDIA_ROLE_MUSIC ? "Music" : "Movie", | |
| 557 | 557 | PW_KEY_NODE_NAME, ao->client_name, |
| 558 | 558 | PW_KEY_NODE_DESCRIPTION, ao->client_name, |
| 559 | 559 | PW_KEY_APP_NAME, ao->client_name, |