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

@ -285,6 +285,8 @@ int endpoint_stream_init(struct endpoint_stream *this,
this->id = id;
this->props = properties;
pw_properties_setf(properties, PW_KEY_ENDPOINT_ID, "%u", endpoint_id);
properties = pw_properties_copy(properties);
if (!properties)
goto no_mem;
@ -296,6 +298,8 @@ int endpoint_stream_init(struct endpoint_stream *this,
if (!this->global)
goto no_mem;
pw_properties_setf(this->props, PW_KEY_OBJECT_ID, "%u", this->global->id);
this->info.version = PW_VERSION_ENDPOINT_STREAM_INFO;
this->info.id = this->global->id;
this->info.endpoint_id = endpoint_id;