[Live-devel] Get connections on ProxyServerMediaSession

Jesús Leganés jesus.lc at vaelsys.com
Tue Jun 12 00:20:35 PDT 2012


Hi Ross,


> The "ProxyServerMediaSession" class was intended to be a self-contained,
> fully-featured class that could be used 'as is' to build RTSP proxy
> servers.  For now at least, it is not intended to be customizable.  (This
> may change in the future, depending on how the code ends up being used, but
> right now the intention is that the code be used 'as is'.)
>
> In particular, the proxy is implemented using a (single) "RTSPClient"
> object for each 'back end' stream (e.g., a network camera), and therefore
> keeps open a (single) RTSP connection to the 'back-end' server.
>
> Thanks for your explication :-) I have been reading the code and the
headers this last days and found and alternative design, that i believe is
closest to how Live555 design was intended for according to what have you
say:

* instead of clients connect directly to ProxyServerMediaSession, they
connect to RTSPServer, and this creates new RTSPServer::RTSPClientSession
objects, one for each new client connection, and later this ones are being
given to the ProxyServerMediaSession to be processed by the proxy.

* So, what i have done are two new RTSPServer
and RTSPServer::RTSPClientSession child classes so i can be able to catch
when new connections are created (RTSPServer::RTSPClientSession
constructor) or deleted (RTSPServer::RTSPClientSession destructor).

At least until this moment it seems to work... :-D Is this the correct way
to do it? There's another better, more direct way to be notified so i don't
need to create the two new child classes?


However, as you noted, we don't want the 'back-end' server to be streaming
> data when it's not needed.  Our implementation accomplishes this not by
> closing the connection when the last client leaves, but instead by
> automatically sending a RTSP "PAUSE" command to stop the stream.  (Later,
> if a new client arrives, the proxy will automatically resume the streaming
> by sending another RTSP "PLAY" command.)
>

This are REALLY great news! :-D I was thinking about to close the
connection checking the ProxyServerMediaSession referenceCount, but if this
is done internally by the proxy and in a better way (pause the stream
instead of close the connection) i think is a great improve :-) Thanks! :-D


P.D.: As a side note, to put just a single line on the Doxygen explain
what each method is intended for would be a huge imprevent... ;-)

-- 
Jesús Leganés Combarro <jesus.lc at vaelsys.com>
Software developer at Vaelsys <http://www.vaelsys.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120612/4c72e55a/attachment-0001.html>


More information about the live-devel mailing list