do not just assume rtcp-mux

This commit is contained in:
Daniel Gultsch 2020-04-21 09:11:17 +02:00
parent 8b79808f02
commit d5e3d13158

View file

@ -14,6 +14,7 @@ import java.util.Locale;
import java.util.Map; import java.util.Map;
import eu.siacs.conversations.Config; import eu.siacs.conversations.Config;
import eu.siacs.conversations.xml.Namespace;
import eu.siacs.conversations.xmpp.jingle.stanzas.Group; import eu.siacs.conversations.xmpp.jingle.stanzas.Group;
import eu.siacs.conversations.xmpp.jingle.stanzas.IceUdpTransportInfo; import eu.siacs.conversations.xmpp.jingle.stanzas.IceUdpTransportInfo;
import eu.siacs.conversations.xmpp.jingle.stanzas.RtpDescription; import eu.siacs.conversations.xmpp.jingle.stanzas.RtpDescription;
@ -53,11 +54,6 @@ public class SessionDescription {
} }
} }
public static SessionDescription parse(final Map<String, RtpContentMap.DescriptionTransport> contents) {
final SessionDescriptionBuilder sessionDescriptionBuilder = new SessionDescriptionBuilder();
return sessionDescriptionBuilder.createSessionDescription();
}
public static SessionDescription parse(final String input) { public static SessionDescription parse(final String input) {
final SessionDescriptionBuilder sessionDescriptionBuilder = new SessionDescriptionBuilder(); final SessionDescriptionBuilder sessionDescriptionBuilder = new SessionDescriptionBuilder();
MediaBuilder currentMediaBuilder = null; MediaBuilder currentMediaBuilder = null;
@ -251,7 +247,10 @@ public class SessionDescription {
//random additional attributes //random additional attributes
mediaAttributes.put("rtcp", "9 IN IP4 0.0.0.0"); mediaAttributes.put("rtcp", "9 IN IP4 0.0.0.0");
mediaAttributes.put("sendrecv", ""); mediaAttributes.put("sendrecv", "");
mediaAttributes.put("rtcp-mux", "");
if (description.hasChild("rtcp-mux", Namespace.JINGLE_APPS_RTP)) {
mediaAttributes.put("rtcp-mux", "");
}
final MediaBuilder mediaBuilder = new MediaBuilder(); final MediaBuilder mediaBuilder = new MediaBuilder();
mediaBuilder.setMedia(description.getMedia().toString().toLowerCase(Locale.ROOT)); mediaBuilder.setMedia(description.getMedia().toString().toLowerCase(Locale.ROOT));