@@ -139,10 +139,7 @@ public class SessionDescription {
attributeMap.put("msid-semantic", " WMS my-media-stream");
- for (Map.Entry<String, RtpContentMap.DescriptionTransport> entry : contentMap.contents.entrySet()) {-- //TODO sprinkle in a few noWhiteSpaces checks into various parameters and types-
+ for (final Map.Entry<String, RtpContentMap.DescriptionTransport> entry : contentMap.contents.entrySet()) {
final String name = entry.getKey();
RtpContentMap.DescriptionTransport descriptionTransport = entry.getValue();
RtpDescription description = descriptionTransport.description;
@@ -235,7 +235,7 @@ public class RtpDescription extends GenericDescription {
final String name = getPayloadTypeName();
Preconditions.checkArgument(name != null, "Payload-type name must not be empty");
SessionDescription.checkNoWhitespace(name, "payload-type name must not contain whitespaces");
- return getId()+" "+name+"/"+getClockRate()+(channels == 1 ? "" : "/"+channels);
+ return getId() + " " + name + "/" + getClockRate() + (channels == 1 ? "" : "/" + channels);
}
public int getIntId() {
@@ -368,7 +368,7 @@ public class RtpDescription extends GenericDescription {
public static String toSdpString(final String id, List<Parameter> parameters) {
final StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(id).append(' ');
- for(int i = 0; i < parameters.size(); ++i) {
+ for (int i = 0; i < parameters.size(); ++i) {
Parameter p = parameters.get(i);
final String name = p.getParameterName();
Preconditions.checkArgument(name != null, String.format("parameter for %s must have a name", id));
@@ -488,7 +488,7 @@ public class RtpDescription extends GenericDescription {
public List<String> getSsrcs() {
ImmutableList.Builder<String> builder = new ImmutableList.Builder<>();
- for(Element child : this.children) {
+ for (Element child : this.children) {
if ("source".equals(child.getName())) {
final String ssrc = child.getAttribute("ssrc");
if (ssrc != null) {
@@ -580,6 +580,9 @@ public class RtpDescription extends GenericDescription {
for (Map.Entry<String, Collection<Source.Parameter>> source : sourceParameterMap.asMap().entrySet()) {
rtpDescription.addChild(new Source(source.getKey(), source.getValue()));
}
+ if (media.attributes.containsKey("rtcp-mux")) {
+ rtpDescription.addChild("rtcp-mux");
+ }
return rtpDescription;
}