aboutsummaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorVincent Lucas <chenzo@jitsi.org>2012-10-04 09:14:20 +0000
committerVincent Lucas <chenzo@jitsi.org>2012-10-04 09:14:20 +0000
commit8e594b7212bc6afbedc203b8c39efefce098986c (patch)
tree3ae7c3ba741ef3779506833f9b8660c1eaf271f3 /src/net
parentecd34a073f7c0b6becde169a57bba548941e46b5 (diff)
downloadjitsi-8e594b7212bc6afbedc203b8c39efefce098986c.zip
jitsi-8e594b7212bc6afbedc203b8c39efefce098986c.tar.gz
jitsi-8e594b7212bc6afbedc203b8c39efefce098986c.tar.bz2
Adds total harvesting time to the call info frame. Updates Ice4j to r339: Adds extra function to export the total harvesting time.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallInfoFrame.java15
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java17
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/RawUdpTransportManager.java37
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerGTalkImpl.java17
-rw-r--r--src/net/java/sip/communicator/impl/protocol/sip/TransportManagerSipImpl.java37
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java18
-rw-r--r--src/net/java/sip/communicator/service/protocol/media/TransportManager.java10
7 files changed, 119 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 ee76dfd..1e16e47 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
@@ -330,6 +330,19 @@ public class CallInfoFrame
"service.gui.callinfo.ICE_STATE." + iceState)));
}
+ stringBuffer.append("<br/>");
+ // Total harvesting time.
+ long harvestingTime
+ = callPeerMediaHandler.getTotalHarvestingTime();
+ if(harvestingTime != -1)
+ {
+ stringBuffer.append(getLineString(resources.getI18NString(
+ "service.gui.callinfo.TOTAL_HARVESTING_TIME"
+ )
+ + ":",
+ harvestingTime + " ms"));
+ }
+
// Current harvester time if ICE agent is harvesting.
String[] harvesterNames =
{
@@ -341,7 +354,6 @@ public class CallInfoFrame
"TurnCandidateHarvester",
"UPNPHarvester"
};
- long harvestingTime;
for(int i = 0; i < harvesterNames.length; ++i)
{
harvestingTime = callPeerMediaHandler.getHarvestingTime(
@@ -355,7 +367,6 @@ public class CallInfoFrame
harvestingTime + " ms"));
}
}
-
}
}
}
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 84a69d4..4e239e4 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java
@@ -1351,13 +1351,28 @@ public class IceUdpTransportManager
}
/**
+ * Returns the total harvesting time (in ms) for all harvesters.
+ *
+ * @return The total harvesting time (in ms) for all the harvesters. -1 if
+ * the ICE agent is null, or if the agent has nevers harvested.
+ */
+ public long getTotalHarvestingTime()
+ {
+ if(iceAgent != null)
+ {
+ return iceAgent.getTotalHarvestingTime();
+ }
+ return -1;
+ }
+
+ /**
* Returns the harvesting time (in ms) for the harvester given in parameter.
*
* @param harvesterName The class name if the harvester.
*
* @return The harvesting time (in ms) for the harvester given in parameter.
* -1 if this harvester does not exists, if the ICE agent is null, or if the
- * agent is not currently harvesting with this harvester.
+ * agent has never harvested with this harvester.
*/
public long getHarvestingTime(String harvesterName)
{
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/RawUdpTransportManager.java b/src/net/java/sip/communicator/impl/protocol/jabber/RawUdpTransportManager.java
index 83f8528..924f2d1 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/RawUdpTransportManager.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/RawUdpTransportManager.java
@@ -743,30 +743,41 @@ public class RawUdpTransportManager
}
/**
- * Returns the harvesting time (in ms) for the harvester given in parameter.
+ * Returns the ICE remote relayed address (server or peer relayed).
*
- * @param harvesterName The class name if the harvester.
+ * @param streamName The stream name (AUDIO, VIDEO);
*
- * @return The harvesting time (in ms) for the harvester given in parameter.
- * -1 if this harvester does not exists, if the ICE agent is null, or if the
- * agent is not currently harvesting with this harvester.
+ * @return the ICE remote relayed address. May be null if this transport
+ * manager is not using ICE or if there is no relayed address for the
+ * remote candidate used.
*/
- public long getHarvestingTime(String harvesterName)
+ public InetSocketAddress getICERemoteRelayedAddress(String streamName)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the total harvesting time (in ms) for all harvesters.
+ *
+ * @return The total harvesting time (in ms) for all the harvesters. -1 if
+ * the ICE agent is null, or if the agent has nevers harvested.
+ */
+ public long getTotalHarvestingTime()
{
return -1;
}
/**
- * Returns the ICE remote relayed address (server or peer relayed).
+ * Returns the harvesting time (in ms) for the harvester given in parameter.
*
- * @param streamName The stream name (AUDIO, VIDEO);
+ * @param harvesterName The class name if the harvester.
*
- * @return the ICE remote relayed address. May be null if this transport
- * manager is not using ICE or if there is no relayed address for the
- * remote candidate used.
+ * @return The harvesting time (in ms) for the harvester given in parameter.
+ * -1 if this harvester does not exists, if the ICE agent is null, or if the
+ * agent has never harvested with this harvester.
*/
- public InetSocketAddress getICERemoteRelayedAddress(String streamName)
+ public long getHarvestingTime(String harvesterName)
{
- return null;
+ return -1;
}
}
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerGTalkImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerGTalkImpl.java
index 987a50a..104927b 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerGTalkImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerGTalkImpl.java
@@ -1477,13 +1477,28 @@ public class TransportManagerGTalkImpl
}
/**
+ * Returns the total harvesting time (in ms) for all harvesters.
+ *
+ * @return The total harvesting time (in ms) for all the harvesters. -1 if
+ * the ICE agent is null, or if the agent has nevers harvested.
+ */
+ public long getTotalHarvestingTime()
+ {
+ if(iceAgent != null)
+ {
+ return iceAgent.getTotalHarvestingTime();
+ }
+ return -1;
+ }
+
+ /**
* Returns the harvesting time (in ms) for the harvester given in parameter.
*
* @param harvesterName The class name if the harvester.
*
* @return The harvesting time (in ms) for the harvester given in parameter.
* -1 if this harvester does not exists, if the ICE agent is null, or if the
- * agent is not currently harvesting with this harvester.
+ * agent has never harvested with this harvester.
*/
public long getHarvestingTime(String harvesterName)
{
diff --git a/src/net/java/sip/communicator/impl/protocol/sip/TransportManagerSipImpl.java b/src/net/java/sip/communicator/impl/protocol/sip/TransportManagerSipImpl.java
index de3f992..d573991 100644
--- a/src/net/java/sip/communicator/impl/protocol/sip/TransportManagerSipImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/sip/TransportManagerSipImpl.java
@@ -142,30 +142,41 @@ public class TransportManagerSipImpl extends TransportManager<CallPeerSipImpl>
}
/**
- * Returns the harvesting time (in ms) for the harvester given in parameter.
+ * Returns the ICE remote relayed address (server or peer relayed).
*
- * @param harvesterName The class name if the harvester.
+ * @param streamName The stream name (AUDIO, VIDEO);
*
- * @return The harvesting time (in ms) for the harvester given in parameter.
- * -1 if this harvester does not exists, if the ICE agent is null, or if the
- * agent is not currently harvesting with this harvester.
+ * @return the ICE remote relayed address. May be null if this transport
+ * manager is not using ICE or if there is no relayed address for the
+ * remote candidate used.
*/
- public long getHarvestingTime(String harvesterName)
+ public InetSocketAddress getICERemoteRelayedAddress(String streamName)
+ {
+ return null;
+ }
+
+ /**
+ * Returns the total harvesting time (in ms) for all harvesters.
+ *
+ * @return The total harvesting time (in ms) for all the harvesters. -1 if
+ * the ICE agent is null, or if the agent has nevers harvested.
+ */
+ public long getTotalHarvestingTime()
{
return -1;
}
/**
- * Returns the ICE remote relayed address (server or peer relayed).
+ * Returns the harvesting time (in ms) for the harvester given in parameter.
*
- * @param streamName The stream name (AUDIO, VIDEO);
+ * @param harvesterName The class name if the harvester.
*
- * @return the ICE remote relayed address. May be null if this transport
- * manager is not using ICE or if there is no relayed address for the
- * remote candidate used.
+ * @return The harvesting time (in ms) for the harvester given in parameter.
+ * -1 if this harvester does not exists, if the ICE agent is null, or if the
+ * agent has never harvested with this harvester.
*/
- public InetSocketAddress getICERemoteRelayedAddress(String streamName)
+ public long getHarvestingTime(String harvesterName)
{
- return null;
+ return -1;
}
}
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 bb13bd8..4a34e77 100644
--- a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java
+++ b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java
@@ -1577,13 +1577,29 @@ public abstract class CallPeerMediaHandler
}
/**
+ * Returns the total harvesting time (in ms) for all harvesters.
+ *
+ * @return The total harvesting time (in ms) for all the harvesters. -1 if
+ * the ICE agent is null, or if the agent has nevers harvested.
+ */
+ public long getTotalHarvestingTime()
+ {
+ TransportManager<?> transportManager = getTransportManager();
+
+ return
+ (transportManager == null)
+ ? null
+ : transportManager.getTotalHarvestingTime();
+ }
+
+ /**
* Returns the harvesting time (in ms) for the harvester given in parameter.
*
* @param harvesterName The class name if the harvester.
*
* @return The harvesting time (in ms) for the harvester given in parameter.
* -1 if this harvester does not exists, if the ICE agent is null, or if the
- * agent is not currently harvesting with this harvester.
+ * agent has never harvested with this harvester.
*/
public long getHarvestingTime(String harvesterName)
{
diff --git a/src/net/java/sip/communicator/service/protocol/media/TransportManager.java b/src/net/java/sip/communicator/service/protocol/media/TransportManager.java
index 95e8ce3..be7907f 100644
--- a/src/net/java/sip/communicator/service/protocol/media/TransportManager.java
+++ b/src/net/java/sip/communicator/service/protocol/media/TransportManager.java
@@ -669,13 +669,21 @@ public abstract class TransportManager<U extends MediaAwareCallPeer<?, ?, ?>>
String streamName);
/**
+ * Returns the total harvesting time (in ms) for all harvesters.
+ *
+ * @return The total harvesting time (in ms) for all the harvesters. -1 if
+ * the ICE agent is null, or if the agent has nevers harvested.
+ */
+ public abstract long getTotalHarvestingTime();
+
+ /**
* Returns the harvesting time (in ms) for the harvester given in parameter.
*
* @param harvesterName The class name if the harvester.
*
* @return The harvesting time (in ms) for the harvester given in parameter.
* -1 if this harvester does not exists, if the ICE agent is null, or if the
- * agent is not currently harvesting with this harvester.
+ * agent has never harvested with this harvester.
*/
public abstract long getHarvestingTime(String harvesterName);