media-session: also create EndpointLink objects

Create an endpoint link object when linking endpoints. Keep track
of the links in the endpoint_link and cleanup when they are all
gone.

Improve properties on session objects.
This commit is contained in:
Wim Taymans 2019-11-15 17:13:45 +01:00
parent 4ccbce9932
commit 709a52e286
7 changed files with 277 additions and 60 deletions

View file

@ -83,6 +83,10 @@ static int client_session_link_update(void *object,
PW_KEY_FACTORY_ID,
PW_KEY_CLIENT_ID,
PW_KEY_SESSION_ID,
PW_KEY_ENDPOINT_LINK_OUTPUT_ENDPOINT,
PW_KEY_ENDPOINT_LINK_OUTPUT_STREAM,
PW_KEY_ENDPOINT_LINK_INPUT_ENDPOINT,
PW_KEY_ENDPOINT_LINK_INPUT_STREAM,
NULL
};
@ -94,6 +98,8 @@ static int client_session_link_update(void *object,
if (!props)
goto no_mem;
pw_properties_update_keys(props, &session->props->dict, keys);
if (info && info->props)
pw_properties_update_keys(props, info->props, keys);
if (endpoint_link_init(link, link_id, session->info.id,
this, core, props) < 0)