本人运用jlibrtp-0.2.2发送数据
运用jlibrtp-0.2.2发送数据,怎么收不到包啊!!请大虾,大牛们给点建议。。。
public class MySendDemo {
public RTPSession rtpSession = null;
static int pktCount = 0;
public MySendDemo(){
DatagramSocket rtpSocket = null;
DatagramSocket rtcpSocket = null;
try {
rtpSocket = new DatagramSocket(16386);
rtcpSocket = new DatagramSocket(16387);
} catch (Exception e) {
System.out.println("RTPSession failed to obtain port");
}
rtpSession = new RTPSession(rtpSocket, rtcpSocket);
}
public static void main(String[] args) {
MySendDemo aDemo = new MySendDemo();
Participant p = new Participant("192.168.0.115",16384,16385);
aDemo.rtpSession.addParticipant(p);
aDemo.run();
System.out.println("pktCount: " + pktCount);
}
private void run() {
if(RTPSession.rtpDebugLevel > 1) {
System.out.println("-> Run()");
}
String sendDate = "123456789";
for (int i = 0; i < 10000; i++) {
rtpSession.sendData(sendDate.getBytes());
}
}
}
代码中是否有问题啊?????