[Live-devel] Graceful way to shut down a RTP or RTSP server.

Ross Finlayson finlayson at live.com
Thu May 6 21:37:35 PDT 2004


>I read the faq and it does suggest that I can do the following:
>1. env->taskScheduler().doEventLoop(stopRTSP);
>2. stopRTSP = "0";

Sort of.  A better (clearer) way to do this would be:

         char stopRTSP = 0; // note: char, not char*
         env->taskScheduler().doEventLoop(&stopRTSP);
and then, later, within an event handler:
         stopRTSP = ~0; // any value other than 0 will work.

>I put the code in. However, when I set stopRTSP to "0", the loop cannot
>exit. Am I missing something? I suspect that prodecure SingleStep (called
>inside doEventLoop) is in a while loop so that it doesn't come back  to
>check the watchVariable in procedure doEventLoop.

This is unlikely, but remember that You Have Complete Source Code, so you 
can always check this for yourself.


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>



More information about the live-devel mailing list