<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi, </div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Thanks for your quick response. I think I might not state my question very clearly.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>I am working on a solution to add or remove the stream dynamically. I studied the codes in DynamicRTSPServer.cpp too. </div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>My codes are rather simple. In some time point, I use RTSPServer::addServerMediaSession() to add the new created MPEG2TransportUDPServerMediaSubsession instance by static method CreateNew(). And after a period of time, I use RTSPServer::removeServerMediaSession() to remove this stream session.</div><div><br></div><div><span
class="Apple-tab-span" style="white-space:pre"> </span>The odd things are although both add/remove function finished successfully, there is no RTP data received from player even RTSP commands return 200OK. Which I doubt that the data sent to the RTPSource is not correctly received.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span> There is another strange thing is mentioned below, although <span style="font-size: 12pt; ">removeServerMediaSession() return successfully, once player disconnects, my server complains "</span><span style="font-size: 12pt; ">BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor" and failed.</span></div><div><span style="font-size: 12pt; "><br></span></div><div><span style="font-size: 12pt; "><span class="Apple-tab-span" style="white-space:pre"> </span>I used to write a similar server process, which uses </span><span style="font-size: 12pt;
">addServerMediaSession() to add a session at the beginning. That server process works fine. So, </span><span style="font-size: 12pt; "> I am wandering is that because there might be some RTP/RTCP sockets not cleared in the </span><span style="font-size: 12pt; ">BasicTaskScheduler::fReadSet. But I don't know how to identify it. Hope if you can shed any light on that to me?</span></div><div><span style="font-size: 12pt; "><br></span></div><div><span style="font-size: 12pt; ">Regards,</span></div><div><span style="font-size: 12pt; ">Lan Zang(Sander)</span></div><div><br></div> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Ross Finlayson <finlayson@live555.com><br> <b><span style="font-weight:
bold;">To:</span></b> LIVE555 Streaming Media - development & use <live-devel@ns.live555.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, July 17, 2012 8:11 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Live-devel] How to remove ServerMediaServer dynamically<br> </font> </div> <br>
<div id="yiv151315449"><div><div><blockquote type="cite"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: times, serif; font-size: 12pt; "><div><span class="yiv151315449Apple-tab-span" style="white-space:pre;"> </span>I am using live555 media server. I am trying to remove media by calling RTSPServer::removeServerMediaSession(session); </div></div></div></blockquote><div><br></div>The code for "LIVE555 Media Server" application is not intended to be modified (especially by casual hobbyists). (Note that the "LIVE555 Media Server" will remove "ServerMediaSession" objects automatically if you remove its underlying file, so you shouldn't need to modify the server's code to do this.)</div><div><br></div><div>Instead, you should develop your own server application (perhaps using the "testOnDemandRTSPServer" demo application).</div><div><br></div><div><br><blockquote type="cite"><div><div style="color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255); font-family: times, serif; font-size: 12pt; "><div>This media is created by calling RTSPServer::addServerMediaSession(session); The problem is live555 server will complain "BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor" then abort immediately. </div></div></div></blockquote><div><br></div></div>Sorry, but I can't explain this (and because you have modified the code, I can't help you here).<br><br><div>
<span class="yiv151315449Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; "><span class="yiv151315449Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br>http://www.live555.com/</span></span>
</div>
<br></div></div><br>_______________________________________________<br>live-devel mailing list<br><a ymailto="mailto:live-devel@lists.live555.com" href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br><a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br><br><br> </div> </div> </div></body></html>