diff --git a/client/src/main/java/org/red5/proxy/StreamingProxy.java b/client/src/main/java/org/red5/proxy/StreamProxy.java similarity index 94% rename from client/src/main/java/org/red5/proxy/StreamingProxy.java rename to client/src/main/java/org/red5/proxy/StreamProxy.java index 753ec830e04bd522f0f6a9df51a5d633e0dd6e51..5ba4df96715d5a378430292fd5a42ef77cbc401f 100644 --- a/client/src/main/java/org/red5/proxy/StreamingProxy.java +++ b/client/src/main/java/org/red5/proxy/StreamProxy.java @@ -44,13 +44,13 @@ import org.slf4j.LoggerFactory; * @author Andy Shaules (bowljoman@hotmail.com) * @author Paul Gregoire (mondain@gmail.com) */ -public class StreamingProxy implements IPushableConsumer, IPipeConnectionListener, INetStreamEventHandler, IPendingServiceCallback { +public class StreamProxy implements IPushableConsumer, IPipeConnectionListener, INetStreamEventHandler, IPendingServiceCallback { - private static Logger log = LoggerFactory.getLogger(StreamingProxy.class); + private static Logger log = LoggerFactory.getLogger(StreamProxy.class); private ConcurrentLinkedQueue<IMessage> frameBuffer = new ConcurrentLinkedQueue<>(); - private String host; + private String aut; private int port; @@ -99,15 +99,15 @@ public class StreamingProxy implements IPushableConsumer, IPipeConnectionListene this.publishName = publishName; this.publishMode = publishMode; // construct the default params - Map<String, Object> defParams = rtmpClient.makeDefaultConnectionParams(host, port, app); + Map<String, Object> defParams = rtmpClient.makeDefaultConnectionParams(aut, port, app); defParams.put("swfUrl", "app:/Red5-StreamProxy.swf"); - //defParams.put("pageUrl", String.format("http://%s:%d/%s", host, port, app)); + //defParams.put("pageUrl", String.format("http://%s:%d/%s", aut, port, app)); defParams.put("pageUrl", ""); rtmpClient.setSwfVerification(true); // set this as the netstream handler rtmpClient.setStreamEventHandler(this); // connect the client - rtmpClient.connect(host, port, defParams, this, params); + rtmpClient.connect(aut, port, defParams, this, params); } public void stop() { @@ -153,8 +153,8 @@ public class StreamingProxy implements IPushableConsumer, IPipeConnectionListene rtmpClient.onBWDone(null); } - public void setHost(String host) { - this.host = host; + public void setAut(String aut) { + this.aut = aut; } public void setPort(int port) { @@ -207,7 +207,7 @@ public class StreamingProxy implements IPushableConsumer, IPipeConnectionListene } } - protected void setState(StreamState state) { + protected int setState(StreamState state) { try { lock.acquire(); this.state = state; @@ -216,6 +216,7 @@ public class StreamingProxy implements IPushableConsumer, IPipeConnectionListene } finally { lock.release(); } + return 0; } protected StreamState getState() {