<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [Live-devel] Dynamically adding streams with
reference</title></head><body>
<blockquote type="cite" cite><font face="Verdana">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.</font></blockquote>
<div><br></div>
<div>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).</div>
<div><br></div>
<div><br></div>
<blockquote type="cite" cite><font face="Verdana">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.</font></blockquote>
<div><br></div>
<div>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.</div>
<div><br></div>
<div>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.</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>