[Live-devel] RTSP Server in separate thread

Ross Finlayson finlayson at live555.com
Sun Feb 5 14:18:34 PST 2012


> I'm creating a RTSP Server in a separate thread. My encoder (libx264) produces arrays x264 nal units. When the encoder processes the first frame it produces an array of 4 nal units. Then I pass by one unit in my DeviceSource and call signalNewFrameData every time. But it seems this separate thread does not have time to process, and rewrites them to the main thread.

That last sentence makes no sense.


> If I need to synchronize threads, then please tell me where I need to do it.

No, you don't need to do any 'thread synchronization'.  Note that only one of your threads - the one that contains the RTSP server - is running LIVE555 code.  The only exception to this is that other thread(s) may call "TaskScheduler::triggerEvent()", to signal an event that the first thread (the LIVE555 thread) will then handle, within the LIVE555 event loop.

If this is what you are doing, then your code should work, provided, of course, that the LIVE555 thread is processing its event loop - i.e., has already called "doEventLoop()".


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/20120205/043dcd22/attachment-0001.html>


More information about the live-devel mailing list