[Live-devel] How to remove ServerMediaServer dynamically

Lan Zang zanglan at yahoo.com
Tue Jul 17 03:43:00 PDT 2012


Hi, 

Thanks for your quick response. I think I might not state my question very clearly.

I am working on a solution to add or remove the stream dynamically. I studied the codes in DynamicRTSPServer.cpp too. 

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.

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.

 There is another strange thing is mentioned below, although removeServerMediaSession() return successfully, once player disconnects, my server complains "BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor" and failed.

I used to write a similar server process, which uses addServerMediaSession() to add a session at the beginning. That server process works fine. So,  I am wandering is that because there might be some RTP/RTCP sockets not cleared in the BasicTaskScheduler::fReadSet. But I don't know how to identify it. Hope if you can shed any light on that to me?

Regards,
Lan Zang(Sander)


________________________________
 From: Ross Finlayson <finlayson at live555.com>
To: LIVE555 Streaming Media - development & use <live-devel at ns.live555.com> 
Sent: Tuesday, July 17, 2012 8:11 AM
Subject: Re: [Live-devel] How to remove ServerMediaServer dynamically
 

I am using live555 media server. I am trying to remove media by calling RTSPServer::removeServerMediaSession(session); 
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.)

Instead, you should develop your own server application (perhaps using the "testOnDemandRTSPServer" demo application).



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. 
Sorry, but I can't explain this (and because you have modified the code, I can't help you here).


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/ 

_______________________________________________
live-devel mailing list
live-devel at lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120717/b81261e2/attachment.html>


More information about the live-devel mailing list