[Live-devel] Set ProxyServerMediaSession::fProxyRTSPClient as protected

Jesús Leganés jesus.lc at vaelsys.com
Mon Jul 2 00:46:24 PDT 2012


> So if you want to detect/log every client connection (etc.) to the proxy
> server, then you would not modify (or subclass) the "Proxy*" code at all.
> Instead, you would subclass "RTSPServer" and
> "RTSPServer::RTSPClientSession", and reimplement the "handleCmd_SETUP()"
> (etc.) virtual functions.
>
Correctly, and i have this done already :-) At this moment i'm able to
detect and log this way connections between clients and the proxy, and
now i need to detect and log connections between the proxy and the
remote camera (the 'back-end' server as you say).


> But if your intention is instead to detect/log only connections from the
> proxy server to the 'back-end' server (which is only a subset of the number
> of connections from front-end clients to the proxy server), then:
>
Yes, exactly what i want to do :-)

> The fact is that reviewing the code it seems to me it's the correct
> aproach, just use a ProxyServerMediaSession child constructor that
> inits ProxyServerMediaSession::fProxyRTSPClient to my own
> ProxyRTSPClient child class
>
>
> Yes, but note that the existing "ProxyServerMediaSession" constructor
> already initializes the "fProxyRTSPClient" field (to a new "ProxyRTSPClient"
> object), so you'll need to delete this (using "Medium::close()") first,
> before assigning your new "ProxyRTSPClient" subclass object.
>
Oh, i didn't thought about it, thanks for the advice... :-)

> But hold on: At present, the "ProxyRTSPClient" class is defined only inside
> the "ProxyServerMediaSession.cpp" file, not in a header file, so you
> shouldn't even have the ability to access it, let alone subclass it.  So,
> are you sure that this is something that you really want to do??
>
Well, i don't know if there's a better (or at least a different) way
to do this, but if it's the only way to be able to detect and log the
connections from the proxy to the remote back-end server (the camera)
and you can't be able to suggest to me any other way to do it, then
yes, this and the redefination of RTSPClient::sendRequest() method in
a subclass is what i want to do :-) But i'm open to ideas, too... :-D


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



More information about the live-devel mailing list