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

@ -116,7 +116,9 @@ struct sm_endpoint_stream {
struct sm_endpoint *endpoint;
struct spa_list link; /**< link in endpoint stream_list */
#define SM_STREAM_CHANGE_MASK_INFO (1<<0)
struct spa_list link_list; /**< list of links */
#define SM_ENDPOINT_STREAM_CHANGE_MASK_INFO (1<<0)
uint32_t mask; /**< monitored info */
uint32_t avail; /**< available info */
uint32_t changed; /**< changed since last update */
@ -126,8 +128,14 @@ struct sm_endpoint_stream {
struct sm_endpoint_link {
struct sm_object obj;
struct spa_list link;
struct spa_list link; /**< link in session link_list */
struct spa_list output_link;
struct sm_endpoint_stream *output;
struct spa_list input_link;
struct sm_endpoint_stream *input;
#define SM_ENDPOINT_LINK_CHANGE_MASK_INFO (1<<0)
uint32_t mask; /**< monitored info */
uint32_t avail; /**< available info */
uint32_t changed; /**< changed since last update */