Browse Source

MT#55283 don't "strip" codecs from offerer

The codec `strip` option used to remove codecs not only from the
destination (offer to) monologue, but also from the source (offered by)
monologue. Change this to only affect codecs on the destination
(offering to) side. This fixes a problem of not being able to have
different `strip` options set for different branches.

As a side effect, this breaks existing use cases of using `strip` to
ignore codecs on the source monologue side. This functionality is
restored by adding `codec-ignore` in the following commit.

Change-Id: I022748fffc29caa3a8c96f514b2021f152e43686
pull/1910/head
Richard Fuchs 11 months ago
parent
commit
b61925d264
3 changed files with 6 additions and 10 deletions
  1. +0
    -5
      daemon/call.c
  2. +2
    -1
      docs/ng_control_protocol.md
  3. +4
    -4
      t/auto-daemon-tests.pl

+ 0
- 5
daemon/call.c View File

@ -2452,11 +2452,6 @@ static void codecs_offer(struct call_media *media, struct call_media *other_medi
codec_store_populate(&other_media->codecs, &sp->codecs,
.codec_set = flags->codec_set,
.allow_asymmetric = !!flags->allow_asymmetric_codecs);
codec_store_strip(&other_media->codecs, &flags->codec_strip, flags->codec_except);
codec_store_offer(&other_media->codecs, &flags->codec_offer, &sp->codecs);
if (!other_media->codecs.strip_full)
codec_store_offer(&other_media->codecs, &flags->codec_transcode, &sp->codecs);
codec_store_check_empty(&other_media->codecs, &sp->codecs, flags);
codec_store_accept(&other_media->codecs, &flags->codec_accept, NULL);
codec_store_accept(&other_media->codecs, &flags->codec_consume, &sp->codecs);
codec_store_track(&other_media->codecs, &flags->codec_mask);


+ 2
- 1
docs/ng_control_protocol.md View File

@ -1338,7 +1338,8 @@ The following keys are understood:
can be either from the list of codecs explicitly defined by the SDP through
an `a=rtpmap` attribute, or can be from the list of RFC-defined codecs. Examples
are `PCMU`, `opus`, or `telephone-event`. Codecs stripped using this option
are treated as if they had never been in the SDP.
are only removed from the outgoing rewritten SDP and don't affect the list
of codecs that was offered by the source SDP.
It is possible to specify codec format parameters alongside with the codec name
in the same format as they're written in SDP for codecs that support them,


+ 4
- 4
t/auto-daemon-tests.pl View File

@ -4400,7 +4400,7 @@ m=audio PORT RTP/AVP 8 96
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=fmtp:96 0-16
a=silenceSupp:off - - - -
a=sendrecv
a=rtcp:PORT
@ -4430,7 +4430,7 @@ m=audio PORT RTP/AVP 8 96
c=IN IP4 203.0.113.1
a=rtpmap:8 PCMA/8000
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=fmtp:96 0-16
a=silenceSupp:off - - - -
a=sendrecv
a=rtcp:PORT
@ -24643,9 +24643,9 @@ v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 9
m=audio PORT RTP/AVP 8
c=IN IP4 203.0.113.1
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:PORT
SDP


Loading…
Cancel
Save