Improves call info frame to show the ICE harvesting time if available. Updates Ice4j to r338: Adds extra function to export harvesting time.

cusax-fix
Vincent Lucas 13 years ago
parent 50ab21656c
commit d67e969a0a

Binary file not shown.

@ -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.HARVESTING_TIME=Harvesting time
service.gui.ALWAYS_TRUST=Always trust this certificate
service.gui.CERT_DIALOG_TITLE=Verify Certificate

@ -275,17 +275,6 @@ private void constructPeerInfo(CallPeer callPeer, StringBuffer stringBuffer)
if(callPeerMediaHandler != null)
{
String iceState = callPeerMediaHandler.getICEState();
if(iceState != null && !iceState.equals("Terminated"))
{
stringBuffer.append(getLineString(
resources.getI18NString(
"service.gui.callinfo.ICE_STATE"),
resources.getI18NString(
"service.gui.callinfo.ICE_STATE." + iceState)));
}
MediaStream mediaStream =
callPeerMediaHandler.getStream(MediaType.AUDIO);
@ -328,6 +317,45 @@ private void constructPeerInfo(CallPeer callPeer, StringBuffer stringBuffer)
stringBuffer,
MediaType.VIDEO);
}
stringBuffer.append("<br/>");
// ICE state
String iceState = callPeerMediaHandler.getICEState();
if(iceState != null && !iceState.equals("Terminated"))
{
stringBuffer.append(getLineString(
resources.getI18NString(
"service.gui.callinfo.ICE_STATE"),
resources.getI18NString(
"service.gui.callinfo.ICE_STATE." + iceState)));
}
// Current harvester time if ICE agent is harvesting.
String[] harvesterNames =
{
"GoogleTurnCandidateHarvester",
"GoogleTurnSSLCandidateHarvester",
"HostCandidateHarvester",
"JingleNodesHarvester",
"StunCandidateHarvester",
"TurnCandidateHarvester",
"UPNPHarvester"
};
long harvestingTime;
for(int i = 0; i < harvesterNames.length; ++i)
{
harvestingTime = callPeerMediaHandler.getHarvestingTime(
harvesterNames[i]);
if(harvestingTime != -1)
{
stringBuffer.append(getLineString(
resources.getI18NString(
"service.gui.callinfo.HARVESTING_TIME")
+ " " + harvesterNames[i] + ":",
harvestingTime + " ms"));
}
}
}
}
}

@ -1350,6 +1350,24 @@ public InetSocketAddress getICERemoteRelayedAddress(String streamName)
return null;
}
/**
* 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.
*/
public long getHarvestingTime(String harvesterName)
{
if(iceAgent != null)
{
return iceAgent.getHarvestingTime(harvesterName);
}
return -1;
}
/**
* Retransmit state change events from the Agent to the media handler.
* @param evt the event for state change.

@ -25,7 +25,7 @@
* @author Sebastien Vincent
*/
public class JingleNodesHarvester
implements CandidateHarvester
extends CandidateHarvester
{
/**
* The <tt>Logger</tt> used by the <tt>JingleNodesHarvester</tt> class and

@ -742,6 +742,20 @@ public InetSocketAddress getICELocalRelayedAddress(String streamName)
return null;
}
/**
* 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.
*/
public long getHarvestingTime(String harvesterName)
{
return -1;
}
/**
* Returns the ICE remote relayed address (server or peer relayed).
*

@ -1476,6 +1476,24 @@ public InetSocketAddress getICERemoteRelayedAddress(String streamName)
return null;
}
/**
* 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.
*/
public long getHarvestingTime(String harvesterName)
{
if(iceAgent != null)
{
return iceAgent.getHarvestingTime(harvesterName);
}
return -1;
}
/**
* Retransmit state change events from the Agent.
* @param evt the event for state change.

@ -141,6 +141,20 @@ public InetSocketAddress getICELocalRelayedAddress(String streamName)
return null;
}
/**
* 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.
*/
public long getHarvestingTime(String harvesterName)
{
return -1;
}
/**
* Returns the ICE remote relayed address (server or peer relayed).
*

@ -1576,6 +1576,25 @@ public InetSocketAddress getICERemoteRelayedAddress(String streamName)
: transportManager.getICERemoteRelayedAddress(streamName);
}
/**
* 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.
*/
public long getHarvestingTime(String harvesterName)
{
TransportManager<?> transportManager = getTransportManager();
return
(transportManager == null)
? null
: transportManager.getHarvestingTime(harvesterName);
}
public MediaHandler getMediaHandler()
{
return mediaHandler;

@ -668,6 +668,17 @@ public abstract InetSocketAddress getICELocalRelayedAddress(
public abstract InetSocketAddress getICERemoteRelayedAddress(
String streamName);
/**
* 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.
*/
public abstract long getHarvestingTime(String harvesterName);
/**
* Returns the ICE candidate extended type selected by the given agent.
*

Loading…
Cancel
Save