<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><pre style="white-space: pre-wrap; font-family: 'Times New Roman'; font-size: medium; "><span class="Apple-style-span" style="font-family: arial; font-size: small; white-space: normal; ">First of all, I am aware that I must not be touching existent and working code. I have not done any modifications. I am just trying to understand how it works. And the code has no problem. I just want to adapt it to my needs.</span></pre></blockquote>You should be thinking in terms of "subclassing the code for your needs"; not "adapting the code to your needs".</div><div><br><blockquote type="cite">

<pre><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="arial">Let's say I would like to have a Video RTP source that identify complete frames (now it does at Nal-by-nal basis). Then the Source waits until the frame is completed, to write it to the sink at once. As you explained to me already, i can use the markerBit (at RTPSource) to check the end of a frame (use it with "completesFrame" f</font><font class="Apple-style-span" face="arial, helvetica, sans-serif">lag </font></span><font class="Apple-style-span" face="arial, helvetica, sans-serif">(leaving MultiFramedRTPSource as a black box)</font><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="arial, helvetica, sans-serif">. I h</font><font class="Apple-style-span" face="arial">ave done it and it works. Thanks for that.</font></span></pre>

<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><pre><font class="Apple-style-span" face="arial"><span class="Apple-style-span" style="white-space: normal;">But what if i can't rely on markerBit (which the RFC already advises)?. What I have is a way to detect the beginning of a new frame, but not the end of it. ¿</span></font><span class="Apple-style-span" style="font-family: arial; white-space: normal; ">Do you know how can I use the beginsFrame/completesFrame flags to write the frame to the sink in that situation?</span></pre></blockquote>You can't, because the "H264VideoRTPSource" code sets these flags based on the beginning/end of each NAL unit - because that (i.e., one NAL unit at a time) is what it delivers to its downstream object.</div><div><br></div><div>The right place to detect "video frame" (i.e., "access unit") boundaries is in your H.264 decoder - or whatever downstream object you have that receives NAL units from your "H264VideoRTPSource" - because that is what decoders do (i.e., render video frames).</div><div><br></div><div>The RTP receiving code - on the other hand - would be the *wrong* place to be doing this, because, for H.264, RTP packets contain "NAL units", not "access units" ('video frames').</div><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>