Fixes the Ant target rebuild, warnings.
This commit is contained in:
parent
4c132cccd6
commit
d5c2fa6c8d
@ -1,6 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="src" path="src"/>
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="src" path="test"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="lib" path="lib/jain-sdp.jar"/>
|
<classpathentry kind="lib" path="lib/jain-sdp.jar"/>
|
||||||
<classpathentry kind="lib" path="lib/junit.jar"/>
|
<classpathentry kind="lib" path="lib/junit.jar"/>
|
||||||
|
|||||||
@ -26,8 +26,7 @@ import org.ice4j.*;
|
|||||||
* @author Emil Ivov
|
* @author Emil Ivov
|
||||||
* @author Lyubomir Marinov
|
* @author Lyubomir Marinov
|
||||||
*/
|
*/
|
||||||
public abstract class Candidate
|
public abstract class Candidate<T extends Candidate<?>>
|
||||||
<T extends Candidate<?>>
|
|
||||||
implements Comparable<T>
|
implements Comparable<T>
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -245,14 +245,15 @@ public class Ice
|
|||||||
Component remoteComponent)
|
Component remoteComponent)
|
||||||
{
|
{
|
||||||
List<LocalCandidate> remoteCandidates
|
List<LocalCandidate> remoteCandidates
|
||||||
= remoteComponent.getLocalCandidates();
|
= remoteComponent.getLocalCandidates();
|
||||||
|
|
||||||
localComponent.setDefaultRemoteCandidate(
|
localComponent.setDefaultRemoteCandidate(
|
||||||
remoteComponent.getDefaultCandidate());
|
remoteComponent.getDefaultCandidate());
|
||||||
|
|
||||||
for(Candidate rCand : remoteCandidates)
|
for(Candidate<?> rCand : remoteCandidates)
|
||||||
{
|
{
|
||||||
localComponent.addRemoteCandidate(new RemoteCandidate(
|
localComponent.addRemoteCandidate(
|
||||||
|
new RemoteCandidate(
|
||||||
rCand.getTransportAddress(),
|
rCand.getTransportAddress(),
|
||||||
localComponent,
|
localComponent,
|
||||||
rCand.getType(),
|
rCand.getType(),
|
||||||
|
|||||||
@ -9,13 +9,13 @@ package test;
|
|||||||
import java.beans.*;
|
import java.beans.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.*;
|
import java.net.*;
|
||||||
import java.util.*;
|
|
||||||
import java.util.logging.*;
|
import java.util.logging.*;
|
||||||
|
|
||||||
import org.ice4j.*;
|
import org.ice4j.*;
|
||||||
import org.ice4j.ice.*;
|
import org.ice4j.ice.*;
|
||||||
import org.ice4j.ice.harvest.*;
|
import org.ice4j.ice.harvest.*;
|
||||||
import org.ice4j.security.*;
|
|
||||||
import org.ice4j.pseudotcp.*;
|
import org.ice4j.pseudotcp.*;
|
||||||
|
import org.ice4j.security.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sample program which first uses ICE to discover UDP connectivity. After that
|
* Sample program which first uses ICE to discover UDP connectivity. After that
|
||||||
@ -143,13 +143,16 @@ public class IcePseudoTcp
|
|||||||
|
|
||||||
Object iceProcessingState = evt.getNewValue();
|
Object iceProcessingState = evt.getNewValue();
|
||||||
|
|
||||||
logger.log(Level.INFO,
|
logger.log(
|
||||||
"Local agent entered the " + iceProcessingState + " state.");
|
Level.INFO,
|
||||||
|
"Local agent entered the " + iceProcessingState
|
||||||
|
+ " state.");
|
||||||
if (iceProcessingState == IceProcessingState.COMPLETED)
|
if (iceProcessingState == IceProcessingState.COMPLETED)
|
||||||
{
|
{
|
||||||
logger.log(Level.INFO,
|
logger.log(
|
||||||
"Local - Total ICE processing time: "
|
Level.INFO,
|
||||||
+ (processingEndTime - startTime) + "ms");
|
"Local - Total ICE processing time: "
|
||||||
|
+ (processingEndTime - startTime) + "ms");
|
||||||
Agent agent = (Agent) evt.getSource();
|
Agent agent = (Agent) evt.getSource();
|
||||||
logger.log(Level.INFO, "Local: Create pseudo tcp stream");
|
logger.log(Level.INFO, "Local: Create pseudo tcp stream");
|
||||||
IceMediaStream dataStream = agent.getStream("data");
|
IceMediaStream dataStream = agent.getStream("data");
|
||||||
@ -157,8 +160,10 @@ public class IcePseudoTcp
|
|||||||
CandidatePair selectedPair = udpComponent.getSelectedPair();
|
CandidatePair selectedPair = udpComponent.getSelectedPair();
|
||||||
if (selectedPair != null)
|
if (selectedPair != null)
|
||||||
{
|
{
|
||||||
LocalCandidate localCandidate = selectedPair.getLocalCandidate();
|
LocalCandidate localCandidate
|
||||||
Candidate remoteCandidate = selectedPair.getRemoteCandidate();
|
= selectedPair.getLocalCandidate();
|
||||||
|
Candidate<?> remoteCandidate
|
||||||
|
= selectedPair.getRemoteCandidate();
|
||||||
logger.log(Level.INFO, "Local: " + localCandidate);
|
logger.log(Level.INFO, "Local: " + localCandidate);
|
||||||
logger.log(Level.INFO, "Remote: " + remoteCandidate);
|
logger.log(Level.INFO, "Remote: " + remoteCandidate);
|
||||||
try
|
try
|
||||||
@ -175,7 +180,9 @@ public class IcePseudoTcp
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
logger.log(Level.INFO, "Failed to select any candidate pair");
|
logger.log(
|
||||||
|
Level.INFO,
|
||||||
|
"Failed to select any candidate pair");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -188,8 +195,9 @@ public class IcePseudoTcp
|
|||||||
* that Agent instances are to be explicitly prepared for
|
* that Agent instances are to be explicitly prepared for
|
||||||
* garbage collection.
|
* garbage collection.
|
||||||
*/
|
*/
|
||||||
if (localJob != null
|
if ((localJob != null)
|
||||||
&& iceProcessingState == IceProcessingState.TERMINATED)
|
&& (iceProcessingState
|
||||||
|
== IceProcessingState.TERMINATED))
|
||||||
{
|
{
|
||||||
localJob.start();
|
localJob.start();
|
||||||
}
|
}
|
||||||
@ -217,8 +225,10 @@ public class IcePseudoTcp
|
|||||||
|
|
||||||
Object iceProcessingState = evt.getNewValue();
|
Object iceProcessingState = evt.getNewValue();
|
||||||
|
|
||||||
logger.log(Level.INFO,
|
logger.log(
|
||||||
"Remote agent entered the " + iceProcessingState + " state.");
|
Level.INFO,
|
||||||
|
"Remote agent entered the " + iceProcessingState
|
||||||
|
+ " state.");
|
||||||
if (iceProcessingState == IceProcessingState.COMPLETED)
|
if (iceProcessingState == IceProcessingState.COMPLETED)
|
||||||
{
|
{
|
||||||
logger.log(Level.INFO,
|
logger.log(Level.INFO,
|
||||||
@ -232,8 +242,10 @@ public class IcePseudoTcp
|
|||||||
CandidatePair usedPair = udpComponent.getSelectedPair();
|
CandidatePair usedPair = udpComponent.getSelectedPair();
|
||||||
if (usedPair != null)
|
if (usedPair != null)
|
||||||
{
|
{
|
||||||
LocalCandidate localCandidate = usedPair.getLocalCandidate();
|
LocalCandidate localCandidate
|
||||||
Candidate remoteCandidate = usedPair.getRemoteCandidate();
|
= usedPair.getLocalCandidate();
|
||||||
|
Candidate<?> remoteCandidate
|
||||||
|
= usedPair.getRemoteCandidate();
|
||||||
logger.log(Level.INFO,
|
logger.log(Level.INFO,
|
||||||
"Remote: Local address " + localCandidate);
|
"Remote: Local address " + localCandidate);
|
||||||
logger.log(Level.INFO,
|
logger.log(Level.INFO,
|
||||||
@ -267,8 +279,9 @@ public class IcePseudoTcp
|
|||||||
* that Agent instances are to be explicitly prepared for
|
* that Agent instances are to be explicitly prepared for
|
||||||
* garbage collection.
|
* garbage collection.
|
||||||
*/
|
*/
|
||||||
if (remoteJob != null
|
if ((remoteJob != null)
|
||||||
&& iceProcessingState == IceProcessingState.TERMINATED)
|
&& (iceProcessingState
|
||||||
|
== IceProcessingState.TERMINATED))
|
||||||
{
|
{
|
||||||
remoteJob.start();
|
remoteJob.start();
|
||||||
}
|
}
|
||||||
@ -294,8 +307,10 @@ public class IcePseudoTcp
|
|||||||
Agent remotePeer =
|
Agent remotePeer =
|
||||||
createAgent(remotePort);
|
createAgent(remotePort);
|
||||||
|
|
||||||
localAgent.addStateChangeListener(new IcePseudoTcp.LocalIceProcessingListener());
|
localAgent.addStateChangeListener(
|
||||||
remotePeer.addStateChangeListener(new IcePseudoTcp.RemoteIceProcessingListener());
|
new IcePseudoTcp.LocalIceProcessingListener());
|
||||||
|
remotePeer.addStateChangeListener(
|
||||||
|
new IcePseudoTcp.RemoteIceProcessingListener());
|
||||||
|
|
||||||
//let them fight ... fights forge character.
|
//let them fight ... fights forge character.
|
||||||
localAgent.setControlling(true);
|
localAgent.setControlling(true);
|
||||||
@ -450,5 +465,4 @@ public class IcePseudoTcp
|
|||||||
logger.log(Level.FINEST, "Remote pseudotcp worker finished");
|
logger.log(Level.FINEST, "Remote pseudotcp worker finished");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -125,13 +125,13 @@ public class SdpUtils
|
|||||||
Component rtpComponent = stream.getComponent(Component.RTP);
|
Component rtpComponent = stream.getComponent(Component.RTP);
|
||||||
Component rtcpComponent = stream.getComponent(Component.RTCP);
|
Component rtcpComponent = stream.getComponent(Component.RTCP);
|
||||||
|
|
||||||
Candidate defaultRtpCandidate
|
Candidate<?> defaultRtpCandidate
|
||||||
= rtpComponent.findRemoteCandidate(defaultRtpAddress);
|
= rtpComponent.findRemoteCandidate(defaultRtpAddress);
|
||||||
rtpComponent.setDefaultRemoteCandidate(defaultRtpCandidate);
|
rtpComponent.setDefaultRemoteCandidate(defaultRtpCandidate);
|
||||||
|
|
||||||
if(rtcpComponent != null)
|
if(rtcpComponent != null)
|
||||||
{
|
{
|
||||||
Candidate defaultRtcpCandidate
|
Candidate<?> defaultRtcpCandidate
|
||||||
= rtcpComponent.findRemoteCandidate(defaultRtcpAddress);
|
= rtcpComponent.findRemoteCandidate(defaultRtcpAddress);
|
||||||
rtcpComponent.setDefaultRemoteCandidate(defaultRtcpCandidate);
|
rtcpComponent.setDefaultRemoteCandidate(defaultRtcpCandidate);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,15 +6,15 @@
|
|||||||
*/
|
*/
|
||||||
package test;
|
package test;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.logging.*;
|
||||||
|
|
||||||
|
import javax.sdp.*;
|
||||||
|
|
||||||
import org.ice4j.ice.*;
|
import org.ice4j.ice.*;
|
||||||
import org.ice4j.ice.harvest.*;
|
import org.ice4j.ice.harvest.*;
|
||||||
import org.ice4j.ice.sdp.*;
|
import org.ice4j.ice.sdp.*;
|
||||||
|
|
||||||
import javax.sdp.*;
|
|
||||||
import java.io.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.logging.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An example of using trickle ICE.
|
* An example of using trickle ICE.
|
||||||
* <p>
|
* <p>
|
||||||
|
|||||||
@ -20,9 +20,9 @@ public class Signalling
|
|||||||
/**
|
/**
|
||||||
* The socket where we send and receive signalling
|
* The socket where we send and receive signalling
|
||||||
*/
|
*/
|
||||||
private Socket signallingSocket = null;
|
private Socket signallingSocket;
|
||||||
|
|
||||||
private SignallingCallback signallingCallback = null;
|
private SignallingCallback signallingCallback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a signalling instance over the specified socket.
|
* Creates a signalling instance over the specified socket.
|
||||||
@ -49,12 +49,12 @@ public class Signalling
|
|||||||
* socket stuff).
|
* socket stuff).
|
||||||
*/
|
*/
|
||||||
public static Signalling createServerSignalling(
|
public static Signalling createServerSignalling(
|
||||||
InetSocketAddress socketAddress,
|
InetSocketAddress socketAddress,
|
||||||
SignallingCallback signallingCallback)
|
SignallingCallback signallingCallback)
|
||||||
throws Throwable
|
throws Throwable
|
||||||
{
|
{
|
||||||
ServerSocket serverSocket = new ServerSocket(socketAddress);
|
// ServerSocket serverSocket = new ServerSocket(socketAddress);
|
||||||
|
// Signalling signalling = new Signalling(socketAddress, signallingCallback);
|
||||||
Signalling signalling = new Signalling(socketAddress, signallingCallback);
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user