Browse Source

MT#57719 Deprecate call subscriptions `monologue_subscribe_answer()`

Part 1.

Deprecate usage of the call subscriptions for updating
transcoding attributes, use media subscriptions instead.

Change-Id: Iadde906189c9634d7691d823556f2c0dfd61a655
dzenichev/fictitious
Donat Zenichev 2 years ago
parent
commit
d4f29df6aa
1 changed files with 6 additions and 14 deletions
  1. +6
    -14
      daemon/call.c

+ 6
- 14
daemon/call.c View File

@ -2371,11 +2371,6 @@ static void __update_media_protocol(struct call_media *media, struct call_media
} }
} }
static struct call_subscription *find_subscription(struct call_monologue *ml, struct call_monologue *sub) {
return call_get_call_subscription(ml->subscribers_ht, sub);
}
__attribute__((nonnull(1, 2, 3))) __attribute__((nonnull(1, 2, 3)))
static void codecs_offer(struct call_media *media, struct call_media *other_media, static void codecs_offer(struct call_media *media, struct call_media *other_media,
struct stream_params *sp, struct sdp_ng_flags *flags) struct stream_params *sp, struct sdp_ng_flags *flags)
@ -3453,8 +3448,7 @@ __attribute__((nonnull(1, 2, 3)))
int monologue_subscribe_answer(struct call_monologue *dst_ml, struct sdp_ng_flags *flags, GQueue *streams) { int monologue_subscribe_answer(struct call_monologue *dst_ml, struct sdp_ng_flags *flags, GQueue *streams) {
GList *src_ml_it = dst_ml->subscriptions.head; GList *src_ml_it = dst_ml->subscriptions.head;
unsigned int index = 1; // running counter for input/src medias unsigned int index = 1; // running counter for input/src medias
struct call_subscription *rev_cs = NULL;
struct media_subscription *rev_ms = NULL;
for (GList *l = streams->head; l; l = l->next) { for (GList *l = streams->head; l; l = l->next) {
if (!src_ml_it) if (!src_ml_it)
@ -3462,7 +3456,7 @@ int monologue_subscribe_answer(struct call_monologue *dst_ml, struct sdp_ng_flag
struct stream_params *sp = l->data; struct stream_params *sp = l->data;
struct call_subscription *cs = src_ml_it->data;
struct call_subscription *cs = src_ml_it->data; /* TODO: deprecate me */
struct call_monologue *src_ml = cs->monologue; struct call_monologue *src_ml = cs->monologue;
// grab the matching source ml: // grab the matching source ml:
@ -3475,17 +3469,15 @@ int monologue_subscribe_answer(struct call_monologue *dst_ml, struct sdp_ng_flag
index = 1; // starts over at 1 index = 1; // starts over at 1
cs = src_ml_it->data; cs = src_ml_it->data;
src_ml = cs->monologue; src_ml = cs->monologue;
rev_cs = NULL;
}
if (!rev_cs) {
rev_cs = find_subscription(src_ml, dst_ml);
rev_cs->attrs.transcoding = 0;
} }
struct call_media *dst_media = __get_media(dst_ml, sp, flags, 0); struct call_media *dst_media = __get_media(dst_ml, sp, flags, 0);
struct call_media *src_media = __get_media(src_ml, sp, flags, index++); struct call_media *src_media = __get_media(src_ml, sp, flags, index++);
rev_ms = call_get_media_subscription(src_media->media_subscribers_ht, dst_media);
if (rev_ms)
rev_ms->attrs.transcoding = 0;
__media_init_from_flags(dst_media, NULL, sp, flags); __media_init_from_flags(dst_media, NULL, sp, flags);
if (flags->allow_transcoding) { if (flags->allow_transcoding) {


Loading…
Cancel
Save