[Live-devel] problems moving to asynchronous rtsp interface

Ross Finlayson finlayson at live555.com
Sat Nov 26 12:57:11 PST 2011


> >> I realized that and am working on the subclass from RTSPClient idea. Because there is a LOT of other instance data, just like in the openRTSP example, thre is a LOT of global information.  But I am finding that the RTSPClient was not really designed to be subclassed. The gotcha I have now is, although it does nothing but set values in it’s constructor, I cannot instanitiate my subclass without an initializer for the RTSPClient base class, but then I cannot call setBaseURL() for example, later when I know all the info.

I'm not sure I understand this.  Your subclass's constructor will, of course, call the "RTSPClient" constructor before initializing its own variables.  One of the parameters to the "RTSPClient" constructor is a "rtsp://" URL, which the "RTSPClient" constructor uses, internally, by calling "setBaseURL()" to save its value.

Are you saying that you want to call "setBaseURL()" from your subclass, to set a *different* "rtsp://" URL - one that you want to build inside your subclass constructor (rather than one that you know in advance and are giving to the subclass constructor, as is the case for "RTSPClient")?

If that's the case, then yes, "setBaseURL()" will need to be protected, rather than private (and then your subclass constructor can just pass NULL as the "rtspURL" parameter to the "RTSPClient" constructor, before it creates the real URL).

So, would you like me to make "setBaseURL()" protected rather than private?  Any other member functions or variables as well?  (This is what this mailing list is for :-)


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/20111126/f736383a/attachment.html>


More information about the live-devel mailing list