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.
keep=true should work in both ways:
* keep the endpoint with this property linked at all times
* keep other already linked endpoints when linking this one
This is no longer needed since we sort endpoints by role priority
before trying to link them and we link only the highest priority one.
After this sorting, the highest priority endpoint is guaranteed
to be able to link, so _can_link_stream() always returns TRUE.
Clear self->pending_endpoint before sending the done signal,
because the signal will trigger a new endpoint to be added in the
unit test and this may happen before g_clear_object is called,
in which case adding the new endpoint fails
The role defined in the endpoint-link configuration files must have higher
priority than the one set in the endpoint. If none of them are set, the config
policy fallbacks to the lowest one defined in the streams configuration file