From 259b3a7088f0cd40bc2aaf20809664acd3f44388 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 10 Jul 2023 11:50:49 +0200 Subject: [PATCH] MT#57719 call: introduce `media_subscription` and according objects Initial introduction of objects we need to handle for media subscriptions implementation: - `struct media_subscription` - `media_subscribers` and `media_subscribers_ht` (quick access) - `media_subscriptions` and `media_subscriptions_ht` (quick access) Change-Id: Ia2c4555cd7f4bcfe149bdb9f25081e0b3078042e --- include/call.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/call.h b/include/call.h index 5a7c5b8fc..25c47aed1 100644 --- a/include/call.h +++ b/include/call.h @@ -437,6 +437,12 @@ struct call_media { unsigned int buffer_delay; + /* media subsriptions handling */ + GHashTable * media_subscriptions_ht; /* for quick lookup of our subsriptions */ + GHashTable * media_subscribers_ht; /* for quick lookup of medias subscribed to us */ + GQueue media_subscribers; /* who is subscribed to this media (sinks) */ + GQueue media_subscriptions; /* who am I subscribed to (sources) */ + mutex_t dtmf_lock; unsigned long dtmf_ts; /* TS of last processed end event */ unsigned int dtmf_count; @@ -472,6 +478,13 @@ struct call_subscription { struct sink_attrs attrs; }; +struct media_subscription { + struct call_media * media; /* media itself */ + struct call_monologue * monologue; /* whom media belongs to */ + struct sink_attrs attrs; /* attributes to passed to a sink */ + GList * link; /* TODO: is this still really needed? */ +}; + /** * Half a dialogue. * Protected by call->master_lock, except the RO elements.