MT#60476 print_sdp_media_section: deprecate `is_active` bool

From now on inactive medias are handled in advance
by `handle_sdp_media_attributes()`, so all non-accepted medias
are alsways caught here and never deal with
`print_sdp_media_section()`.

Hence, deprecate `is_active` bool for it and refactor the
implementation of `print_sdp_media_section()`.

Change-Id: Ief7b1de204681373660c74c71c972b289216015c
pull/1870/head
Donat Zenichev 1 year ago
parent 814177119c
commit 14165741ea

@ -2788,8 +2788,7 @@ static void print_sdp_session_section(GString *s, sdp_ng_flags *flags,
static struct packet_stream *print_sdp_media_section(GString *s, struct call_media *media,
struct call_media *source_media,
const sdp_ng_flags *flags,
packet_stream_list *rtp_ps_link,
bool is_active)
packet_stream_list *rtp_ps_link)
{
struct packet_stream *rtp_ps = rtp_ps_link->data;
struct packet_stream *ps_rtcp = NULL;
@ -2799,7 +2798,6 @@ static struct packet_stream *print_sdp_media_section(GString *s, struct call_med
if (media->label.len && flags->siprec)
append_attr_to_gstring(s, "label", &media->label, flags, media->type_id);
if (is_active) {
if (proto_is_rtp(media->protocol))
insert_codec_parameters(s, media, flags);
@ -2843,12 +2841,6 @@ static struct packet_stream *print_sdp_media_section(GString *s, struct call_med
insert_candidates(s, rtp_ps, ps_rtcp, flags, source_media);
}
/* message media type. Cases like: "m=message 28000 TCP/MSRP *" */
} else if (media->type_id == MT_MESSAGE) {
/* handle `a=setup:` */
insert_setup(s, media, flags, false);
}
if ((MEDIA_ISSET(media, TRICKLE_ICE) && media->ice_agent)) {
append_attr_to_gstring(s, "end-of-candidates", NULL, flags, media->type_id);
}
@ -3180,7 +3172,7 @@ void handle_sdp_media_attributes(GString *s, struct call_media *media,
sdp_out_add_bandwidth(s, monologue, media);
/* print media level attributes */
print_sdp_media_section(s, media, source_media, flags, rtp_ps_link, true);
print_sdp_media_section(s, media, source_media, flags, rtp_ps_link);
}

Loading…
Cancel
Save