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

Dixon Siu dixonsiu at mediaglue.co.jp
Thu May 6 18:31:08 PDT 2004


Ross,

You are the man! Thanks a lot!

Dixon

> -----Original Message-----
> From: live-devel-bounces at ns.live.com 
> [mailto:live-devel-bounces at ns.live.com]On Behalf Of Ross Finlayson
> Sent: Thursday, May 06, 2004 4:49 PM
> To: LIVE.COM Streaming Media - development & use
> Subject: Re: [Live-devel] Graceful way to shut down a RTP or RTSP server.
> 
> 
> 
> >In my application, I have created a thread to start a RTSP server that
> >stream video1. Then on demand, I will create another thread just to add
> >session to the RTSP server that stream video2.
> 
> NO!  You can't do this!  See 
> <http://www.live.com/liveMedia/faq.html#threads>
> 
> >I want to shutdown the server by using one of the
> >following methods:
> >1. RTSPServer::RTSPClientSession::handleCmd_TEARDOWN();
> >2. env->taskScheduler().doEventLoop("STOP");
> 
> Both of these are very wrong.  (The first is how the server (internally) 
> closes down a client session; the second will just return 
> immediately (see 
> "BasicTaskScheduler0.cpp").)
> 
> Instead, just call
>          Medium::close(rtspServer);
> (if "rtspServer" is a pointer to your RTSP Server object).
> 
> 
> 	Ross Finlayson
> 	LIVE.COM
> 	<http://www.live.com/>
> 
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live.com
> http://lists.live.com/mailman/listinfo/live-devel
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.677 / Virus Database: 439 - Release Date: 2004/05/04
> 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.677 / Virus Database: 439 - Release Date: 2004/05/04



More information about the live-devel mailing list