From 463da03bf305b21912db5e3f6c0a5f0becc3ef9e Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Mon, 30 Sep 2024 08:15:23 +0200 Subject: [PATCH] MT#60476 Deprecate ATTR_LABEL parsing Because not specificially used in rtpengine, just deprecate it. Not to be mixed with the `label=xxx` usage via NG protocol. This will be also required when switching to the sdp create approach, because needs to be delivered via generics to print out SDP. No functional change. Tests had to be fixed accordingly, because of the appeared offset in the list of attributes. Additionally, tests containing coming SDP with a label, but which are within inactive media, don't pass it further. One single example of it is an answer case of "a=mid mixup" test. This is because of `print_sdp_media_section()` specifics, and only printing generics for active media sessions. Change-Id: Iabb44adf17adb5d8e0c5bcad20f527b591b2222c --- daemon/sdp.c | 4 ---- t/auto-daemon-tests.pl | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 1383aac28..fca38e2f8 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -62,7 +62,6 @@ enum attr_id { ATTR_T38MAXBITRATE, ATTR_T38FAXMAXBUFFER, ATTR_MAXPTIME, - ATTR_LABEL, ATTR_TLS_ID, ATTR_END_OF_CANDIDATES, }; @@ -1230,9 +1229,6 @@ static int parse_attribute(struct sdp_attribute *a) { case CSH_LOOKUP("maxptime"): a->attr = ATTR_MAXPTIME; break; - case CSH_LOOKUP("label"): - a->attr = ATTR_LABEL; - break; } return ret; diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index 390e368ca..57dc8fbdc 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -177,7 +177,6 @@ a=sendrecv a=rtcp:PORT m=video PORT RTP/AVP 99 97 126 123 b=TIAS:5952000 -a=label:11 a=mid:2 a=rtpmap:99 H265/90000 a=fmtp:99 level-id=90;max-lsr=125337600;max-lps=2088960;max-tr=22;max-tc=20;max-fps=6000;x-cisco-hevc=529 @@ -191,6 +190,7 @@ a=rtcp-fb:* ccm pan a=rtcp-fb:* nack pli a=rtcp-fb:* ccm fir a=rtcp-fb:* ccm tmmbr +a=label:11 a=answer:full a=extmap:4 http://protocols.cisco.com/timestamp#100us a=cisco-mari-psre:97 ltrf=3 @@ -647,7 +647,6 @@ a=ptime:20 m=video 0 RTP/AVP 99 97 126 123 c=IN IP6 2001:db8:4321::1 b=TIAS:5952000 -a=label:11 a=mid:2 m=application 0 RTP/SAVP 96 c=IN IP4 203.0.113.1 @@ -22755,7 +22754,6 @@ b=CT:10000000 t=0 0 m=audio PORT RTP/AVP 104 9 103 111 8 101 c=IN IP4 203.0.113.1 -a=label:main-audio a=mid:1 a=rtpmap:104 SILK/16000 a=rtpmap:9 G722/8000 @@ -22765,6 +22763,7 @@ a=fmtp:111 bitrate=16000 a=rtpmap:8 PCMA/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-16 +a=label:main-audio a=sendrecv a=rtcp:PORT a=ptime:20