aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2017-01-14 17:11:28 +0100
committerIngo Bauersachs <ingo@jitsi.org>2017-01-14 17:11:28 +0100
commit4ad81d511ab6f77883e40dbbd7515a08950a9b29 (patch)
tree3ac17422bca6ead262951adc1341a8f894f9d1cd /src
parent712e73d685f808048d8a6e0f51554eb07daccc74 (diff)
downloadjitsi-4ad81d511ab6f77883e40dbbd7515a08950a9b29.zip
jitsi-4ad81d511ab6f77883e40dbbd7515a08950a9b29.tar.gz
jitsi-4ad81d511ab6f77883e40dbbd7515a08950a9b29.tar.bz2
Replace deprecated calls to ice4j
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java24
-rw-r--r--src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf1
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java35
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java4
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java2
5 files changed, 34 insertions, 32 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java b/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
index ad8f6fd..872e861 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java
@@ -34,6 +34,7 @@ import net.java.sip.communicator.util.*;
import org.ice4j.ice.*;
import org.jitsi.service.neomedia.*;
+import org.jitsi.service.neomedia.stats.*;
import org.jitsi.service.resources.*;
import org.jitsi.util.*;
@@ -469,7 +470,7 @@ public class CallInfoFrame
StringBuffer stringBuffer,
MediaType mediaType)
{
- MediaStreamStats mediaStreamStats
+ MediaStreamStats2 mediaStreamStats
= mediaStream.getMediaStreamStats();
if(mediaStreamStats == null)
@@ -624,18 +625,19 @@ public class CallInfoFrame
resources.getI18NString(
"service.gui.callinfo.BANDWITH"),
"&darr; "
- + (int) mediaStreamStats.getDownloadRateKiloBitPerSec()
+ + (int) mediaStreamStats.getReceiveStats().getBitrate()/1024
+ " Kbps "
+ " &uarr; "
- + (int) mediaStreamStats.getUploadRateKiloBitPerSec()
+ + (int) mediaStreamStats.getSendStats().getBitrate()/1024
+ " Kbps"));
stringBuffer.append(
getLineString(
resources.getI18NString("service.gui.callinfo.LOSS_RATE"),
- "&darr; " + (int) mediaStreamStats.getDownloadPercentLoss()
+ "&darr;"
+ + (int) (mediaStreamStats.getReceiveStats().getLossRate() * 100)
+ "% &uarr; "
- + (int) mediaStreamStats.getUploadPercentLoss()
+ + (int) (mediaStreamStats.getSendStats().getLossRate() * 100)
+ "%"));
stringBuffer.append(
getLineString(
@@ -668,21 +670,23 @@ public class CallInfoFrame
+ mediaStreamStats.getPacketQueueCountPackets() + "/"
+ mediaStreamStats.getPacketQueueSize() + " packets"));
- long rttMs = mediaStreamStats.getRttMs();
- if(rttMs != -1)
+ long sendRttMs = mediaStreamStats.getSendStats().getRtt();
+ long recvRttMs = mediaStreamStats.getReceiveStats().getRtt();
+ if(recvRttMs != -1 || sendRttMs != -1)
{
stringBuffer.append(
getLineString(resources.getI18NString(
"service.gui.callinfo.RTT"),
- rttMs + " ms"));
+ (recvRttMs != -1 ? "&darr; " + recvRttMs + " ms" : "") +
+ (sendRttMs != -1 ? "&uarr; " + sendRttMs + " ms" : "")));
}
stringBuffer.append(
getLineString(resources.getI18NString(
"service.gui.callinfo.JITTER"),
- "&darr; " + (int) mediaStreamStats.getDownloadJitterMs()
+ "&darr; " + (int) mediaStreamStats.getReceiveStats().getJitter()
+ " ms &uarr; "
- + (int) mediaStreamStats.getUploadJitterMs() + " ms"));
+ + (int) mediaStreamStats.getSendStats().getJitter() + " ms"));
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf b/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
index 95d51fb..2795ef9 100644
--- a/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
+++ b/src/net/java/sip/communicator/impl/gui/swing.ui.manifest.mf
@@ -72,6 +72,7 @@ Import-Package: com.apple.eawt,
org.jitsi.service.neomedia.event,
org.jitsi.service.neomedia.format,
org.jitsi.service.neomedia.recording,
+ org.jitsi.service.neomedia.stats,
org.jitsi.service.resources,
org.jitsi.util,
org.jitsi.util.event,
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java b/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java
index 7305f5c..c3c852c 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java
@@ -397,32 +397,29 @@ public class IceUdpTransportManager
for (int i = 0; i < COMPONENT_IDS.length; i++)
{
Component component = stream.getComponent(COMPONENT_IDS[i]);
-
- if (component != null)
+ if (component == null)
{
- CandidatePair selectedPair = component.getSelectedPair();
-
- if (selectedPair != null)
- {
- DatagramSocket streamConnectorSocket
- = selectedPair.getDatagramSocket();
-
- if (streamConnectorSocket != null)
- {
- streamConnectorSockets[i] = streamConnectorSocket;
- streamConnectorSocketCount++;
- logger.trace("Added a streamConnectorSocket to the array " +
- "StreamConnectorSocket and increased " +
- "the count of streamConnectorSocketCount by one to " +
- streamConnectorSocketCount);
+ continue;
+ }
- }
- }
+ DatagramSocket streamConnectorSocket = component.getSocket();
+ if (streamConnectorSocket != null)
+ {
+ streamConnectorSockets[i] = streamConnectorSocket;
+ streamConnectorSocketCount++;
+ logger.trace("Added a streamConnectorSocket to the array " +
+ "StreamConnectorSocket and increased " +
+ "the count of streamConnectorSocketCount by one to " +
+ streamConnectorSocketCount);
}
}
+
if (streamConnectorSocketCount > 0)
+ {
return streamConnectorSockets;
+ }
}
+
return null;
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java
index 0ea9a54..f2473dd 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesCandidate.java
@@ -87,7 +87,7 @@ public class JingleNodesCandidate
* @return the <tt>RelayedCandidateDatagramSocket</tt> of this
* <tt>RelayedCandidate</tt>
*/
- public synchronized JingleNodesCandidateDatagramSocket
+ private synchronized JingleNodesCandidateDatagramSocket
getRelayedCandidateDatagramSocket()
{
if (jingleNodesCandidateDatagramSocket == null)
@@ -113,7 +113,7 @@ public class JingleNodesCandidate
* <tt>Candidate</tt>
*/
@Override
- public IceSocketWrapper getIceSocketWrapper()
+ protected IceSocketWrapper getCandidateIceSocketWrapper()
{
if (socket == null)
{
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java
index 32ee849..d29be03 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java
@@ -36,7 +36,7 @@ import org.xmpp.jnodes.smack.*;
* @author Sebastien Vincent
*/
public class JingleNodesHarvester
- extends CandidateHarvester
+ extends AbstractCandidateHarvester
{
/**
* The <tt>Logger</tt> used by the <tt>JingleNodesHarvester</tt> class and