mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 18:18:15 +02:00
config-policy: push endpoints with keep=true to the end of the list when sorting
This ensures that endpoints with keep=false will still have a chance to link when ones with keep=true exist. This also effectively means that role priority does not matter when keep=true: we keep these links active no matter what, while policy still applies normally for all others. For example, a final sorted list with these endpoints will end up looking like this: * ep1, role priority=25, keep=false * ep2, role priority=20, keep=false * ep3, role priority=25, keep=true * ep4, role priority=75, keep=true ... which will effectively cause ep1, ep3 and ep4 to be linked.
This commit is contained in:
parent
729aee5c4c
commit
40e4ce8909
1 changed files with 4 additions and 0 deletions
|
|
@ -304,6 +304,10 @@ link_info_compare_func (gconstpointer a, gconstpointer b, gpointer data)
|
|||
guint priority_b = 0;
|
||||
gint res = 0;
|
||||
|
||||
res = (gint) li_a->keep - (gint) li_b->keep;
|
||||
if (res != 0)
|
||||
return res;
|
||||
|
||||
/* Get the role priority of a */
|
||||
stream_a = wp_base_endpoint_get_stream (target, li_a->stream_id);
|
||||
if (stream_a)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue