aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLyubomir Marinov <lyubomir.marinov@jitsi.org>2013-12-16 15:57:59 +0200
committerLyubomir Marinov <lyubomir.marinov@jitsi.org>2013-12-16 15:57:59 +0200
commit0cd1075f19f17c82d63f708279b9afb4bf960a8e (patch)
treeccc2bc598448cba06ada350e4efbea17d7dcc77a
parentbbbf2a168ecf09392cb18143ff3a5d60522522e9 (diff)
downloadjitsi-0cd1075f19f17c82d63f708279b9afb4bf960a8e.zip
jitsi-0cd1075f19f17c82d63f708279b9afb4bf960a8e.tar.gz
jitsi-0cd1075f19f17c82d63f708279b9afb4bf960a8e.tar.bz2
Fixes an issue which could cause some participants in merged and cross-protocol calls to not hear others or not be heard by others.
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallManager.java7
-rw-r--r--src/net/java/sip/communicator/impl/muc/ServerChatRoomQuery.java1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java14
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/OperationSetResAwareTelephonyJabberImpl.java35
-rw-r--r--src/net/java/sip/communicator/service/protocol/Call.java2
-rw-r--r--src/net/java/sip/communicator/service/protocol/CallConference.java3
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java48
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java2
8 files changed, 60 insertions, 52 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
index bd6d217..3644125 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
@@ -2884,9 +2884,7 @@ public class CallManager
catch (OperationFailedException ofe)
{
logger.error(
- "Could not answer "
- + peer
- + " with video"
+ "Could not answer " + peer + " with video"
+ " because of the following exception: "
+ ofe);
}
@@ -2903,8 +2901,7 @@ public class CallManager
catch (OperationFailedException ofe)
{
logger.error(
- "Could not answer "
- + peer
+ "Could not answer " + peer
+ " because of the following exception: ",
ofe);
}
diff --git a/src/net/java/sip/communicator/impl/muc/ServerChatRoomQuery.java b/src/net/java/sip/communicator/impl/muc/ServerChatRoomQuery.java
index fd8fc23..78edd8a 100644
--- a/src/net/java/sip/communicator/impl/muc/ServerChatRoomQuery.java
+++ b/src/net/java/sip/communicator/impl/muc/ServerChatRoomQuery.java
@@ -11,7 +11,6 @@ import java.util.regex.*;
import net.java.sip.communicator.service.contactsource.*;
import net.java.sip.communicator.service.muc.*;
import net.java.sip.communicator.service.protocol.*;
-import net.java.sip.communicator.util.Logger;
/**
* The <tt>ServerChatRoomQuery</tt> is a query over the
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
index 54857a3..f8404ec 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java
@@ -148,15 +148,11 @@ public class OperationSetBasicTelephonyJabberImpl
Call callOfCallPeer = callPeer.getCall();
- if (callOfCallPeer == call)
- return call;
- else
- {
- // We may have a Google Talk call here.
- if (conference != null)
- callOfCallPeer.setConference(conference);
- return callOfCallPeer;
- }
+ // We may have a Google Talk call here.
+ if ((callOfCallPeer != call) && (conference != null))
+ callOfCallPeer.setConference(conference);
+
+ return callOfCallPeer;
}
/**
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetResAwareTelephonyJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetResAwareTelephonyJabberImpl.java
index cc80738..c675f9d 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetResAwareTelephonyJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetResAwareTelephonyJabberImpl.java
@@ -115,8 +115,10 @@ public class OperationSetResAwareTelephonyJabberImpl
* @throws OperationFailedException with the corresponding code if we fail
* to create the call
*/
- public Call createCall(String uri, String calleeResource,
- CallConference conference)
+ public Call createCall(
+ String uri,
+ String calleeResource,
+ CallConference conference)
throws OperationFailedException
{
CallJabberImpl call = new CallJabberImpl(jabberTelephony);
@@ -125,12 +127,15 @@ public class OperationSetResAwareTelephonyJabberImpl
call.setConference(conference);
String fullCalleeUri
- = (!StringUtils.isNullOrEmpty(calleeResource))
- ? uri + "/" + calleeResource
- : uri;
-
- CallPeer callPeer = jabberTelephony
- .createOutgoingCall(call, uri, fullCalleeUri, null);
+ = StringUtils.isNullOrEmpty(calleeResource)
+ ? uri
+ : uri + "/" + calleeResource;
+ CallPeer callPeer
+ = jabberTelephony.createOutgoingCall(
+ call,
+ uri,
+ fullCalleeUri,
+ null);
if (callPeer == null)
{
@@ -142,14 +147,10 @@ public class OperationSetResAwareTelephonyJabberImpl
Call callOfCallPeer = callPeer.getCall();
- if (callOfCallPeer == call)
- return call;
- else
- {
- // We may have a Google Talk call here.
- if (conference != null)
- callOfCallPeer.setConference(conference);
- return callOfCallPeer;
- }
+ // We may have a Google Talk call here.
+ if ((callOfCallPeer != call) && (conference != null))
+ callOfCallPeer.setConference(conference);
+
+ return callOfCallPeer;
}
}
diff --git a/src/net/java/sip/communicator/service/protocol/Call.java b/src/net/java/sip/communicator/service/protocol/Call.java
index 2a3ea13..00a0ea0 100644
--- a/src/net/java/sip/communicator/service/protocol/Call.java
+++ b/src/net/java/sip/communicator/service/protocol/Call.java
@@ -498,7 +498,9 @@ public abstract class Call
throw new IllegalStateException("conference");
}
else
+ {
setConference(newValue);
+ }
}
return conference;
}
diff --git a/src/net/java/sip/communicator/service/protocol/CallConference.java b/src/net/java/sip/communicator/service/protocol/CallConference.java
index 443aeb0..c009744 100644
--- a/src/net/java/sip/communicator/service/protocol/CallConference.java
+++ b/src/net/java/sip/communicator/service/protocol/CallConference.java
@@ -149,16 +149,19 @@ public class CallConference
private final CallChangeListener callChangeListener
= new CallChangeListener()
{
+ @Override
public void callPeerAdded(CallPeerEvent ev)
{
CallConference.this.onCallPeerEvent(ev);
}
+ @Override
public void callPeerRemoved(CallPeerEvent ev)
{
CallConference.this.onCallPeerEvent(ev);
}
+ @Override
public void callStateChanged(CallChangeEvent ev)
{
CallConference.this.callStateChanged(ev);
diff --git a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java
index 37c6d0b..788dc60 100644
--- a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java
+++ b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java
@@ -340,14 +340,16 @@ public abstract class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>>
* <tt>Call</tt> of {@link #peer} has changed from a specific old value to a
* specific new value.
*
- * @param event a <tt>PropertyChangeEvent</tt> which specified the property
+ * @param ev a <tt>PropertyChangeEvent</tt> which specified the property
* which had its value changed and the old and new values of that property
*/
- private void callPropertyChange(PropertyChangeEvent event)
+ private void callPropertyChange(PropertyChangeEvent ev)
{
- String propertyName = event.getPropertyName();
+ String propertyName = ev.getPropertyName();
+ boolean callConferenceChange
+ = MediaAwareCall.CONFERENCE.equals(propertyName);
- if (MediaAwareCall.CONFERENCE.equals(propertyName)
+ if (callConferenceChange
|| MediaAwareCall.DEFAULT_DEVICE.equals(propertyName))
{
MediaAwareCall<?,?,?> call = getPeer().getCall();
@@ -367,23 +369,29 @@ public abstract class CallPeerMediaHandler<T extends MediaAwareCallPeer<?,?,?>>
if (oldDevice != null)
{
- if (oldDevice instanceof MediaDeviceWrapper)
- {
- oldDevice
- = ((MediaDeviceWrapper) oldDevice)
- .getWrappedDevice();
- }
-
+ /*
+ * DEFAULT_DEVICE signals that the actual/hardware device
+ * has been changed and we will make sure that is the case
+ * in order to avoid unnecessary changes. CONFERENCE signals
+ * that the associated Call has been moved to a new
+ * telephony conference and we have to move its MediaStreams
+ * to the respective mixers.
+ */
+ MediaDevice oldValue
+ = (!callConferenceChange
+ && (oldDevice instanceof MediaDeviceWrapper))
+ ? ((MediaDeviceWrapper) oldDevice)
+ .getWrappedDevice()
+ : oldDevice;
MediaDevice newDevice = getDefaultDevice(mediaType);
- MediaDevice newWrappedDevice = newDevice;
-
- if (newDevice instanceof MediaDeviceWrapper)
- {
- newWrappedDevice
- = ((MediaDeviceWrapper) newDevice)
- .getWrappedDevice();
- }
- if (oldDevice != newWrappedDevice)
+ MediaDevice newValue
+ = (!callConferenceChange
+ && (newDevice instanceof MediaDeviceWrapper))
+ ? ((MediaDeviceWrapper) newDevice)
+ .getWrappedDevice()
+ : newDevice;
+
+ if (oldValue != newValue)
stream.setDevice(newDevice);
}
diff --git a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java
index 9acb782..43ae679 100644
--- a/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java
+++ b/src/net/java/sip/communicator/service/protocol/media/MediaAwareCallConference.java
@@ -66,6 +66,7 @@ public class MediaAwareCallConference
private final PropertyChangeListener propertyChangeListener
= new PropertyChangeListener()
{
+ @Override
public void propertyChange(PropertyChangeEvent ev)
{
MediaAwareCallConference.this.propertyChange(ev);
@@ -534,6 +535,7 @@ public class MediaAwareCallConference
* Notifies this instance about a <tt>PropertyChangeEvent</tt> fired by
* {@link #notifier}.
*/
+ @Override
public void propertyChange(PropertyChangeEvent ev)
{
PropertyChangeListener[] ls;