add <rtcp-mux/> in description

This commit is contained in:
Daniel Gultsch 2020-04-13 15:16:26 +02:00
parent ef22071bd1
commit 493ca68464
3 changed files with 10 additions and 8 deletions

View file

@ -102,6 +102,7 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
private void requestPermissionsAndAcceptCall() { private void requestPermissionsAndAcceptCall() {
if (PermissionUtils.hasPermission(this, ImmutableList.of(Manifest.permission.RECORD_AUDIO), REQUEST_ACCEPT_CALL)) { if (PermissionUtils.hasPermission(this, ImmutableList.of(Manifest.permission.RECORD_AUDIO), REQUEST_ACCEPT_CALL)) {
//TODO like wise the propose; we might just wait here for the audio manager to come up
putScreenInCallMode(); putScreenInCallMode();
requireRtpConnection().acceptCall(); requireRtpConnection().acceptCall();
} }
@ -111,7 +112,8 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
private void putScreenInCallMode() { private void putScreenInCallMode() {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
final JingleRtpConnection rtpConnection = rtpConnectionReference != null ? rtpConnectionReference.get() : null; final JingleRtpConnection rtpConnection = rtpConnectionReference != null ? rtpConnectionReference.get() : null;
if (rtpConnection == null || rtpConnection.getAudioManager().getSelectedAudioDevice() == AppRTCAudioManager.AudioDevice.EARPIECE) { final AppRTCAudioManager audioManager = rtpConnection == null ? null : rtpConnection.getAudioManager();
if (audioManager == null || audioManager.getSelectedAudioDevice() == AppRTCAudioManager.AudioDevice.EARPIECE) {
acquireProximityWakeLock(); acquireProximityWakeLock();
} }
} }

View file

@ -139,10 +139,7 @@ public class SessionDescription {
attributeMap.put("msid-semantic", " WMS my-media-stream"); attributeMap.put("msid-semantic", " WMS my-media-stream");
for (Map.Entry<String, RtpContentMap.DescriptionTransport> entry : contentMap.contents.entrySet()) { for (final Map.Entry<String, RtpContentMap.DescriptionTransport> entry : contentMap.contents.entrySet()) {
//TODO sprinkle in a few noWhiteSpaces checks into various parameters and types
final String name = entry.getKey(); final String name = entry.getKey();
RtpContentMap.DescriptionTransport descriptionTransport = entry.getValue(); RtpContentMap.DescriptionTransport descriptionTransport = entry.getValue();
RtpDescription description = descriptionTransport.description; RtpDescription description = descriptionTransport.description;

View file

@ -580,6 +580,9 @@ public class RtpDescription extends GenericDescription {
for (Map.Entry<String, Collection<Source.Parameter>> source : sourceParameterMap.asMap().entrySet()) { for (Map.Entry<String, Collection<Source.Parameter>> source : sourceParameterMap.asMap().entrySet()) {
rtpDescription.addChild(new Source(source.getKey(), source.getValue())); rtpDescription.addChild(new Source(source.getKey(), source.getValue()));
} }
if (media.attributes.containsKey("rtcp-mux")) {
rtpDescription.addChild("rtcp-mux");
}
return rtpDescription; return rtpDescription;
} }