> On Sep 23, 2019, at 9:15 PM, Zhang Qian(张倩) <qianzh...@asrmicro.com> wrote: > > Hi Ross, > > Thanks for your reply. Do you mean I just call scheduleDelayedTask if > (fFrameSize > 0) as below ? Seems that it will block the live555 thread... > > if (fFrameSize > 0) > { > // Set the 'presentation time': > gettimeofday(&fPresentationTime, NULL); > fDurationInMicroseconds = (mCurrentTimeStampUs - mLastTimeStampUs); > nextTask() = > envir().taskScheduler().scheduleDelayedTask(schedule_delayUs, > (TaskFunc*)FramedSource::afterGetting, this); > } > return;
Yes, this should work. Of course, in the case where “fFrameSize == 0”, you must arrange for this code to be called again later, when a (non-empty) frame becomes available. In other words, you need to handle an ‘event’ when a new frame becomes available. Remember that LIVE555-based applications are event-based, using an event loop. If you haven’t already done so, please read http://live555.com/liveMedia/faq.html#other-kinds-of-event Ross Finlayson Live Networks, Inc. http://www.live555.com/ _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel