diff --git a/lib/installer-exclude/ice4j.jar b/lib/installer-exclude/ice4j.jar index 7c9c00c78..6a2d8c0bb 100644 Binary files a/lib/installer-exclude/ice4j.jar and b/lib/installer-exclude/ice4j.jar differ diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties index 934952f13..395774e25 100644 --- a/resources/languages/resources.properties +++ b/resources/languages/resources.properties @@ -580,6 +580,7 @@ service.gui.callinfo.ICE_LOCAL_RELAYED_ADDRESS=Local relayed IP / Port: service.gui.callinfo.ICE_REMOTE_HOST_ADDRESS=Remote host IP / Port: service.gui.callinfo.ICE_REMOTE_REFLEXIVE_ADDRESS=Remote reflexive IP / Port: service.gui.callinfo.ICE_REMOTE_RELAYED_ADDRESS=Remote relayed IP / Port: +service.gui.callinfo.TOTAL_HARVESTING_TIME=Total harvesting time service.gui.callinfo.HARVESTING_TIME=Harvesting time service.gui.ALWAYS_TRUST=Always trust this certificate 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 ee76dfd5e..1e16e479c 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 @@ private void constructPeerInfo(CallPeer callPeer, StringBuffer stringBuffer) "service.gui.callinfo.ICE_STATE." + iceState))); } + stringBuffer.append("
"); + // 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 @@ private void constructPeerInfo(CallPeer callPeer, StringBuffer stringBuffer) "TurnCandidateHarvester", "UPNPHarvester" }; - long harvestingTime; for(int i = 0; i < harvesterNames.length; ++i) { harvestingTime = callPeerMediaHandler.getHarvestingTime( @@ -355,7 +367,6 @@ private void constructPeerInfo(CallPeer callPeer, StringBuffer stringBuffer) 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 84a69d466..4e239e4d5 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/IceUdpTransportManager.java @@ -1350,6 +1350,21 @@ 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() + { + if(iceAgent != null) + { + return iceAgent.getTotalHarvestingTime(); + } + return -1; + } + /** * Returns the harvesting time (in ms) for the harvester given in parameter. * @@ -1357,7 +1372,7 @@ public InetSocketAddress getICERemoteRelayedAddress(String streamName) * * @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 83f85281b..924f2d1b2 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 InetSocketAddress getICELocalRelayedAddress(String streamName) } /** - * 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 987a50a54..104927b69 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerGTalkImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/TransportManagerGTalkImpl.java @@ -1476,6 +1476,21 @@ 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() + { + if(iceAgent != null) + { + return iceAgent.getTotalHarvestingTime(); + } + return -1; + } + /** * Returns the harvesting time (in ms) for the harvester given in parameter. * @@ -1483,7 +1498,7 @@ public InetSocketAddress getICERemoteRelayedAddress(String streamName) * * @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 de3f99223..d573991a0 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 InetSocketAddress getICELocalRelayedAddress(String streamName) } /** - * 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 bb13bd87c..4a34e7755 100644 --- a/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java +++ b/src/net/java/sip/communicator/service/protocol/media/CallPeerMediaHandler.java @@ -1576,6 +1576,22 @@ public InetSocketAddress getICERemoteRelayedAddress(String streamName) : transportManager.getICERemoteRelayedAddress(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 long getTotalHarvestingTime() + { + TransportManager transportManager = getTransportManager(); + + return + (transportManager == null) + ? null + : transportManager.getTotalHarvestingTime(); + } + /** * Returns the harvesting time (in ms) for the harvester given in parameter. * @@ -1583,7 +1599,7 @@ public InetSocketAddress getICERemoteRelayedAddress(String streamName) * * @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 95e8ce3ad..be7907f6a 100644 --- a/src/net/java/sip/communicator/service/protocol/media/TransportManager.java +++ b/src/net/java/sip/communicator/service/protocol/media/TransportManager.java @@ -668,6 +668,14 @@ public abstract InetSocketAddress getICELocalRelayedAddress( public abstract InetSocketAddress getICERemoteRelayedAddress( 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. * @@ -675,7 +683,7 @@ public abstract InetSocketAddress getICERemoteRelayedAddress( * * @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);