[Live-devel] All client termination

Ross Finlayson finlayson at live555.com
Tue Sep 11 00:29:42 PDT 2012


> Right now Live555 loop run in separate thread. The clean up function can be called from the another thread

No!  You cannot safely do this!  Read the FAQ (that you were asked to do before posting to this mailing list)!

Apart from "triggerEvent()" (see below), all calls to LIVE555 code *must* be done within the LIVE555 thread - e.g., from a LIVE555 event handler.

For an illustration of how to shutdown (and reclaim) a "RTSPClient" object - and all of the objects that it uses - see the function "shutdownStream()" in "testProgs/testRTSPClient.cpp".

Now, you may wish to signal this shutdown/reclaim mechanism from an external thread - i.e., from a thread other than one that's running the LIVE555 event loop, for example, a GUI.  To do this, use the "event trigger" mechanism (see the FAQ and "UsageEnvironment/include/UsageEnvironment.hh").  Note that the "triggerEvent()" function is the *only* LIVE555 function that can be called from an external thread.


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/20120911/4be49e8b/attachment.html>


More information about the live-devel mailing list