Adds total harvesting time to the call info frame. Updates Ice4j to r339: Adds extra function to export the total harvesting time.

cusax-fix
Vincent Lucas 13 years ago
parent ecd34a073f
commit 8e594b7212

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.TOTAL_HARVESTING_TIME=Total harvesting time
service.gui.callinfo.HARVESTING_TIME=Harvesting time
service.gui.ALWAYS_TRUST=Always trust this certificate

@ -330,6 +330,19 @@ private void constructPeerInfo(CallPeer callPeer, StringBuffer stringBuffer)
"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 @@ 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"));
}
}
}
}
}

@ -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)
{

@ -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;
}
}

@ -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)
{

@ -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;
}
}

@ -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)
{

@ -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);

Loading…
Cancel
Save