Fixes local audio levels when peer removed from call.

Adds profile-level-id when negotiating video codecs.
Fixes login with msn due to server address changes.
cusax-fix
Damian Minkov 15 years ago
parent 14a65e1148
commit ae4eab7297

@ -13,6 +13,7 @@
import javax.sdp.*;
import net.java.sip.communicator.impl.neomedia.codec.*;
import net.java.sip.communicator.impl.neomedia.codec.video.h264.*;
import net.java.sip.communicator.impl.neomedia.format.*;
import net.java.sip.communicator.service.neomedia.*;
import net.java.sip.communicator.service.neomedia.device.*;
@ -197,6 +198,22 @@ public class MediaUtils
// packetization-mode=1
h264FormatParams.put(packetizationMode, "1");
if(NeomediaActivator.getConfigurationService().getString(
"net.java.sip.communicator.impl.neomedia.codec.video.h264." +
"defaultProfile",
JNIEncoder.MAIN_PROFILE).equals(JNIEncoder.MAIN_PROFILE))
{
// indicates main profile, common features and HD capable level 3.1
h264FormatParams.put("profile-level-id", "4DE01f");
}
else
{
// indicates baseline profile, common features
// and HD capable level 3.1
h264FormatParams.put("profile-level-id", "42E01f");
}
addMediaFormats(
MediaFormat.RTP_PAYLOAD_TYPE_UNKNOWN,
"H264",

@ -153,6 +153,8 @@ protected void addCallPeer(T callPeer)
{
// if there's someone listening for audio level events then they'd
// also like to know about the new peer.
// make sure always the fisrt element is the one to listen
// for local audio events
if(getCallPeersVector().isEmpty())
{
callPeer.getMediaHandler().setLocalUserAudioLevelListener(
@ -181,6 +183,8 @@ private void removeCallPeer(CallPeerChangeEvent evt)
if (!getCallPeersVector().contains(callPeer))
return;
int elementPeerIx = getCallPeersVector().indexOf(callPeer);
getCallPeersVector().remove(callPeer);
callPeer.removeCallPeerListener(this);
@ -188,6 +192,15 @@ private void removeCallPeer(CallPeerChangeEvent evt)
{
// remove sound level listeners from the peer
callPeer.getMediaHandler().setLocalUserAudioLevelListener(null);
// if there are more peers and the peer was the first, the one
// that listens for local levels, now lets make sure
// the new first will listen for local level events
if(!getCallPeersVector().isEmpty() && elementPeerIx == 0)
{
getCallPeersVector().firstElement().getMediaHandler()
.setLocalUserAudioLevelListener(localAudioLevelDelegator);
}
}
try

Loading…
Cancel
Save