Commit 0d86e24b authored by Dele Olajide's avatar Dele Olajide Committed by dele

Rayo Plugin - Making demo compatible with all browsers using flash/rtmfp

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@13806 b35dd754-fafc-0310-a699-88a17e54d16e
parent 5e236e1b
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFCFC, #FFFCFC]">
<mx:Script>
<![CDATA[
import flash.net.NetConnection;
import flash.external.*;
import mx.core.FlexGlobals;
import mx.utils.UIDUtil;
[Bindable]
private var netConnection:NetConnection = null;
private var incomingNetStream:NetStream = null;
private var outgoingNetStream:NetStream = null;
private var mic:Microphone = null;
private var myuid:String;
public var recieverStream:String = "reciever";
public var senderStream:String = "sender";
public var rtmpUrl:String = "rtmp:/xmpp";
public function windowCloseEvent():void
{
netConnection.close();
}
private function init():void {
simpleLabel.text="Waiting....."
rtmpUrl = FlexGlobals.topLevelApplication.parameters.rtmpUrl;
recieverStream = FlexGlobals.topLevelApplication.parameters.recieverStream;
senderStream = FlexGlobals.topLevelApplication.parameters.senderStream;
initMicrophone();
myuid = UIDUtil.createUID();
//NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
netConnection = new NetConnection();
//netConnection.objectEncoding = ObjectEncoding.AMF0;
netConnection.client = this;
netConnection.addEventListener( NetStatusEvent.NET_STATUS , netStatus );
netConnection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
netConnection.connect(rtmpUrl);
simpleLabel.text="Connecting....."
}
private function initMicrophone():void {
//mic = Microphone.getMicrophone();
mic = getMicrophone();
if(mic == null){
trace("No available microphone");
} else {
mic.setUseEchoSuppression(true);
mic.setLoopBack(false);
mic.setSilenceLevel(0,2000);
mic.gain = 80;
mic.codec = SoundCodec.PCMU;
mic.addEventListener(ActivityEvent.ACTIVITY, micActivityHandler);
mic.addEventListener(StatusEvent.STATUS, micStatusHandler);
}
}
private function getMicrophone() :Microphone
{
var mic:Microphone = Microphone.getEnhancedMicrophone();
var options:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
options.mode = MicrophoneEnhancedMode.FULL_DUPLEX;
options.nonLinearProcessing = true;
mic.enhancedOptions = options;
return mic;
}
private function micActivityHandler(event:ActivityEvent):void {
//simpleLabel.text= "activityHandler: " + event;
}
private function micStatusHandler(event:StatusEvent):void {
switch(event.code) {
case "Microphone.Muted":
break;
case "Microphone.Unmuted":
break;
default:
trace("unknown micStatusHandler event: " + event);
}
}
private function netStatus (evt:NetStatusEvent ):void {
switch(evt.info.code) {
case "NetConnection.Connect.Success":
simpleLabel.text="Connection success!";
connected(recieverStream, senderStream);
break;
case "NetConnection.Connect.Failed":
simpleLabel.text="Failed to connect";
disconnected();
break;
case "NetConnection.Connect.Rejected":
simpleLabel.text="Rejected";
break;
case "NetStream.Play.StreamNotFound":
simpleLabel.text="No Stream";
break;
case "NetStream.Play.Failed":
simpleLabel.text="Play error";
break;
case "NetStream.Play.Start":
simpleLabel.text="Play start";
break;
case "NetStream.Play.Stop":
simpleLabel.text="Play stop";
break;
case "NetStream.Buffer.Full":
break;
default:
simpleLabel.text= evt.info.code ;
}
}
private function asyncErrorHandler(event:AsyncErrorEvent):void {
// ignore AsyncErrorEvent events.
}
private function securityErrorHandler(event:SecurityErrorEvent):void {
simpleLabel.text= "securityErrorHandler: " + event;
}
public function disconnected():* {
simpleLabel.text="Disconnected";
incomingNetStream.play(false);
outgoingNetStream.attachAudio(null);
outgoingNetStream.publish(null);
}
public function connected(publishName:String, playName:String):* {
simpleLabel.text= "Connected: " + publishName;
incomingNetStream = new NetStream(netConnection);
incomingNetStream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
incomingNetStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
outgoingNetStream = new NetStream(netConnection);
outgoingNetStream.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
outgoingNetStream.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
outgoingNetStream.attachAudio(mic);
incomingNetStream.play(playName);
outgoingNetStream.publish(publishName, "live");
}
]]>
</mx:Script>
<mx:Label x="5" y="220" id="simpleLabel" fontSize="10" text=""/>
</mx:Application>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="bootstrap.min.css">
......@@ -24,6 +25,7 @@
var password = null;
var jid = window.location.hostname;
var sipHandset = null;
var rtmpIframe = null;
window.dialer = new Dialpad({
onPress: function (key) {
......@@ -83,7 +85,7 @@
$(document).ready(function()
{
document.getElementById("dialpadDiv").insertBefore(window.dialer.render());
document.body.insertBefore(window.dialer.render(), document.body.firstChild);
window.candybar.render();
window.candybar.call = null;
......@@ -92,7 +94,17 @@
if (urlParam("domain")) domain = urlParam("domain");
if (urlParam("username")) username = urlParam("username");
if (urlParam("password")) password = urlParam("password");
if (urlParam("handset")) sipHandset = urlParam("handset");
if (urlParam("handset"))
{
sipHandset = urlParam("handset");
if (sipHandset.indexOf("rtmfp:") == 0)
{
tokens = sipHandset.split(":")
rtmpIframe = $("<iframe>").attr("style", "width:1px;height:1px;").attr("src", window.location.protocol + '//' + window.location.host + '/rayo-phone/confphone.swf?rtmpUrl=rtmfp://' + window.location.hostname + '&recieverStream=' + tokens[2] + '&senderStream=' + tokens[1]).appendTo("body");
}
}
if (domain == "81.201.82.25" && prefix == "sip:") prefix = "sip:883510";
if (prefix == "tel:") domain = "";
......@@ -384,8 +396,7 @@
</script>
</head>
<body>
<div id="dialpadDiv" style="position: absolute; width: 500px: height: 300px;"/>
<body style="position: absolute; width: 500px: height: 300px;">
<span id="status">Loading...</span>
</body>
</html>
\ No newline at end of file
call C:\ApacheFlex4.8\bin\mxmlc confphone.mxml -theme C:\ApacheFlex4.8\frameworks\themes\Halo\halo.swc -swf-version=12
pause
......@@ -22,6 +22,9 @@ package com.jcumulus.server.rtmfp;
public class B
{
private int A;
private com.jcumulus.server.rtmfp.pipe.B B;
public B(int i)
{
......@@ -32,7 +35,4 @@ public class B
{
return B.A(0x7270e00L);
}
private int A;
private com.jcumulus.server.rtmfp.b.B B;
}
......@@ -20,17 +20,29 @@ package com.jcumulus.server.rtmfp;
* This file is a part of jCumulus.
*/
import com.jcumulus.server.rtmfp.b.A;
import com.jcumulus.server.rtmfp.b.D;
import com.jcumulus.server.rtmfp.g.B;
import com.jcumulus.server.rtmfp.pipe.A;
import com.jcumulus.server.rtmfp.pipe.D;
import com.jcumulus.server.rtmfp.stream.B;
import java.io.IOException;
import org.apache.log4j.Logger;
// Referenced classes of package com.jcumulus.server.rtmfp:
// N
public class C
{
private static final Logger E = Logger.getLogger(C.class);
public static final int A = 64;
boolean F;
byte M[];
byte J[];
String K;
int B;
byte C;
byte H[];
com.jcumulus.server.rtmfp.pipe.B G;
D I;
byte D[];
B L;
public C()
{
......@@ -55,7 +67,7 @@ public class C
H = new byte[N.F + 11];
try
{
com.jcumulus.server.rtmfp.b.C.A().read(J);
com.jcumulus.server.rtmfp.pipe.C.A().read(J);
System.arraycopy(new byte[] {
3, 26, 0, 0, 2, 30, 0, -127, 2, 13,
2
......@@ -81,11 +93,11 @@ public class C
H = new byte[73];
try
{
com.jcumulus.server.rtmfp.b.C.A().read(J);
com.jcumulus.server.rtmfp.pipe.C.A().read(J);
System.arraycopy(new byte[] {
3, 26, 0, 0, 2, 30, 0, 65, 14
}, 0, H, 0, 9);
com.jcumulus.server.rtmfp.b.C.A().read(H, 9, 64);
com.jcumulus.server.rtmfp.pipe.C.A().read(H, 9, 64);
}
catch(IOException ioexception)
{
......@@ -119,18 +131,4 @@ public class C
return (byte)L.A();
}
private static final Logger E = Logger.getLogger(C.class);
public static final int A = 64;
boolean F;
byte M[];
byte J[];
String K;
int B;
byte C;
byte H[];
com.jcumulus.server.rtmfp.b.B G;
D I;
byte D[];
B L;
}
......@@ -20,9 +20,9 @@ package com.jcumulus.server.rtmfp;
* This file is a part of jCumulus.
*/
import com.jcumulus.server.rtmfp.b.C;
import com.jcumulus.server.rtmfp.d.H;
import com.jcumulus.server.rtmfp.e.F;
import com.jcumulus.server.rtmfp.pipe.C;
import com.jcumulus.server.rtmfp.publisher.FlowWriter;
import com.jcumulus.server.rtmfp.flow.F;
import org.apache.log4j.Logger;
public class Client
......@@ -36,7 +36,7 @@ public class Client
private String C;
private short G;
protected boolean A;
protected H F;
protected FlowWriter F;
public Client()
......@@ -77,7 +77,7 @@ public class Client
public String E()
{
return com.jcumulus.server.rtmfp.b.C.A(B);
return com.jcumulus.server.rtmfp.pipe.C.A(B);
}
public String H()
......@@ -130,7 +130,7 @@ public class Client
G = word0;
}
public H F()
public FlowWriter F()
{
return F;
}
......
......@@ -21,19 +21,18 @@ package com.jcumulus.server.rtmfp;
*/
import com.jcumulus.server.rtmfp.d.H;
import com.jcumulus.server.rtmfp.g.B;
import com.jcumulus.server.rtmfp.publisher.FlowWriter;
import com.jcumulus.server.rtmfp.stream.B;
public interface D
{
public abstract void A(boolean flag);
public abstract boolean A(H h);
public abstract boolean A(FlowWriter h);
public abstract void B(H h);
public abstract void B(FlowWriter h);
public abstract B A(byte byte0, int i, H h);
public abstract B A(byte byte0, int i, FlowWriter h);
public abstract boolean A();
......
......@@ -23,10 +23,10 @@ package com.jcumulus.server.rtmfp;
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.b.A;
import com.jcumulus.server.rtmfp.b.C;
import com.jcumulus.server.rtmfp.b.D;
import com.jcumulus.server.rtmfp.g.B;
import com.jcumulus.server.rtmfp.pipe.A;
import com.jcumulus.server.rtmfp.pipe.C;
import com.jcumulus.server.rtmfp.pipe.D;
import com.jcumulus.server.rtmfp.stream.B;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
......@@ -36,16 +36,16 @@ import java.util.Map;
import org.apache.log4j.Logger;
public class F extends H
public class Handshake extends ServerSession
{
private static final Logger W = Logger.getLogger(F.class);
private static final Logger W = Logger.getLogger(Handshake.class);
Map X;
byte V[];
private Sessions Y;
F(Sessions l)
Handshake(Sessions l)
{
super(0, 0, com.jcumulus.server.rtmfp.N.A, com.jcumulus.server.rtmfp.N.A);
X = new HashMap();
......@@ -57,7 +57,7 @@ public class F extends H
}, 0, V, 0, 4);
try
{
com.jcumulus.server.rtmfp.b.C.A().read(V, 4, 64);
com.jcumulus.server.rtmfp.pipe.C.A().read(V, 4, 64);
}
catch(IOException ioexception)
{
......@@ -177,8 +177,8 @@ public class F extends H
k = a.J();
d = c.A(abyte1, a.G(), k);
}
com.jcumulus.server.rtmfp.b.C.A(c.K, p);
H h = Y.A(D, d.B(), d.A(), p);
com.jcumulus.server.rtmfp.pipe.C.A(c.K, p);
ServerSession h = Y.A(D, d.B(), d.A(), p);
c.B = h.O;
String s1 = null;
if(byte0 != 57)
......
......@@ -24,5 +24,5 @@ package com.jcumulus.server.rtmfp;
public interface ISessions
{
public abstract H A(int i, byte abyte0[], byte abyte1[], P p);
public abstract ServerSession A(int i, byte abyte0[], byte abyte1[], P p);
}
......@@ -22,9 +22,9 @@ package com.jcumulus.server.rtmfp;
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.b.C;
import com.jcumulus.server.rtmfp.b.D;
import com.jcumulus.server.rtmfp.g.B;
import com.jcumulus.server.rtmfp.pipe.C;
import com.jcumulus.server.rtmfp.pipe.D;
import com.jcumulus.server.rtmfp.stream.B;
import java.io.IOException;
import java.math.BigInteger;
import java.security.InvalidKeyException;
......@@ -168,7 +168,7 @@ public class N
byte abyte0[] = new byte[D.length];
try
{
com.jcumulus.server.rtmfp.b.C.A().read(abyte0);
com.jcumulus.server.rtmfp.pipe.C.A().read(abyte0);
BigInteger biginteger2 = new BigInteger(1, abyte0);
byte abyte1[] = biginteger1.modPow(biginteger2, biginteger).toByteArray();
byte abyte2[] = Arrays.copyOfRange(abyte1, abyte1.length - F, abyte1.length);
......@@ -239,7 +239,7 @@ public class N
public static short A()
{
return A((new com.jcumulus.server.rtmfp.b.B()).getTime());
return A((new com.jcumulus.server.rtmfp.pipe.B()).getTime());
}
public static short A(long l)
......
......@@ -25,9 +25,9 @@ import com.jcumulus.server.rtmfp.application.Publication;
import com.jcumulus.server.rtmfp.application.Listener;
import com.jcumulus.server.rtmfp.client.ClientHandler;
import com.jcumulus.server.rtmfp.d.H;
import com.jcumulus.server.rtmfp.e.B;
import com.jcumulus.server.rtmfp.e.F;
import com.jcumulus.server.rtmfp.publisher.FlowWriter;
import com.jcumulus.server.rtmfp.flow.B;
import com.jcumulus.server.rtmfp.flow.F;
import java.lang.reflect.Method;
import java.net.SocketAddress;
......@@ -55,7 +55,7 @@ public class P extends Client
K = a;
}
public boolean A(B b, com.jcumulus.server.rtmfp.e.A a)
public boolean A(B b, com.jcumulus.server.rtmfp.flow.A a)
{
if(!M)
M = K == null || K.onConnection(this, b, a);
......@@ -212,7 +212,7 @@ public class P extends Client
return N;
}
public void A(H h)
public void A(FlowWriter h)
{
F = h;
}
......
......@@ -50,7 +50,7 @@ public class RtmfpChannelUpstreamHandler extends SimpleChannelUpstreamHandler
byte abyte0[] = channelbuffer.array();
AudioPacket packet = new AudioPacket(abyte0, channelbuffer.readableBytes());
int i = com.jcumulus.server.rtmfp.N.A(packet);
H h = sessions.A(i);
ServerSession h = sessions.A(i);
if(h == null)
{
......
......@@ -23,10 +23,10 @@ package com.jcumulus.server.rtmfp;
import com.jcumulus.server.rtmfp.client.*;
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.b.C;
import com.jcumulus.server.rtmfp.d.E;
import com.jcumulus.server.rtmfp.d.F;
import com.jcumulus.server.rtmfp.g.B;
import com.jcumulus.server.rtmfp.pipe.C;
import com.jcumulus.server.rtmfp.publisher.E;
import com.jcumulus.server.rtmfp.publisher.F;
import com.jcumulus.server.rtmfp.stream.B;
import com.google.common.base.Strings;
import java.net.SocketAddress;
import java.util.Arrays;
......@@ -40,9 +40,9 @@ import org.apache.log4j.Logger;
import org.jboss.netty.channel.Channel;
public class H implements D
public class ServerSession implements D
{
private static final Logger J = Logger.getLogger(H.class);
private static final Logger J = Logger.getLogger(ServerSession.class);
int O;
int D;
protected P M;
......@@ -53,27 +53,27 @@ public class H implements D
K K;
protected final B N;
Channel Q;
com.jcumulus.server.rtmfp.b.B G;
com.jcumulus.server.rtmfp.pipe.B G;
short A;
boolean U;
int B;
int E;
Map L;
com.jcumulus.server.rtmfp.d.H R;
com.jcumulus.server.rtmfp.publisher.FlowWriter R;
int P;
Map C;
Map T;
public H(int i, int j, byte abyte0[], byte abyte1[])
public ServerSession(int i, int j, byte abyte0[], byte abyte1[])
{
this(i, j, abyte0, abyte1, new P());
}
public H(int i, int j, byte abyte0[], byte abyte1[], P p)
public ServerSession(int i, int j, byte abyte0[], byte abyte1[], P p)
{
N = new B();
G = new com.jcumulus.server.rtmfp.b.B();
G = new com.jcumulus.server.rtmfp.pipe.B();
A = 0;
U = false;
L = new HashMap();
......@@ -140,12 +140,12 @@ public class H implements D
}
}
public boolean A(com.jcumulus.server.rtmfp.d.H h)
public boolean A(com.jcumulus.server.rtmfp.publisher.FlowWriter h)
{
return R == h;
}
public void B(com.jcumulus.server.rtmfp.d.H h)
public void B(com.jcumulus.server.rtmfp.publisher.FlowWriter h)
{
while(++P == 0 || C.get(Integer.valueOf(P)) != null) ;
h.B(P);
......@@ -154,7 +154,7 @@ public class H implements D
C.put(Integer.valueOf(P), h);
}
public com.jcumulus.server.rtmfp.g.B A(byte paramByte, int paramInt, com.jcumulus.server.rtmfp.d.H paramH)
public com.jcumulus.server.rtmfp.stream.B A(byte paramByte, int paramInt, com.jcumulus.server.rtmfp.publisher.FlowWriter paramH)
{
if (this.U)
synchronized (this.N)
......@@ -208,10 +208,10 @@ public class H implements D
N.B(11);
}
Integer integer;
for(Iterator iterator = C.keySet().iterator(); iterator.hasNext(); ((com.jcumulus.server.rtmfp.d.H)C.get(integer)).I())
for(Iterator iterator = C.keySet().iterator(); iterator.hasNext(); ((com.jcumulus.server.rtmfp.publisher.FlowWriter)C.get(integer)).I())
integer = (Integer)iterator.next();
this.M.A((com.jcumulus.server.rtmfp.d.H)null);
this.M.A((com.jcumulus.server.rtmfp.publisher.FlowWriter)null);
this.M.J();
this.U = true;
......@@ -230,16 +230,16 @@ public class H implements D
M.O();
M.C();
U = true;
M.A((com.jcumulus.server.rtmfp.d.H)null);
M.A((com.jcumulus.server.rtmfp.publisher.FlowWriter)null);
M.J();
E e;
for(Iterator iterator = L.values().iterator(); iterator.hasNext(); e.C())
e = (E)iterator.next();
L.clear();
com.jcumulus.server.rtmfp.d.H h;
com.jcumulus.server.rtmfp.publisher.FlowWriter h;
for(Iterator iterator1 = C.values().iterator(); iterator1.hasNext(); h.F())
h = (com.jcumulus.server.rtmfp.d.H)iterator1.next();
h = (com.jcumulus.server.rtmfp.publisher.FlowWriter)iterator1.next();
C.clear();
F = true;
......@@ -306,7 +306,7 @@ public class H implements D
case 94: // '^'
int k = a1.J();
com.jcumulus.server.rtmfp.d.H h = (com.jcumulus.server.rtmfp.d.H)C.get(Integer.valueOf(k));
com.jcumulus.server.rtmfp.publisher.FlowWriter h = (com.jcumulus.server.rtmfp.publisher.FlowWriter)C.get(Integer.valueOf(k));
if(h != null)
h.D((new StringBuilder()).append("FlowWriter rejected on session ").append(O).toString());
else
......@@ -319,7 +319,7 @@ public class H implements D
case 81: // 'Q'
int l = a1.J();
com.jcumulus.server.rtmfp.d.H h1 = (com.jcumulus.server.rtmfp.d.H)C.get(Integer.valueOf(l));
com.jcumulus.server.rtmfp.publisher.FlowWriter h1 = (com.jcumulus.server.rtmfp.publisher.FlowWriter)C.get(Integer.valueOf(l));
if(h1 != null)
h1.A(a1);
else
......@@ -334,7 +334,7 @@ public class H implements D
if(U)
break;
e = (E)L.get(Integer.valueOf(i1));
if((byte1 & com.jcumulus.server.rtmfp.d.E.N.intValue()) != 0)
if((byte1 & com.jcumulus.server.rtmfp.publisher.E.N.intValue()) != 0)
{
byte abyte0[] = a1.F(a1.L() & 0xff);
if(e == null)
......@@ -405,14 +405,14 @@ public class H implements D
J.warn((new StringBuilder()).append("Flow ").append(i).append(" has already been created").toString());
return ((E) (obj));
}
if(com.jcumulus.server.rtmfp.b.C.B(abyte0, com.jcumulus.server.rtmfp.d.F.S))
if(com.jcumulus.server.rtmfp.pipe.C.B(abyte0, com.jcumulus.server.rtmfp.publisher.F.S))
obj = new F(i, M, this);
else
if(com.jcumulus.server.rtmfp.b.C.B(abyte0, com.jcumulus.server.rtmfp.d.C.Q))
obj = new com.jcumulus.server.rtmfp.d.C(i, M, this);
if(com.jcumulus.server.rtmfp.pipe.C.B(abyte0, com.jcumulus.server.rtmfp.publisher.C.Q))
obj = new com.jcumulus.server.rtmfp.publisher.C(i, M, this);
else
if(com.jcumulus.server.rtmfp.b.C.A(com.jcumulus.server.rtmfp.d.A.Z, abyte0))
obj = new com.jcumulus.server.rtmfp.d.A(i, abyte0, M, this);
if(com.jcumulus.server.rtmfp.pipe.C.A(com.jcumulus.server.rtmfp.publisher.A.Z, abyte0))
obj = new com.jcumulus.server.rtmfp.publisher.A(i, abyte0, M, this);
else
J.error((new StringBuilder()).append("New unknown flow '").append(Arrays.toString(abyte0)).append("' on session ").append(O).toString());
if(obj != null)
......
......@@ -28,7 +28,7 @@ public class Sessions implements ISessions
{
private static Logger A = Logger.getLogger(Sessions.class);
private F D;
private Handshake D;
private Map C;
int B;
......@@ -36,23 +36,23 @@ public class Sessions implements ISessions
{
C = new HashMap();
B = 1;
D = new F(this);
D = new Handshake(this);
}
public H A(int i, byte abyte0[], byte abyte1[], P p)
public ServerSession A(int i, byte abyte0[], byte abyte1[], P p)
{
int j = A();
H h = new H(j, i, abyte0, abyte1, p);
ServerSession h = new ServerSession(j, i, abyte0, abyte1, p);
C.put(Integer.valueOf(j), h);
A.info((new StringBuilder()).append("Session ").append(j).append(" created").toString());
return h;
}
public H A(int i)
public ServerSession A(int i)
{
if(i == 0)
return D;
H h = (H)C.get(Integer.valueOf(i));
ServerSession h = (ServerSession)C.get(Integer.valueOf(i));
if(h != null && !h.F)
return h;
else
......
......@@ -20,10 +20,10 @@ package com.jcumulus.server.rtmfp.application;
* This file is a part of jCumulus.
*/
public class D extends H
public class AudioWriter extends StreamWriter
{
public D(byte abyte0[], com.jcumulus.server.rtmfp.D d)
public AudioWriter(byte abyte0[], com.jcumulus.server.rtmfp.D d)
{
super((byte)8, abyte0, d);
}
......
......@@ -28,16 +28,16 @@ public class C
{
private Map A;
private E B;
private Streams B;
public C()
{
A = new HashMap();
B = new E(A);
B = new Streams(A);
}
public E getStreams()
public Streams getStreams()
{
return B;
}
......
......@@ -22,7 +22,7 @@ package com.jcumulus.server.rtmfp.application;
*/
import com.jcumulus.server.rtmfp.b.B;
import com.jcumulus.server.rtmfp.pipe.B;
import java.util.List;
public class G
......
......@@ -21,9 +21,9 @@ package com.jcumulus.server.rtmfp.application;
*/
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.d.H;
import com.jcumulus.server.rtmfp.e.F;
import com.jcumulus.server.rtmfp.g.A;
import com.jcumulus.server.rtmfp.publisher.FlowWriter;
import com.jcumulus.server.rtmfp.flow.F;
import com.jcumulus.server.rtmfp.stream.BinaryWriter;
import org.apache.log4j.Logger;
......@@ -38,12 +38,12 @@ public class Listener
private int G;
private int H;
private int L;
private H J;
private D C;
private com.jcumulus.server.rtmfp.application.F I;
private FlowWriter J;
private AudioWriter C;
private com.jcumulus.server.rtmfp.application.VideoWriter I;
public Listener(int i, Publication b, H h, boolean flag)
public Listener(int i, Publication b, FlowWriter h, boolean flag)
{
B = i;
K = b;
......@@ -73,9 +73,9 @@ public class Listener
private void A()
{
if(I != null)
A(((H) (I)));
A(((FlowWriter) (I)));
if(C != null)
A(((H) (C)));
A(((FlowWriter) (C)));
A(J);
D++;
}
......@@ -98,10 +98,10 @@ public class Listener
return L;
}
private void A(H h)
private void A(FlowWriter h)
{
E.debug((new StringBuilder()).append("Writing bound ").append(D).append(" on flow writer ").append(h.E()).toString());
A a = h.A(false);
BinaryWriter a = h.A(false);
a.A((short)34);
a.A(D);
a.A(3);
......
......@@ -22,8 +22,8 @@ package com.jcumulus.server.rtmfp.application;
import com.jcumulus.server.rtmfp.P;
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.d.E;
import com.jcumulus.server.rtmfp.d.H;
import com.jcumulus.server.rtmfp.publisher.E;
import com.jcumulus.server.rtmfp.publisher.FlowWriter;
import com.google.common.base.Strings;
import java.util.Collection;
import java.util.HashMap;
......@@ -39,7 +39,7 @@ public class Publication
{
private static final Logger F = Logger.getLogger(Publication.class);
private P E;
private H A;
private FlowWriter A;
private boolean G;
private String J;
private int I;
......@@ -109,7 +109,7 @@ public class Publication
J = s;
}
public boolean A(P p, int i, H h, boolean flag)
public boolean A(P p, int i, FlowWriter h, boolean flag)
{
Listener j = (Listener)H.get(Integer.valueOf(i));
if(j != null)
......@@ -165,7 +165,7 @@ public class Publication
}
}
public void A(P p, int i, H h)
public void A(P p, int i, FlowWriter h)
throws Exception
{
if(I != 0)
......
......@@ -23,21 +23,19 @@ package com.jcumulus.server.rtmfp.application;
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.D;
import com.jcumulus.server.rtmfp.g.B;
import com.jcumulus.server.rtmfp.stream.B;
import org.apache.log4j.Logger;
// Referenced classes of package com.jcumulus.server.rtmfp.application:
// G, I
public class H extends com.jcumulus.server.rtmfp.d.H
public class StreamWriter extends com.jcumulus.server.rtmfp.publisher.FlowWriter
{
private static final Logger W = Logger.getLogger(H.class);
private static final Logger W = Logger.getLogger(StreamWriter.class);
private byte V;
private G T;
private boolean U;
public H(byte byte0, byte abyte0[], D d)
public StreamWriter(byte byte0, byte abyte0[], D d)
{
super(abyte0, d);
T = new G();
......@@ -59,7 +57,7 @@ public class H extends com.jcumulus.server.rtmfp.d.H
}
W.warn("Written unbuffered impossible, it requires 5 head bytes available on PacketReader given");
}
com.jcumulus.server.rtmfp.g.A a1 = A(true);
com.jcumulus.server.rtmfp.stream.BinaryWriter a1 = A(true);
a1.B(V);
a1.A(i);
a1.B(a.G());
......
......@@ -21,21 +21,21 @@ package com.jcumulus.server.rtmfp.application;
*/
import com.jcumulus.server.rtmfp.P;
import com.jcumulus.server.rtmfp.d.H;
import com.jcumulus.server.rtmfp.publisher.FlowWriter;
import java.util.*;
import org.apache.log4j.Logger;
public class E
public class Streams
{
private static Logger A = Logger.getLogger(E.class);
private static Logger A = Logger.getLogger(Streams.class);
private List D;
private Map C;
Integer B;
public E(Map map)
public Streams(Map map)
{
D = new ArrayList();
B = Integer.valueOf(0);
......@@ -66,7 +66,7 @@ public class E
}
}
public Publication A(P p, int i, String s, H h)
public Publication A(P p, int i, String s, FlowWriter h)
throws Exception
{
Publication b = A(s);
......@@ -96,7 +96,7 @@ public class E
A(b);
}
public boolean A(P p, int i, String s, H h, double d)
public boolean A(P p, int i, String s, FlowWriter h, double d)
{
Publication b = (Publication)C.get(s);
boolean flag = false;
......
......@@ -23,10 +23,10 @@ package com.jcumulus.server.rtmfp.application;
import com.jcumulus.server.rtmfp.D;
public class F extends H
public class VideoWriter extends StreamWriter
{
public F(byte abyte0[], D d)
public VideoWriter(byte abyte0[], D d)
{
super((byte)9, abyte0, d);
}
......
......@@ -36,7 +36,7 @@ public class ClientHandler implements IClientHandler
private static Logger log = LoggerFactory.getLogger(ClientHandler.class);
private short counter = 0;
public boolean onConnection(Client client, com.jcumulus.server.rtmfp.e.B b, com.jcumulus.server.rtmfp.e.A a)
public boolean onConnection(Client client, com.jcumulus.server.rtmfp.flow.B b, com.jcumulus.server.rtmfp.flow.A a)
{
log.info("onConnect ");
......@@ -74,7 +74,7 @@ public class ClientHandler implements IClientHandler
if (RtmfpCallAgent.publishHandlers.containsKey(publishName) == false)
{
RtmfpCallAgent.publishHandlers.put(publishName, com.jcumulus.server.rtmfp.d.E.I.getStreams().A(publishName));
RtmfpCallAgent.publishHandlers.put(publishName, com.jcumulus.server.rtmfp.publisher.E.I.getStreams().A(publishName));
}
return true;
......@@ -130,7 +130,7 @@ public class ClientHandler implements IClientHandler
}
public void sendDigit(Client client, com.jcumulus.server.rtmfp.e.B b)
public void sendDigit(Client client, com.jcumulus.server.rtmfp.flow.B b)
{
String stream = b.E();
String digit = b.E();
......
......@@ -22,14 +22,14 @@ package com.jcumulus.server.rtmfp.client;
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.Client;
import com.jcumulus.server.rtmfp.e.B;
import com.jcumulus.server.rtmfp.flow.B;
import com.jcumulus.server.rtmfp.application.Publication;
import com.jcumulus.server.rtmfp.application.Listener;
public interface IClientHandler
{
public abstract boolean onConnection(Client client, B b, com.jcumulus.server.rtmfp.e.A a);
public abstract boolean onConnection(Client client, B b, com.jcumulus.server.rtmfp.flow.A a);
public abstract void onFailed(Client client, String s);
......
package com.jcumulus.server.rtmfp.e;
package com.jcumulus.server.rtmfp.flow;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -20,7 +20,7 @@ package com.jcumulus.server.rtmfp.e;
* This file is a part of jCumulus.
*/
import com.jcumulus.server.rtmfp.b.B;
import com.jcumulus.server.rtmfp.pipe.B;
public class A
......
package com.jcumulus.server.rtmfp.e;
package com.jcumulus.server.rtmfp.flow;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.e;
package com.jcumulus.server.rtmfp.flow;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -20,7 +20,7 @@ package com.jcumulus.server.rtmfp.e;
* This file is a part of jCumulus.
*/
import com.jcumulus.server.rtmfp.b.B;
import com.jcumulus.server.rtmfp.pipe.B;
import java.util.*;
public class E
......@@ -39,43 +39,43 @@ public class E
public void B(String s, String s1)
{
H.put(s, com.jcumulus.server.rtmfp.e.H.String);
H.put(s, com.jcumulus.server.rtmfp.flow.H.String);
C.put(s, s1);
}
public void A(String s, E e)
{
H.put(s, com.jcumulus.server.rtmfp.e.H.Object);
H.put(s, com.jcumulus.server.rtmfp.flow.H.Object);
F.put(s, e);
}
public void A(String s, int i)
{
H.put(s, com.jcumulus.server.rtmfp.e.H.Integer);
H.put(s, com.jcumulus.server.rtmfp.flow.H.Integer);
E.put(s, Integer.valueOf(i));
}
public void A(String s, double d)
{
H.put(s, com.jcumulus.server.rtmfp.e.H.Number);
H.put(s, com.jcumulus.server.rtmfp.flow.H.Number);
B.put(s, Double.valueOf(d));
}
public void A(String s, boolean flag)
{
H.put(s, com.jcumulus.server.rtmfp.e.H.Boolean);
H.put(s, com.jcumulus.server.rtmfp.flow.H.Boolean);
G.put(s, Boolean.valueOf(flag));
}
public void A(String s, B b)
{
H.put(s, com.jcumulus.server.rtmfp.e.H.Date);
H.put(s, com.jcumulus.server.rtmfp.flow.H.Date);
D.put(s, b);
}
public void G(String s)
{
H.put(s, com.jcumulus.server.rtmfp.e.H.Null);
H.put(s, com.jcumulus.server.rtmfp.flow.H.Null);
A.add(s);
}
......
package com.jcumulus.server.rtmfp.e;
package com.jcumulus.server.rtmfp.flow;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -20,19 +20,17 @@ package com.jcumulus.server.rtmfp.e;
* This file is a part of jCumulus.
*/
import com.jcumulus.server.rtmfp.b.B;
import com.jcumulus.server.rtmfp.g.A;
import com.jcumulus.server.rtmfp.pipe.B;
import com.jcumulus.server.rtmfp.stream.BinaryWriter;
import com.google.common.base.Strings;
import java.util.*;
import org.apache.log4j.Logger;
// Referenced classes of package com.jcumulus.server.rtmfp.e:
// E, H
public class F
{
public F(A a)
public F(BinaryWriter a)
{
C = new HashMap();
A = new ArrayList();
......@@ -171,7 +169,7 @@ public class F
F.D(i);
}
private A B(int i)
private BinaryWriter B(int i)
{
H = Integer.valueOf(0);
if(!E)
......@@ -185,7 +183,7 @@ public class F
public void A(byte abyte0[], int i)
{
A a = B(i);
BinaryWriter a = B(i);
a.A(abyte0, i);
}
......@@ -353,25 +351,25 @@ public class F
{
String s = (String)iterator.next();
H h = (H)map.get(s);
if(com.jcumulus.server.rtmfp.e.H.Boolean == h)
if(com.jcumulus.server.rtmfp.flow.H.Boolean == h)
A(s, e.A(s));
else
if(com.jcumulus.server.rtmfp.e.H.String == h)
if(com.jcumulus.server.rtmfp.flow.H.String == h)
A(s, e.H(s));
else
if(com.jcumulus.server.rtmfp.e.H.Number == h)
if(com.jcumulus.server.rtmfp.flow.H.Number == h)
A(s, e.D(s));
else
if(com.jcumulus.server.rtmfp.e.H.Integer == h)
if(com.jcumulus.server.rtmfp.flow.H.Integer == h)
A(s, e.B(s));
else
if(com.jcumulus.server.rtmfp.e.H.Date == h)
if(com.jcumulus.server.rtmfp.flow.H.Date == h)
A(s, e.C(s));
else
if(com.jcumulus.server.rtmfp.e.H.Null == h)
if(com.jcumulus.server.rtmfp.flow.H.Null == h)
C(s);
else
if(com.jcumulus.server.rtmfp.e.H.Object == h)
if(com.jcumulus.server.rtmfp.flow.H.Object == h)
A(s, e.E(s));
else
D.error((new StringBuilder()).append("Unknown AMFObject '").append(h).append("' type").toString());
......@@ -390,13 +388,13 @@ public class F
B = flag;
}
public A E()
public BinaryWriter E()
{
return F;
}
private static final Logger D = Logger.getLogger(F.class);
A F;
BinaryWriter F;
Integer H;
boolean B;
Map C;
......
package com.jcumulus.server.rtmfp.e;
package com.jcumulus.server.rtmfp.flow;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.e;
package com.jcumulus.server.rtmfp.flow;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.b;
package com.jcumulus.server.rtmfp.pipe;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.b;
package com.jcumulus.server.rtmfp.pipe;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.b;
package com.jcumulus.server.rtmfp.pipe;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -31,10 +31,8 @@ import java.util.Iterator;
import java.util.Map;
import org.apache.log4j.Logger;
// Referenced classes of package com.jcumulus.server.rtmfp.d:
// E, H
public class A extends com.jcumulus.server.rtmfp.d.E
public class A extends com.jcumulus.server.rtmfp.publisher.E
{
static enum _A
{
......@@ -146,7 +144,7 @@ public class A extends com.jcumulus.server.rtmfp.d.E
super.A(i);
}
protected void A(String s, com.jcumulus.server.rtmfp.e.B b1)
protected void A(String s, com.jcumulus.server.rtmfp.flow.B b1)
{
if("play".equals(s))
{
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -23,8 +23,6 @@ package com.jcumulus.server.rtmfp.d;
import com.jcumulus.server.rtmfp.D;
import com.jcumulus.server.rtmfp.P;
// Referenced classes of package com.jcumulus.server.rtmfp.d:
// E
public class C extends E
{
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -24,10 +24,10 @@ import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.D;
import com.jcumulus.server.rtmfp.P;
import com.jcumulus.server.rtmfp.b.C;
import com.jcumulus.server.rtmfp.e.H;
import com.jcumulus.server.rtmfp.g.A;
import com.jcumulus.server.rtmfp.g.B;
import com.jcumulus.server.rtmfp.pipe.C;
import com.jcumulus.server.rtmfp.flow.H;
import com.jcumulus.server.rtmfp.stream.BinaryWriter;
import com.jcumulus.server.rtmfp.stream.B;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
......@@ -36,8 +36,7 @@ import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
// Referenced classes of package com.jcumulus.server.rtmfp.d:
// H, D, B
public class E
{
......@@ -53,8 +52,8 @@ public class E
protected P K;
private boolean G;
private D D;
private com.jcumulus.server.rtmfp.d.D B;
protected com.jcumulus.server.rtmfp.d.H O;
private com.jcumulus.server.rtmfp.publisher.D B;
protected com.jcumulus.server.rtmfp.publisher.FlowWriter O;
private Map P;
private String L;
......@@ -69,7 +68,7 @@ public class E
G = false;
B = null;
D = d;
O = new com.jcumulus.server.rtmfp.d.H(abyte0, d);
O = new com.jcumulus.server.rtmfp.publisher.FlowWriter(abyte0, d);
O.C(i);
O.C(s);
}
......@@ -94,7 +93,7 @@ public class E
F.error((new StringBuilder()).append("Flow ").append(A).append(" failed : %s").append(s).toString());
if(!G)
{
B b = D.A((byte)94, com.jcumulus.server.rtmfp.b.C.A(A) + 1, null);
B b = D.A((byte)94, com.jcumulus.server.rtmfp.pipe.C.A(A) + 1, null);
b.D(A);
b.B((byte)0);
}
......@@ -161,7 +160,7 @@ public class E
int k = B == null ? 127 : B.B() <= 16128 ? 16128 - B.B() : 0;
if(O.G() == null)
k = 0;
B b = D.A((byte)81, com.jcumulus.server.rtmfp.b.C.A(A) + com.jcumulus.server.rtmfp.b.C.A(k) + com.jcumulus.server.rtmfp.b.C.A(J) + i, null);
B b = D.A((byte)81, com.jcumulus.server.rtmfp.pipe.C.A(A) + com.jcumulus.server.rtmfp.pipe.C.A(k) + com.jcumulus.server.rtmfp.pipe.C.A(J) + i, null);
b.D(A);
b.D(k);
b.D(J);
......@@ -198,8 +197,8 @@ public class E
Integer integer = (Integer)iterator.next();
if(integer.intValue() > i)
break;
AudioPacket a1 = ((com.jcumulus.server.rtmfp.d.B)P.get(integer)).B();
A(integer.intValue(), a1, ((com.jcumulus.server.rtmfp.d.B)P.get(integer)).A());
AudioPacket a1 = ((com.jcumulus.server.rtmfp.publisher.B)P.get(integer)).B();
A(integer.intValue(), a1, ((com.jcumulus.server.rtmfp.publisher.B)P.get(integer)).A());
if(G)
return;
iterator.remove();
......@@ -208,10 +207,10 @@ public class E
}
if(i > k)
{
com.jcumulus.server.rtmfp.d.B b = (com.jcumulus.server.rtmfp.d.B)P.get(Integer.valueOf(i));
com.jcumulus.server.rtmfp.publisher.B b = (com.jcumulus.server.rtmfp.publisher.B)P.get(Integer.valueOf(i));
if(b == null)
{
P.put(Integer.valueOf(i), new com.jcumulus.server.rtmfp.d.B(a, byte0));
P.put(Integer.valueOf(i), new com.jcumulus.server.rtmfp.publisher.B(a, byte0));
if(P.size() > 100)
F.debug((new StringBuilder()).append("fragmentMap.size()=").append(P.size()).toString());
} else
......@@ -229,8 +228,8 @@ public class E
Integer integer1 = (Integer)iterator1.next();
if(integer1.intValue() > k)
break;
AudioPacket a2 = ((com.jcumulus.server.rtmfp.d.B)P.get(integer1)).B();
A(k++, a2, ((com.jcumulus.server.rtmfp.d.B)P.get(integer1)).A());
AudioPacket a2 = ((com.jcumulus.server.rtmfp.publisher.B)P.get(integer1)).B();
A(k++, a2, ((com.jcumulus.server.rtmfp.publisher.B)P.get(integer1)).A());
if(G)
break;
iterator1.remove();
......@@ -288,7 +287,7 @@ public class E
F.error("A received message tells to have not 'beforepart' and nevertheless partbuffer exists");
A(B.B());
}
B = new com.jcumulus.server.rtmfp.d.D(a);
B = new com.jcumulus.server.rtmfp.publisher.D(a);
return;
}
byte byte1 = B(a);
......@@ -296,14 +295,14 @@ public class E
{
O.A(Double.valueOf(0.0D));
String s = null;
com.jcumulus.server.rtmfp.e.B b = new com.jcumulus.server.rtmfp.e.B(a);
com.jcumulus.server.rtmfp.flow.B b = new com.jcumulus.server.rtmfp.flow.B(a);
if(byte1 == 20 || byte1 == 15)
{
s = b.E();
if(byte1 == 20)
{
O.A(b.N());
if(b.G() == com.jcumulus.server.rtmfp.e.H.Null)
if(b.G() == com.jcumulus.server.rtmfp.flow.H.Null)
b.P();
}
}
......@@ -342,7 +341,7 @@ public class E
E();
}
protected void A(String s, com.jcumulus.server.rtmfp.e.B b)
protected void A(String s, com.jcumulus.server.rtmfp.flow.B b)
{
F.error((new StringBuilder()).append("Message '").append(s).append("' unknown for flow ").append(A).toString());
}
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -22,9 +22,9 @@ package com.jcumulus.server.rtmfp.d;
import com.jcumulus.server.rtmfp.D;
import com.jcumulus.server.rtmfp.P;
import com.jcumulus.server.rtmfp.e.A;
import com.jcumulus.server.rtmfp.e.B;
import com.jcumulus.server.rtmfp.e.E;
import com.jcumulus.server.rtmfp.flow.A;
import com.jcumulus.server.rtmfp.flow.B;
import com.jcumulus.server.rtmfp.flow.E;
import com.jcumulus.server.rtmfp.application.C;
import java.util.ArrayList;
import java.util.List;
......@@ -32,10 +32,8 @@ import java.util.List;
import org.jivesoftware.util.*;
// Referenced classes of package com.jcumulus.server.rtmfp.d:
// E, H
public class F extends com.jcumulus.server.rtmfp.d.E
public class F extends com.jcumulus.server.rtmfp.publisher.E
{
public F(int i, P p, D d)
......@@ -77,7 +75,7 @@ public class F extends com.jcumulus.server.rtmfp.d.E
for(; b.B(); K.N().add(s1))
s1 = b.E();
com.jcumulus.server.rtmfp.g.A a = O.A(false);
com.jcumulus.server.rtmfp.stream.BinaryWriter a = O.A(false);
a.A((short)41);
a.A(JiveGlobals.getIntProperty("voicebridge.rtmfp.keep.alive.server", 5));
a.A(JiveGlobals.getIntProperty("voicebridge.rtmfp.keep.alive.peer", 5));
......@@ -85,7 +83,7 @@ public class F extends com.jcumulus.server.rtmfp.d.E
if(!"initStream".equals(s))
if("createStream".equals(s))
{
com.jcumulus.server.rtmfp.e.F f = O.J();
com.jcumulus.server.rtmfp.flow.F f = O.J();
Integer integer1 = I.getStreams().A();
U.add(integer1);
f.A(integer1.intValue());
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -22,9 +22,9 @@ package com.jcumulus.server.rtmfp.d;
import com.jcumulus.server.rtmfp.D;
import com.jcumulus.server.rtmfp.packet.*;
import com.jcumulus.server.rtmfp.pipe.C;
import com.jcumulus.server.rtmfp.application.VideoWriter;
import com.jcumulus.server.rtmfp.b.C;
import com.jcumulus.server.rtmfp.application.F;
import com.google.common.base.Strings;
import java.util.ArrayList;
import java.util.Iterator;
......@@ -34,13 +34,11 @@ import java.util.Map;
import java.util.Set;
import org.apache.log4j.Logger;
// Referenced classes of package com.jcumulus.server.rtmfp.d:
// L, I, E, G,
// K, J
public class H
public class FlowWriter
{
private static final Logger G = Logger.getLogger(H.class);
private static final Logger G = Logger.getLogger(FlowWriter.class);
private static J S = new J();
private int J;
private boolean K;
......@@ -62,7 +60,7 @@ public class H
public H(byte abyte0[], D d)
public FlowWriter(byte abyte0[], D d)
{
A = new L();
K = false;
......@@ -81,14 +79,14 @@ public class H
d.B(this);
}
public com.jcumulus.server.rtmfp.application.D B()
public com.jcumulus.server.rtmfp.application.AudioWriter B()
{
return new com.jcumulus.server.rtmfp.application.D(I, H);
return new com.jcumulus.server.rtmfp.application.AudioWriter(I, H);
}
public F K()
public VideoWriter K()
{
return new F(I, H);
return new VideoWriter(I, H);
}
public void F()
......@@ -126,17 +124,17 @@ public class H
A();
}
protected com.jcumulus.server.rtmfp.e.A C(String s, String s1)
protected com.jcumulus.server.rtmfp.flow.A C(String s, String s1)
{
return A("_result", s, s1);
}
public com.jcumulus.server.rtmfp.e.A A(String s, String s1)
public com.jcumulus.server.rtmfp.flow.A A(String s, String s1)
{
return A("onStatus", s, s1);
}
public com.jcumulus.server.rtmfp.e.A B(String s, String s1)
public com.jcumulus.server.rtmfp.flow.A B(String s, String s1)
{
return A("_error", s, s1);
}
......@@ -293,15 +291,15 @@ public class H
int j3 = i3;
byte byte0 = 0;
if(k2 > 0)
byte0 |= com.jcumulus.server.rtmfp.d.E.M.intValue();
byte0 |= com.jcumulus.server.rtmfp.publisher.E.M.intValue();
if(j2 < ainteger.length - 1)
{
j2++;
integer = ainteger[j2];
byte0 |= com.jcumulus.server.rtmfp.d.E.C.intValue();
byte0 |= com.jcumulus.server.rtmfp.publisher.E.C.intValue();
j3 = integer.intValue() - k2;
}
com.jcumulus.server.rtmfp.g.B b2 = H.B();
com.jcumulus.server.rtmfp.stream.B b2 = H.B();
int k3 = j3 + 4;
if(!flag1 && k3 > b2.D())
{
......@@ -391,7 +389,7 @@ public class H
return k;
}
public com.jcumulus.server.rtmfp.g.A A(boolean flag)
public com.jcumulus.server.rtmfp.stream.BinaryWriter A(boolean flag)
{
K k = H();
if(!flag)
......@@ -402,7 +400,7 @@ public class H
return k.E();
}
public com.jcumulus.server.rtmfp.e.F B(String s)
public com.jcumulus.server.rtmfp.flow.F B(String s)
{
K k = H();
k.E().B((byte)15);
......@@ -412,7 +410,7 @@ public class H
return k.F();
}
private void A(com.jcumulus.server.rtmfp.g.A a, String s, double d)
private void A(com.jcumulus.server.rtmfp.stream.BinaryWriter a, String s, double d)
{
a.B((byte)20);
a.A(0);
......@@ -423,21 +421,21 @@ public class H
a.B((byte)5);
}
public com.jcumulus.server.rtmfp.e.F A(String s)
public com.jcumulus.server.rtmfp.flow.F A(String s)
{
K k = H();
A(k.E(), s, 0.0D);
return k.F();
}
public com.jcumulus.server.rtmfp.e.F J()
public com.jcumulus.server.rtmfp.flow.F J()
{
K k = H();
A(k.E(), "_result", E.doubleValue());
return k.F();
}
com.jcumulus.server.rtmfp.e.A A(String s, String s1, String s2)
com.jcumulus.server.rtmfp.flow.A A(String s, String s1, String s2)
{
K k = H();
A(k.E(), s, E.doubleValue());
......@@ -449,7 +447,7 @@ public class H
}
boolean flag = k.F().D();
k.F().B(true);
com.jcumulus.server.rtmfp.e.A a = new com.jcumulus.server.rtmfp.e.A(k.F());
com.jcumulus.server.rtmfp.flow.A a = new com.jcumulus.server.rtmfp.flow.A(k.F());
if(s.equals("_error"))
a.A("level", "error");
else
......@@ -484,7 +482,7 @@ public class H
int k = b.I();
do
{
com.jcumulus.server.rtmfp.g.B b1 = H.B();
com.jcumulus.server.rtmfp.stream.B b1 = H.B();
if(b1.D() < 12)
{
H.A(false);
......@@ -498,10 +496,10 @@ public class H
i1 += D(N);
byte byte0 = 0;
if(j > 0)
byte0 |= com.jcumulus.server.rtmfp.d.E.M.intValue();
byte0 |= com.jcumulus.server.rtmfp.publisher.E.M.intValue();
if(i1 > b1.D())
{
byte0 |= com.jcumulus.server.rtmfp.d.E.C.intValue();
byte0 |= com.jcumulus.server.rtmfp.publisher.E.C.intValue();
l = b1.D() - (i1 - l);
i1 = b1.D();
flag1 = true;
......@@ -529,36 +527,36 @@ public class H
int D(int i)
{
int j = com.jcumulus.server.rtmfp.b.C.A(J);
j += com.jcumulus.server.rtmfp.b.C.A(i);
int j = com.jcumulus.server.rtmfp.pipe.C.A(J);
j += com.jcumulus.server.rtmfp.pipe.C.A(i);
if(L > i)
G.error((new StringBuilder()).append("stageAck ").append(L).append(" superior to stage ").append(i).append(" on flowWriter ").append(J).toString());
j += com.jcumulus.server.rtmfp.b.C.A(i - L);
j += L <= 0 ? I.length + (C != 0 ? 4 + com.jcumulus.server.rtmfp.b.C.A(C) : 2) : 0;
j += com.jcumulus.server.rtmfp.pipe.C.A(i - L);
j += L <= 0 ? I.length + (C != 0 ? 4 + com.jcumulus.server.rtmfp.pipe.C.A(C) : 2) : 0;
return j;
}
public void A(com.jcumulus.server.rtmfp.g.B b, int i, byte byte0, boolean flag, Packet b1, int j)
public void A(com.jcumulus.server.rtmfp.stream.B b, int i, byte byte0, boolean flag, Packet b1, int j)
{
if(L == 0 && flag)
byte0 |= com.jcumulus.server.rtmfp.d.E.N.intValue();
byte0 |= com.jcumulus.server.rtmfp.publisher.E.N.intValue();
if(j == 0)
byte0 |= com.jcumulus.server.rtmfp.d.E.H.intValue();
byte0 |= com.jcumulus.server.rtmfp.publisher.E.H.intValue();
if(B)
byte0 |= com.jcumulus.server.rtmfp.d.E.E.intValue();
byte0 |= com.jcumulus.server.rtmfp.publisher.E.E.intValue();
G.debug((new StringBuilder()).append("FlowWriter ").append(J).append(" stage ").append(i).toString());
b.B(byte0);
if(flag)
{
b.D(J);
b.D(i);
b.D((byte0 & com.jcumulus.server.rtmfp.d.E.H.intValue()) == 0 ? i - L : 0);
b.D((byte0 & com.jcumulus.server.rtmfp.publisher.E.H.intValue()) == 0 ? i - L : 0);
if(L == 0)
{
b.C(I);
if(C > 0)
{
b.B((byte)(1 + com.jcumulus.server.rtmfp.b.C.A(C)));
b.B((byte)(1 + com.jcumulus.server.rtmfp.pipe.C.A(C)));
b.B((byte)10);
b.D(C);
}
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -20,11 +20,9 @@ package com.jcumulus.server.rtmfp.d;
* This file is a part of jCumulus.
*/
import com.jcumulus.server.rtmfp.e.F;
import com.jcumulus.server.rtmfp.g.A;
import com.jcumulus.server.rtmfp.flow.F;
import com.jcumulus.server.rtmfp.stream.BinaryWriter;
// Referenced classes of package com.jcumulus.server.rtmfp.d:
// I
public class K extends I
{
......@@ -32,7 +30,7 @@ public class K extends I
public K()
{
super(true);
J = new A(G);
J = new BinaryWriter(G);
I = new F(J);
}
......@@ -41,7 +39,7 @@ public class K extends I
return I;
}
public A E()
public BinaryWriter E()
{
return J;
}
......@@ -52,5 +50,5 @@ public class K extends I
}
private F I;
private A J;
private BinaryWriter J;
}
package com.jcumulus.server.rtmfp.d;
package com.jcumulus.server.rtmfp.publisher;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......
package com.jcumulus.server.rtmfp.g;
package com.jcumulus.server.rtmfp.stream;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -25,7 +25,7 @@ import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
public class B extends com.jcumulus.server.rtmfp.g.A implements Cloneable
public class B extends BinaryWriter implements Cloneable
{
public static final int F = 1215;
......
package com.jcumulus.server.rtmfp.g;
package com.jcumulus.server.rtmfp.stream;
/**
* jCumulus is a Java port of Cumulus OpenRTMP
......@@ -20,16 +20,16 @@ package com.jcumulus.server.rtmfp.g;
* This file is a part of jCumulus.
*/
import com.jcumulus.server.rtmfp.b.C;
import com.jcumulus.server.rtmfp.pipe.C;
import java.math.BigInteger;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.apache.log4j.Logger;
public class A
public class BinaryWriter
{
private static final Logger C = Logger.getLogger(A.class);
private static final Logger C = Logger.getLogger(BinaryWriter.class);
protected byte E[];
private int A;
......@@ -37,7 +37,7 @@ public class A
protected int B;
public A(byte abyte0[])
public BinaryWriter(byte abyte0[])
{
E = abyte0;
A = 0;
......@@ -234,7 +234,7 @@ public class A
public void D(int i)
{
byte byte0 = com.jcumulus.server.rtmfp.b.C.A(i);
byte byte0 = com.jcumulus.server.rtmfp.pipe.C.A(i);
switch(byte0)
{
case 4: // '\004'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment