si-standard-link: treat endpoints as devices when linking stream<->endpoint

This avoids reconfiguring endpoint nodes when re-linking streams
to their endpoint after having been corked by the policy.

This is not ideal, the logic here needs some refinement.
This commit is contained in:
George Kiagiadakis 2021-06-10 14:49:37 +03:00
parent cead4dffb8
commit 558ab50367

View file

@ -375,11 +375,23 @@ configure_and_link_adapters (WpSiStandardLink *self,
str = wp_session_item_get_property (WP_SESSION_ITEM (si_in), "is.device");
in_is_device = str && pw_properties_parse_bool (str);
str = wp_session_item_get_property (WP_SESSION_ITEM (si_out), "si.factory.name");
out_is_device = (str && !g_strcmp0 (str, "si-audio-endpoint") && !in_is_device)
|| out_is_device;
str = wp_session_item_get_property (WP_SESSION_ITEM (si_in), "si.factory.name");
in_is_device = (str && !g_strcmp0 (str, "si-audio-endpoint") && !out_is_device)
|| in_is_device;
str = wp_session_item_get_property (WP_SESSION_ITEM (si_out), "dont.remix");
out_dont_remix = str && pw_properties_parse_bool (str);
str = wp_session_item_get_property (WP_SESSION_ITEM (si_in), "dont.remix");
in_dont_remix = str && pw_properties_parse_bool (str);
wp_debug_object (self, "out [device:%d, dont_remix %d], "
"in: [device %d, dont_remix %d]",
out_is_device, out_dont_remix,
in_is_device, in_dont_remix);
/* Out is device node, In is not */
if (out_is_device && !in_is_device) {
const gchar *out_mode = NULL;