I did a bit more of an investigation into this with the wild hope that I might debug this ( with my noob java skillz ). So I set up the eclipse debugger and fired it away. Now I finally give up after 3 hours. However I did have some interesting finds.
Firstly, I started noticing the problem in: org.red5.server.net.rtmp.RTMPConnection.java As i used my program to subscribe and unsubscribe to my own streams, I noticed something: 1, When a stream is deleted by the deleteStreamById(streamId) function, it did not call the unreserveStreamId(int streamId) function!! therefore, this causes the On 1/24/07, Nankun Huang <[EMAIL PROTECTED]> wrote: > Hi, > Ok, sorry I didn't look at the wiki more carefully =) This > actually happens on the playback side too. When a client subscribe to > more than 12 streams ( one after another ), the client will not be > able to subscribe to any new ones anymore. Thnx > > NK > > > On 1/24/07, Chris Allen <[EMAIL PROTECTED]> wrote: > > Sorry for the confusion. I thought that it had been fixed already. It is a > > priority to have it fixed before the rc2 release though. > > > > -Chris > > > > > > On 1/24/07, Thijs Triemstra <[EMAIL PROTECTED]> wrote: > > > There's a bug for this issue on > > http://jira.red5.org/browse/SN-14 > > > > > > Thijs > > > > > > > > > Op 24-jan-2007, om 11:27 heeft Nankun Huang het volgende geschreven: > > > > > > > Hi all, > > > > According to an email which I got from this list yesterday, it was > > > > stated that the 12 connection limit bug is fixed. I was overjoyed and > > > > rushed to test out if this was the case. However after downloading the > > > > lattest trunk and compiling, this does not seem to be the case. There > > > > also isn't a bug report on the wiki about this and when the bug was > > > > reported unto the mailing list earlier ( by someone else, not me ), it > > > > was December and the issue didn't seem to have gotten much attention > > > > from the dev team. Here's a simple adobe flex program which I made > > > > that illustrates the bug. the MXML source file is below: > > > > > > > > The bug happens when a user publishes a stream, unpublish it, publish > > > > a new stream with a different stream name and then unpublish it > > > > again... rinse and repeat about 12 times and it stops working ( I no > > > > longer get the publish success message ). I guess the intended > > > > functionality is that each user shouldnt' publish more than 12 > > > > simultaneous streams which makes sense.. however in this case, once a > > > > stream is unpublished, it should just get deleted and no longer > > > > "count" toward the user. Thanks for your attention. > > > > > > > > It seems that when I reach the limit of the number of streams that can > > > > be published, red5 gives me this error in the console > > > > > > > > [java] [WARN] 575703 pool-1-thread-2: > > > > ( org.red5.server.net.rtmp.RTMPHandler > > > > .warn ) Unhandled ping: Ping: 3, 0, 0, -1 > > > > [java] 00 03 00 00 00 00 00 00 00 00 > > > > > > > > > > > > > > > > ------ and here's the mxml file > > > > > > > > <?xml version="1.0" encoding="utf-8"?> > > > > <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" > > > > layout="absolute"> > > > > <mx:Script> > > > > <![CDATA[ > > > > import mx.utils.UIDUtil ; > > > > import flash.net.NetStream; > > > > import flash.net.NetConnection; > > > > import flash.net.ObjectEncoding; > > > > import flash.media.Microphone; > > > > import flash.events.NetStatusEvent; > > > > import mx.controls.Alert; > > > > > > > > //set to AMF0 for red5 > > > > NetConnection.defaultObjectEncoding = > > ObjectEncoding.AMF0; > > > > > > > > private var nc: NetConnection; > > > > private var ns:NetStream; > > > > private var ns_play:NetStream; > > > > private var stream_name:String; > > > > > > > > //connect to server > > > > private function connect():void{ > > > > nc = new NetConnection(); > > > > nc.client = this; > > > > nc.addEventListener(NetStatusEvent.NET_STATUS, > > > > netStatusHandler); > > > > nc.connect ( "rtmp://localhost/fitcDemo"); > > > > } > > > > > > > > //useless callbcks from fitcDemo > > > > public function setId( id:String):void{ > > > > trace("server invoked set ID: "+ id); > > > > } > > > > > > > > public function newStream( id:String):void{ > > > > trace("server invoked newStream: "+ id); > > > > } > > > > //start to publish the stream > > > > public function startPub():void{ > > > > var mic:Microphone = Microphone.getMicrophone(); > > > > // generate a unique stream name every time with the > > > > unique ID generator > > > > stream_name = UIDUtil.createUID(); > > > > > > > > this.btnPub.enabled = false; > > > > ns = new NetStream(nc); > > > > ns.attachAudio( mic ) > > > > ns.addEventListener( NetStatusEvent.NET_STATUS, > > > > netStreamStatusHandler); > > > > ns.publish( stream_name ); > > > > > > > > } > > > > > > > > //stop publishing the stream > > > > public function stopPub():void{ > > > > ns_play.close(); > > > > ns.close(); > > > > this.btnPub.enabled = true; > > > > this.btnStop.enabled= false; > > > > } > > > > > > > > > > > > > > > > private function netStatusHandler > > > > (event:NetStatusEvent):void{ > > > > trace(event.info.code); > > > > if(event.info.code == > > > > "NetConnection.Connect.Success") { > > > > this.btnPub.enabled = true; > > > > Alert.show('connected to server!!'); > > > > } > > > > } > > > > > > > > > > > > //when publish is successful, play the stream > > > > private function netStreamStatusHandler > > > > (event:NetStatusEvent):void{ > > > > if( event.info.code == "NetStream.Publish.Start" ) { > > > > trace(event.info.code); > > > > ns_play = new NetStream(nc); > > > > ns_play.play( stream_name ); > > > > this.btnStop.enabled = true; > > > > } > > > > } > > > > > > > > > > > > ]]> > > > > </mx:Script> > > > > <mx:Panel x="10" y="10" width="284" height="256" layout="absolute" > > > > title="Red5 12 connection limit bug "> > > > > <mx:Button x="10" y="10" label="Connect" click="connect()"/> > > > > <mx:Button x="10" y="40" label="Publish & Play" > > > > mouseDown="startPub()" enabled="false" id="btnPub"/> > > > > <mx:Button x="125" y="40" label="Stop" mouseDown="stopPub()" > > > > enabled="false" id="btnStop"/> > > > > <mx:Text x="10" y="70" text="Press connect to connect to > > > > server (pop up will inform you that its connected), when connected > > > > press publish & play to publish with your own mic and play the > > > > same stream you published. Press stop to stop the publishing and > > > > playing. Do this for 12 times, it'll die on the 13th time, > > > > illustrating the bug. Somtiems it fails before 12 times." > > > > width="251"/> > > > > </mx:Panel> > > > > </mx:Application> > > > > > > > > _______________________________________________ > > > > Red5 mailing list > > > > [email protected] > > > > http://osflash.org/mailman/listinfo/red5_osflash.org > > > > > > > > > _______________________________________________ > > > Red5 mailing list > > > [email protected] > > > http://osflash.org/mailman/listinfo/red5_osflash.org > > > > > > > > > _______________________________________________ > > Red5 mailing list > > [email protected] > > http://osflash.org/mailman/listinfo/red5_osflash.org > > > > > > > _______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
