MT#55283 new "mix" flag

Change-Id: I4d1dfa2a38533707e9c0f080377c880fc3b678a5
pull/2092/head
Richard Fuchs 3 weeks ago
parent 826da140e6
commit af991ee58f

@ -4434,9 +4434,25 @@ static int monologue_subscribe_request1(struct call_media *src_media, struct cal
if (ms)
dst_media = ms->media;
if (!dst_media) {
// new media needed
dst_media = call_get_media(dst_ml, &src_media->type, src_media->type_id,
NULL, false, dst_ml->medias->len + 1, mid_tracker_dst);
if (flags->mix) {
// find existing matching media
for (unsigned int i = 0; i < dst_ml->medias->len; i++) {
struct call_media *m = dst_ml->medias->pdata[i];
if (!m)
continue;
if (m->type_id != src_media->type_id)
continue;
if (str_cmp_str(&m->type, &src_media->type))
continue;
dst_media = m;
break;
}
}
if (!dst_media) {
// new media needed
dst_media = call_get_media(dst_ml, &src_media->type, src_media->type_id,
NULL, false, dst_ml->medias->len + 1, mid_tracker_dst);
}
}
/* subscribe dst_ml (subscriber) to src_ml, don't forget to carry the egress flag, if required */

@ -1218,6 +1218,10 @@ void call_ng_flags_flags(str *s, unsigned int idx, helper_arg arg) {
case CSH_LOOKUP("rtcp mirror"):
out->rtcp_mirror = true;
break;
case CSH_LOOKUP("mix"):
case CSH_LOOKUP("mixed"):
out->mix = true;
break;
case CSH_LOOKUP("NAT-wait"):
case CSH_LOOKUP("nat-wait"):
case CSH_LOOKUP("NAT wait"):

@ -1168,6 +1168,19 @@ Spaces in each string may be replaced by hyphens.
this opens a security hole and potentially allows RTP streams to be hijacked, either partly or
in whole.
* `mix`
For a subscribe request to subscribe to multiple source medias (e.g.
subscribe to the audio of both parties to a regular call), instead of
producing one output media per source media (e.g. two output audio media),
produce one output media for each type of source media (e.g. just one
output audio media). All affected RTP flows will then be sent as part of
the same output media.
Not that this doesn't enable actual audio mixing. The `audio player`
feature can be used to produce a single mixed output audio stream which
combines all audio input into one.
* `NAT-wait`
Prevents forwarding media packets to the respective endpoint

@ -223,6 +223,7 @@ RTPE_NG_FLAGS_STR_CASE_HT_PARAMS
bundle_strict:1,
ice_reject:1,
rtcp_mirror:1,
mix:1,
trickle_ice:1,
no_rtcp_attr:1,
no_tls_id:1,

Loading…
Cancel
Save