From f00fbdaeb4c7f0f364d5ce7eb414a54c76cb44f4 Mon Sep 17 00:00:00 2001 From: otmane <otmane.mabrouk.etu@univ-lille.fr> Date: Fri, 5 Apr 2024 23:27:21 +0200 Subject: [PATCH] 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 --- .../{StreamingProxy.java => StreamProxy.java} | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename client/src/main/java/org/red5/proxy/{StreamingProxy.java => StreamProxy.java} (94%) 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 753ec830..5ba4df96 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() { -- GitLab