<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }p { margin-top: 0px; margin-bottom: 0px; }body { font-size: 10.5pt; font-family: 'Segoe UI'; color: rgb(0, 0, 0); line-height: 1.5; }body { font-size: 10.5pt; font-family: 'Segoe UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>hi Ross,</div><div><br></div><div>I changed the code according to your advice, to delivering only 1 NAL unit each doGetNextFrame(), then the app runs. Thank you!</div>
<div><br></div><div>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 <span style="font-family: ''; font-size: 10.5pt; line-height: 1.5; background-color: window;">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()).</span></div><div><br></div><div><div><span segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="" style="font-family: '';">size:10 ts:2798817<br>size:4 ts:2798831<br>size:126288 ts:2798859<br>size:32513 ts:2798890<br>size:42666 ts:2798905<br>size:31548 ts:2798928<br>size:44705 ts:2798977<br>size:34214 ts:2799016<br>size:46538 ts:2799057<br>size:35807 ts:2799096<br>size:49680 ts:2799138<br>size:36974 ts:2799176</span></div></div><div><span segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="" style="font-family: '';"><br></span></div><div><span segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="" style="font-family: '';">My question is this. </span></div><div><span segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="" style="font-family: '';">1. How the sink object decide its timing of fetching data from the source? </span></div><div><span segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="" style="font-family: '';">2. What is the purpose of </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">fPresentationTime?</span></div><div><span segoe="" ui'";="" font-size:="" 14px;="" color:="" rgb(0,="" 0,="" 0);="" background-color:="" rgba(0,="" font-weight:="" normal;="" font-style:="" normal;text-decoration:="" none;'="" style="font-family: '';">3. Should I use my camera's capture timestamp for </span><span style="font-size: 10.5pt; line-height: 1.5; background-color: window;">fPresentationTime? (I tried this. Then, vidoe jitters when played with VLC sometimes. But OK when played with Mplayer)</span></div><div><br></div><div>Thank you!</div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="margin: 10px;"><div style="line-height: normal;"><div style="margin: 7.5pt; position: static !important;"><div style="font-family: 'Segoe UI', Tahoma;"><p class="MsoNormal" style="margin: 0px 0cm; font-family: 宋体;"><font size="2">Xin</font></p></div><div style="font-size: 14px; font-family: 'Segoe UI', Tahoma;"><p class="MsoNormal" style="margin: 0px 0cm; font-size: 12pt; font-family: 宋体;"><span lang="EN-US" style="font-size: 10pt; font-family: Verdana, sans-serif;">Mobile: +86 </span><span lang="EN-US" style="font-size: 10pt; font-family: Verdana, sans-serif;">186-1245-1524<o:p></o:p></span></p></div><div style="font-size: 14px;"><p class="MsoNormal" style="margin: 0px 0cm; font-size: 12pt;"><span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt;">Email: </span><span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt;"><a href="mailto:xliu@vscenevideo.com" style="color: purple;">xliu@vscenevideo.com</a><o:p></o:p></span></p></div><div style="font-size: 14px;"><p class="MsoNormal" style="margin: 0px 0cm; font-size: 12pt;"><span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt;">QQ: </span><span lang="EN-US" style="font-family: Verdana, sans-serif; font-size: 10pt;">156678745</span></p></div></div></div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:finlayson@live555.com">Ross Finlayson</a></div><div><b>Date:</b> 2017-01-16 20:12</div><div><b>To:</b> <a href="mailto:live-devel@ns.live555.com">LIVE555 Streaming Media - development & use</a></div><div><b>Subject:</b> Re: [Live-devel] how to make latency as low as possible</div></div></div><div><div>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.)</div>
<div> </div>
<div>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)”.</div>
<div> </div>
<div> </div>
<div>Ross Finlayson</div>
<div>Live Networks, Inc.</div>
<div>http://www.live555.com/</div>
<div> </div>
<div> </div>
<div>_______________________________________________</div>
<div>live-devel mailing list</div>
<div>live-devel@lists.live555.com</div>
<div>http://lists.live555.com/mailman/listinfo/live-devel</div>
</div></blockquote>
</body></html>