[Live-devel] Adding a ServerMediaSession to a running RTSPServer results a 'Bad file descriptor' error in BasicTaskScheduler::SingleStep(): select()

Ross Finlayson finlayson at live555.com
Fri Jul 29 08:27:43 PDT 2011


> Could you give me directions how to add a ServerMediaSession to a running RTSPServer.

Call "RTSPServer::addServerMediaSession()".  You can do this at any time.  (Ditto for "RTSPServer::removeServerMediaSession()".)


> I have started the RTSPServer in a pthread and wanted to add a new ServerMediaSession to it from another thread

When you read the FAQ - as you were asked to do before posting to this mailing list - you will have learned that LIVE555 applications run in a single-threaded event loop, and that you should not call LIVE555 code (except perhaps for "triggerEvent()") from a separate thread.

Because LIVE555 applications run within an event loop, if you want to add a new "ServerMediaSession" object to your RTSP server, then this must happen in an event handler - i.e., in response to an event that gets handled within the event loop.

You can, however, trigger events from a separate thread, using the "event trigger" mechanism (again, described in the FAQ).


> I also want to ask you for directions how to implement on demand streaming based on frames available in the memory instead of reading them from files.

If your memory buffer is static (i.e., its contents do not change), then you can use the "ByteStreamMemoryBufferSource" class (instead of "ByteStreamFileSource").  Otherwise, you will need to write your own source class - perhaps based on the "DeviceSource" code - as described in the FAQ.

Everybody, please read the FAQ!

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/20110729/5dd91e7f/attachment-0001.html>


More information about the live-devel mailing list