mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-04-23 10:00:39 +02:00
session: select the default endpoint based on endpoint priority
This commit is contained in:
parent
1d00104642
commit
bb3a91bd36
2 changed files with 5 additions and 1 deletions
|
|
@ -239,6 +239,8 @@ do_export (WpPwAudioSoftdspEndpoint *self)
|
|||
wp_proxy_get_global_id (WP_PROXY (self->proxy_node)));
|
||||
wp_properties_set (extra_props, PW_KEY_ENDPOINT_CLIENT_ID,
|
||||
wp_properties_get (props, PW_KEY_CLIENT_ID));
|
||||
wp_properties_setf (extra_props, "endpoint.priority", "%d",
|
||||
wp_base_endpoint_get_priority (WP_BASE_ENDPOINT (self)));
|
||||
|
||||
wp_exported_endpoint_update_properties (self->exported_ep, props);
|
||||
wp_exported_endpoint_update_properties (self->exported_ep, extra_props);
|
||||
|
|
|
|||
|
|
@ -44,8 +44,10 @@ select_new_default_ep (struct module_data * data, WpDefaultEndpointType type,
|
|||
if (priority_str)
|
||||
priority = atoi (priority_str);
|
||||
|
||||
if (priority >= max_priority)
|
||||
if (priority >= max_priority) {
|
||||
best_id = id;
|
||||
max_priority = priority;
|
||||
}
|
||||
}
|
||||
|
||||
def_id = wp_session_get_default_endpoint (WP_SESSION (data->session), type);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue