[Live-devel] Reason for protected destructor on RTSPServer?

Eric.Brandt at nikon.com Eric.Brandt at nikon.com
Fri Aug 2 12:12:39 PDT 2019


Hello,

Live555 is working great in our proof of concept (thanks!)...time to move on use in production code, which brings up a question...

All example code seems to set up a server and then let it run until the process terminates, without any explicit cleanup.

Suppose in my project I want to start and stop an RTSPServer at designated times, clean up after stopping, with the possibility of re-starting later (on the same port even).

I notice the destructor of RTSPServer class is protected. What is the design goal here? What is the correct method of resource cleanup/recycling given this design?

So far, my only 'workaround' is to derive a class of my own from RTSPServer and make the derived class' destructor public.

Will destruction of the (derived) RTSPServer also clean up (delete) the media sessions registered with it (it appears yes, just want to confirm).

Anything else that needs to be cleaned up?

Can the UsageEnvironment and the TaskScheduler have lifetimes that span many server startups & shutdowns?

Thanks!
-Eric.

[cid:image001.gif at 01CAF67F.900E5BA0]


Eric Brandt
Senior Software Engineer
eric.brandt at nikon.com<mailto:stephen.hinds at nikon.com>
Tel:           +1 (262) 470-2705

Nikon Metrology, Inc. (Va)
9453 Innovation Drive
Manassas, VA 20110
USA
www.nikonmetrology.com<http://www.nikonmetrology.com/>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20190802/67ac633c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 3606 bytes
Desc: image001.jpg
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20190802/67ac633c/attachment.jpg>


More information about the live-devel mailing list