<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>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.</div></blockquote><div><br></div>That last sentence makes no sense.</div><div><br></div><div><br><blockquote type="cite"><div> If I need to synchronize threads, then please tell me where I need to do it.<br></div></blockquote><div><br></div></div>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.<div><br></div><div>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()".</div><br><br><div apple-content-edited="true">
<span class="Apple-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-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-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-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>