Browse Source

MT#56465 support "other" for SDP media removal

Change-Id: I25e68dc250f8edb4e32fedbf0b4e3939cffc09ce
pull/1884/head
Richard Fuchs 1 year ago
parent
commit
bd1af0e8b7
3 changed files with 73 additions and 1 deletions
  1. +1
    -1
      daemon/call_interfaces.c
  2. +3
    -0
      docs/ng_control_protocol.md
  3. +69
    -0
      t/auto-daemon-tests.pl

+ 1
- 1
daemon/call_interfaces.c View File

@ -695,7 +695,7 @@ INLINE void ng_sdp_attr_manipulations(const ng_parser_t *parser, sdp_ng_flags *f
static void ng_sdp_media_remove_iter(str *media_type, unsigned int i, helper_arg arg)
{
enum media_type id = codec_get_type(media_type);
if (id == MT_UNKNOWN || id == MT_OTHER)
if (id == MT_UNKNOWN || (id == MT_OTHER && str_cmp(media_type, "other")))
{
ilog(LOG_WARN, "SDP manipulations: unsupported SDP section '" STR_FORMAT "' targeted.",
STR_FMT(media_type));


+ 3
- 0
docs/ng_control_protocol.md View File

@ -1627,6 +1627,9 @@ Examples:
"sdp-media-remove" : ["video"]
IANA-registered media types are understood, or the special type `other` can be
given to remove all media sections with types that are not understood.
## `answer` Message
The `answer` message is identical to the `offer` message, with the additional requirement that the


+ 69
- 0
t/auto-daemon-tests.pl View File

@ -21185,6 +21185,75 @@ SDP
new_call;
offer('SDP media manipulations - remove "other"', { 'sdp-media-remove' => ['other']}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio 2000 RTP/AVP 0
c=IN IP4 198.51.100.1
a=sendrecv
m=video 3000 RTP/AVP 97
c=IN IP4 198.51.100.1
a=rtpmap:97 H264/90000
a=fmtp:97 0-15
a=sendrecv
m=foobar 4000 RTP/AVP 10
c=IN IP4 198.51.100.1
a=rtpmap:10 blah/90000
a=sendrecv
----------------------------------
v=0
o=- 1545997027 1 IN IP4 198.51.100.1
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
m=video PORT RTP/AVP 97
c=IN IP4 203.0.113.1
a=rtpmap:97 H264/90000
a=fmtp:97 0-15
a=sendrecv
a=rtcp:PORT
SDP
answer('SDP media manipulations - remove "other"', { }, <<SDP);
v=0
o=- 1115997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=audio 4000 RTP/AVP 0
c=IN IP4 198.51.100.3
a=sendrecv
m=video 5000 RTP/AVP 97
c=IN IP4 203.0.113.1
a=rtpmap:97 H264/90000
a=fmtp:97 0-15
--------------------------------------
v=0
o=- 1115997027 1 IN IP4 198.51.100.3
s=tester
t=0 0
m=audio PORT RTP/AVP 0
c=IN IP4 203.0.113.1
a=rtpmap:0 PCMU/8000
a=sendrecv
a=rtcp:PORT
m=video PORT RTP/AVP 97
c=IN IP4 203.0.113.1
a=rtpmap:97 H264/90000
a=fmtp:97 0-15
a=sendrecv
a=rtcp:PORT
m=foobar 0 RTP/AVP 0
c=IN IP4 0.0.0.0
SDP
new_call;
offer('SDP media manipulations - remove audio', { ICE => 'remove', DTLS => 'off', SDES => [ 'nonew' ], 'sdp-media-remove' => ['audio']}, <<SDP);
v=0
o=- 1545997027 1 IN IP4 198.51.100.1


Loading…
Cancel
Save