1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-07 21:51:07 +01:00

ICE Transport now uses Wildfire Media Proxy as a last resort

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@6869 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Thiago Camargo 2007-01-29 23:45:13 +00:00 committed by thiago
parent 59a7863401
commit 01abc3a797
12 changed files with 322 additions and 148 deletions

View file

@ -24,6 +24,7 @@ import org.jivesoftware.smackx.jingle.media.JingleMediaManager;
import org.jivesoftware.smackx.jingle.media.JingleMediaSession;
import org.jivesoftware.smackx.jingle.media.PayloadType;
import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
import org.jivesoftware.jingleaudio.JMFInit;
import java.io.File;
import java.io.IOException;
@ -101,10 +102,9 @@ public class JmfMediaManager extends JingleMediaManager {
// should be and put it there.
runLinuxPreInstall();
if (jmfProperties.length() == 0) {
//JMFInit init = new JMFInit(null);
//init.setVisible(false);
}
//if (jmfProperties.length() == 0) {
JMFInit init = new JMFInit(null, false);
//}
}
finally {

View file

@ -4,6 +4,7 @@ import org.jivesoftware.smackx.jingle.media.JingleMediaManager;
import org.jivesoftware.smackx.jingle.media.JingleMediaSession;
import org.jivesoftware.smackx.jingle.media.PayloadType;
import org.jivesoftware.smackx.jingle.nat.TransportCandidate;
import org.jivesoftware.jingleaudio.JMFInit;
import java.io.File;
import java.io.IOException;
@ -12,15 +13,15 @@ import java.io.IOException;
* $RCSfile$
* $Revision: $
* $Date: 25/12/2006
*
* <p/>
* Copyright 2003-2006 Jive Software.
*
* <p/>
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* <p/>
* http://www.apache.org/licenses/LICENSE-2.0
*
* <p/>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -84,8 +85,7 @@ public class SpeexMediaManager extends JingleMediaManager {
runLinuxPreInstall();
if (jmfProperties.length() == 0) {
//JMFInit init = new JMFInit(null);
//init.setVisible(false);
JMFInit init = new JMFInit(null, false);
}
}

View file

@ -53,10 +53,16 @@ public class JingleMediaTest extends TestCase {
x1.connect();
x1.login("barata6", "barata6");
ICETransportManager icetm0 = new ICETransportManager(x0, "stun.xten.net", 3478);
ICETransportManager icetm1 = new ICETransportManager(x1, "stun.xten.net", 3478);
final JingleManager jm0 = new JingleManager(
x0, new ICETransportManager());
x0, icetm0);
final JingleManager jm1 = new JingleManager(
x1, new ICETransportManager());
x1, icetm1);
jm0.addCreationListener(icetm0);
jm1.addCreationListener(icetm1);
JingleMediaManager jingleMediaManager0 = new JmfMediaManager();
JingleMediaManager jingleMediaManager1 = new JmfMediaManager();
@ -70,7 +76,8 @@ public class JingleMediaTest extends TestCase {
try {
IncomingJingleSession session = request.accept(jm1.getMediaManager().getPayloads());
session.start(request);
} catch (XMPPException e) {
}
catch (XMPPException e) {
e.printStackTrace();
}
@ -89,7 +96,8 @@ public class JingleMediaTest extends TestCase {
x0.disconnect();
x1.disconnect();
} catch (Exception e) {
}
catch (Exception e) {
e.printStackTrace();
}
@ -128,7 +136,8 @@ public class JingleMediaTest extends TestCase {
IncomingJingleSession session = request.accept(jm1.getMediaManager().getPayloads());
session.start(request);
} catch (XMPPException e) {
}
catch (XMPPException e) {
e.printStackTrace();
}
@ -147,7 +156,8 @@ public class JingleMediaTest extends TestCase {
x0.disconnect();
x1.disconnect();
} catch (Exception e) {
}
catch (Exception e) {
e.printStackTrace();
}
@ -178,8 +188,8 @@ public class JingleMediaTest extends TestCase {
jm0.addCreationListener(btm0);
jm1.addCreationListener(btm1);
JingleMediaManager jingleMediaManager = new SpeexMediaManager();
JingleMediaManager jingleMediaManager2 = new SpeexMediaManager();
JingleMediaManager jingleMediaManager = new JmfMediaManager();
JingleMediaManager jingleMediaManager2 = new JmfMediaManager();
jm0.setMediaManager(jingleMediaManager);
jm1.setMediaManager(jingleMediaManager2);
@ -191,7 +201,8 @@ public class JingleMediaTest extends TestCase {
IncomingJingleSession session = request.accept(jm1.getMediaManager().getPayloads());
session.start(request);
} catch (XMPPException e) {
}
catch (XMPPException e) {
e.printStackTrace();
}
@ -211,7 +222,8 @@ public class JingleMediaTest extends TestCase {
x0.disconnect();
x1.disconnect();
} catch (Exception e) {
}
catch (Exception e) {
e.printStackTrace();
}
}
@ -222,7 +234,8 @@ public class JingleMediaTest extends TestCase {
try {
Thread.sleep(250000);
} catch (InterruptedException e) {
}
catch (InterruptedException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
}
@ -262,7 +275,8 @@ public class JingleMediaTest extends TestCase {
IncomingJingleSession session = request.accept(jm1.getMediaManager().getPayloads());
session.start(request);
} catch (XMPPException e) {
}
catch (XMPPException e) {
e.printStackTrace();
}
@ -292,7 +306,8 @@ public class JingleMediaTest extends TestCase {
x0.disconnect();
x1.disconnect();
} catch (Exception e) {
}
catch (Exception e) {
e.printStackTrace();
}
@ -310,7 +325,8 @@ public class JingleMediaTest extends TestCase {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
}
catch (InterruptedException e) {
e.printStackTrace();
}
@ -319,10 +335,12 @@ public class JingleMediaTest extends TestCase {
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
catch (InterruptedException e) {
e.printStackTrace();
}
} catch (Exception e) {
}
catch (Exception e) {
e.printStackTrace();
}
}
@ -342,7 +360,8 @@ public class JingleMediaTest extends TestCase {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
}
catch (InterruptedException e) {
e.printStackTrace();
}
@ -351,11 +370,13 @@ public class JingleMediaTest extends TestCase {
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
}
catch (InterruptedException e) {
e.printStackTrace();
}
}
} catch (Exception e) {
}
catch (Exception e) {
e.printStackTrace();
}
}