[Live-devel] Detect proxy name before being proccessed

Jesús Leganés jesus.lc at vaelsys.com
Mon Jun 25 04:29:26 PDT 2012


Hi Ross.

I have been trying what you told me about subclass RTSPServer and
redefine lookupServerMediaSession() and it seems to be the way to go,
the downside is that it's not fully working: when i try to connect to
the server a new auto-generated proxy is created and returned, but the
client connection fails, but if i try to connect again now the
connection works because the proxy was already created.

Looking at the code and doing some traces it seems to me that the fact
is that when the ProxyRTSPClient and the connection with the camera is
done it is being returned althought it has not finished to configure
(it has send the DESCRIBE command to the camera, but haven't received
an answer nor configured itself), so the client can't do the
connection with an error "live555 demux error: Nothing to play for
..." (i'm using VLC as client for the tests, by the way). The traces
and the client error point me to
ProxyServerMediaSession::continueAfterDESCRIBE() method, that in fact
it seems is creating the RTSP subsessions with the data (that makes
sense with the client error because althought the proxy is build, it's
streaming an empty stream), but being the method private and also not
virtual I can't be able to access to it.

So my question is, how can i be able to detect when the proxy has
finished with it's configuration and added the camera connection
ProxyServerMediaSubsessions? And more explicitly, how can i be able to
do that the RTSPServer::lookupServerMediaSession() method return a
fully configured and ready to use ProxyServerMediaSession object?

Greetings, Jesús Leganés Combarro.


2012/6/20 Jesús Leganés <jesus.lc at vaelsys.com>
>>
>> If I correctly understand your question, what you're asking for is how to build a proxy server that installs, on demand, new "ProxyServerMediaSession" objects, based upon the stream name in the URL that each client requests.
>>
> Exactly: on our scheme, the proxy names will have embeded the data required to connect to the remote camera, so if you try to access to a camera that don't have been proxied yet, you can parse the required proxy name create a new proxy automatically on demand.
>
>
>>
>> The way you would do this is to subclass "RTSPServer" and redefine the virtual function "lookupServerMediaSession()", in almost exactly the same way that this is done for the "DynamicRTSPServer" code that's used to implement the "LIVE555 Media Server" application.  See, for illustration, the code in the "mediaServer" directory.
>>
> Ok, this seems nicer to me :-) First try to find and return a proxy, and if it doesn't exists, try to create and return a new one. I like it :-)
>
>
>>
>> You should *not* need to modify the supplied "ProxyServerMediaSession" or "RTSPServer" code to do this.
>>
> Of course, when i was talking about overwrite the methods i was thinking about doing it in a child class... :-D
>
>
>
> --
> Jesús Leganés Combarro
> Software developer at Vaelsys
>



--
Jesús Leganés Combarro
Software developer at Vaelsys



More information about the live-devel mailing list