[Live-devel] Set a limit for RTSP Client connections.
    Cristiano Belloni 
    belloni at imavis.com
       
    Wed Sep 16 09:11:40 PDT 2009
    
    
  
Hello Ross and everyone else,
I'm using live555 RTSP server (unicast) in a system with limited memory 
and CPU resources.
When too many clients connect to the server, the CPU can't cope with the 
load, and I start losing frames or get read errors from the pipe I read 
the frames from (it's a realtime application, and I think the kernel 
starts to be unstable when the system CPU time is very high).
So, I'd like to set a static limit to the number of users who can get 
the live stream at the same time. Is there a way?
If there isn't, couldn't I just create a derived class of the RTPsinks 
I'm using, increase a shared counter everytime their CreateNew() method 
is called and decrease it in the destructor of the sink?
Then, if the counter is over the limit, I can refuse to create a new 
sink in the createNewRTPSink method of my MediaSubsession (aka return a 
NULL pointer).
Would it work?
Additionally, the increase and decrease counter operations wouldn't have 
to be mutually exclusive because the library works in a non-threaded 
fashion, is it right?
Thanks in advance,
Cristiano.
-- 
Belloni Cristiano
Imavis Srl.
www.imavis.com <http://www.imavis.com>
belloni at imavis.com <mailto://belloni@imavis.com>
    
    
More information about the live-devel
mailing list