[Live-devel] Dynamically adding streams with reference counting

Ross Finlayson finlayson at live555.com
Tue Jun 24 17:06:58 PDT 2008


>I am trying to implement a dynamic rtsp server.  By this I mean it 
>will add the appropriate ServerMediaSession to the server when a url 
>is requested.  For example, if the server receives: 
>rtsp:ip:port/mystreamid, it will look up to see if the session 
>exists, and if not dynamically add it.

I hoped you looked at the code (in the "mediaServer" directory) for 
the "LIVE555 Media Server" product, because it does basically this 
(for streaming from files).


>I have the initiation and streaming working great!  However, I also 
>want to know when the client has closed its connection so I can 
>remove the dynamic ServerMediaSession.

Note that it's OK to remove a "ServerMediaSession" object even while 
clients are using it.  If you do this, then the object will get 
reclaimed automatically (using reference counting) when the last 
client stops streaming from it.

Alternatively, you can do what we do for the "LIVE555 Media Server": 
Keep the "ServerMediaSession" object around, and don't actually 
remove it unless we discover later that it's no longer relevant.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20080624/bc38a41b/attachment.html>


More information about the live-devel mailing list