Skip to content
Snippets Groups Projects
Commit f00fbdae authored by Otmane Mabrouk's avatar Otmane Mabrouk
Browse files

I changed the name of the class StreamingProxy to StreamProxy, i also changed...

I changed the name of the class StreamingProxy to StreamProxy, i also changed the variable name host to aut, the function name setHost to setAut and also the type of the function setState from void to integer
parent 82708a53
No related branches found
No related tags found
No related merge requests found
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment