try commenting out the bandwidth control settings. Cheers
Carlos On 6/18/07, LoginDOT.com <[EMAIL PROTECTED]> wrote:
Hello, im italian ... i have some trouble with english :( im sorry .. I have, Eclipse 3.1, red5-0.6.2, and Java JDK 1.5.0.11 Tufat have a video module for us chat, this is the package included in Tufat. http://www.tufat.com/downloads/AVM_Free_Version.zip ... This application.java file dont work. Can you help me to correct this java file? Can you try this and correct the errors? This is the source code of java file: ----------------------------------------------------- package org.red5.server.webapp.multiavm; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.red5.server.adapter.ApplicationAdapter; import org.red5.server.api.IConnection; import org.red5.server.api.IScope; import org.red5.server.api.IClient; import org.red5.server.api.so.ISharedObject; import org.red5.server.api.stream.IStreamCapableConnection; import org.red5.server.api.stream.support.SimpleBandwidthConfigure; import org.red5.server.api.Red5; import java.util.ArrayList; public class Application extends ApplicationAdapter { private static final Log log = LogFactory.getLog(Application.class); ISharedObject so; @Override public boolean appStart(IScope app) { createSharedObject(app, "so", false); so = getSharedObject(app, "so"); so.setAttribute("users", new Object[]{} ); so.setAttribute("globalUserId", 0 ); log.info("MultiAVM started"); return super.appStart(app); } @Override public boolean appConnect(IConnection conn, Object[] params) { int _globalUserId = ((Integer)so.getAttribute("globalUserId")).intValue(); so.setAttribute("globalUserId", _globalUserId+1 ); conn.getClient().setAttribute("id", _globalUserId+1); log.info("Client connected " + conn.getClient().getId() + " conn " + conn); log.info("Setting stream id: "+ getClients().size()); // just a unique number return true; } @Override public void appDisconnect(IConnection conn) { ArrayList _users = (ArrayList)so.getAttribute("users"); int _clientId = ((Integer)conn.getClient().getAttribute("id")).intValue(); _users.set(_clientId, null); log.info("Client disconnected: " + _clientId); so.setAttribute("users", _users ); super.appDisconnect(conn); } public void setBandwidth(int _bw) { IConnection conn = Red5.getConnectionLocal(); //org.red5.server.api.IFlowControllable.setBandwidthConfigure IClient _client = conn.getClient(); //IStreamCapableConnection streamConn = (IStreamCapableConnection) conn; SimpleBandwidthConfigure config = new SimpleBandwidthConfigure(); // set the bandwidth for the client if ( _bw == 1 ) { // modem settings config.setMaxBurst((int)(200000/8)); config.setBurst((int)(200000/8)); config.setOverallBandwidth((int)(56000/8)); _client.setBandwidthConfigure(config); //this.setBandwidthLimit( 35000/8, 22000/8 ); } else if ( _bw == 2 ) { // DSL settings config.setMaxBurst((int)(500000/8)); config.setBurst((int)(500000/8)); config.setOverallBandwidth((int)(115000/8)); _client.setBandwidthConfigure(config); //this.setBandwidthLimit( 800000/8, 100000/8 );// } else /*if ( bw == 3 )*/ { // LAN settings config.setMaxBurst((int)(1000000/8)); config.setBurst((int)(1000000/8)); config.setOverallBandwidth((int)(1000000/8)); _client.setBandwidthConfigure(config); //this.setBandwidthLimit( 400000, 400000 ); } } } _______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
-- ------------------------------------------------------------------- If a man speaks in a forest and his wife is not there, is he still wrong?
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
