hi Ross, I changed the code according to your advice, to delivering only 1 NAL unit each doGetNextFrame(), then the app runs. Thank you!
However, there's something I don't understand. In our camera, SPS/PPS/IFrame are generated at one time. If the sink object copies one NALU at a time, at the pace of frame interval (40ms for 25fps), then data will congest obviously. The fact is that sink object copies NALU at the pace of an interval less than 40ms. My log below shows this interval fluctuates considerably (the printed timestamp is "gettimeofday"ed right before each memmove()). size:10 ts:2798817 size:4 ts:2798831 size:126288 ts:2798859 size:32513 ts:2798890 size:42666 ts:2798905 size:31548 ts:2798928 size:44705 ts:2798977 size:34214 ts:2799016 size:46538 ts:2799057 size:35807 ts:2799096 size:49680 ts:2799138 size:36974 ts:2799176 My question is this. 1. How the sink object decide its timing of fetching data from the source? 2. What is the purpose of fPresentationTime? 3. Should I use my camera's capture timestamp for fPresentationTime? (I tried this. Then, vidoe jitters when played with VLC sometimes. But OK when played with Mplayer) Thank you! Xin Mobile: +86 186-1245-1524 Email: x...@vscenevideo.com QQ: 156678745 From: Ross Finlayson Date: 2017-01-16 20:12 To: LIVE555 Streaming Media - development & use Subject: Re: [Live-devel] how to make latency as low as possible You need to copy data to “fTo” and call “FramedSource::afterGetting(this)” only *once*, for each NAL unit that you deliver. (Your code seems to be doing this multiple times for each delivery; this is wrong.) In other words, each call to “doGetNextFrame()” must (eventually) lead to the delivery of exactly one H.264 NAL unit, followed by exactly one call to “FramedSource::afterGetting(this)”. 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
_______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel