mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-23 04:22:05 +01:00
New JStun and Media Fixes
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@7919 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
ca19a1ee57
commit
3d36536a41
4 changed files with 38 additions and 5 deletions
Binary file not shown.
|
@ -454,4 +454,18 @@ public class IncomingJingleSession extends JingleSession {
|
||||||
super.eventError(iq);
|
super.eventError(iq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IQ sendFormattedError(JingleError error){
|
||||||
|
IQ perror = null;
|
||||||
|
if (error != null) {
|
||||||
|
perror = createIQ(getSid(), getInitiator(), getResponder(), IQ.Type.ERROR);
|
||||||
|
|
||||||
|
// Fill in the fields with the info from the Jingle packet
|
||||||
|
perror.addExtension(error);
|
||||||
|
|
||||||
|
getConnection().sendPacket(perror);
|
||||||
|
System.err.println(perror.toXML());
|
||||||
|
}
|
||||||
|
return perror;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -461,4 +461,18 @@ public class OutgoingJingleSession extends JingleSession {
|
||||||
super.eventError(iq);
|
super.eventError(iq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IQ sendFormattedError(JingleError error) {
|
||||||
|
IQ perror = null;
|
||||||
|
if (error != null) {
|
||||||
|
perror = createIQ(getSid(), getResponder(), getInitiator(), IQ.Type.ERROR);
|
||||||
|
|
||||||
|
// Fill in the fields with the info from the Jingle packet
|
||||||
|
perror.addExtension(error);
|
||||||
|
|
||||||
|
getConnection().sendPacket(perror);
|
||||||
|
System.err.println(perror.toXML());
|
||||||
|
}
|
||||||
|
return perror;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,9 +176,14 @@ public class AudioChannel {
|
||||||
ds = javax.media.Manager.createDataSource(locator);
|
ds = javax.media.Manager.createDataSource(locator);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
e.printStackTrace();
|
// Try JavaSound Locator as a last resort
|
||||||
|
try {
|
||||||
|
ds = javax.media.Manager.createDataSource(new MediaLocator("javasound://"));
|
||||||
|
}
|
||||||
|
catch (Exception ee) {
|
||||||
return "Couldn't create DataSource";
|
return "Couldn't create DataSource";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Try to create a processor to handle the input jmf locator
|
// Try to create a processor to handle the input jmf locator
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue