<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>Re: [Live-devel] getNextFrame
Variables</title></head><body>
<blockquote type="cite" cite>hi ZkunhuiÅC<br>
&nbsp;&nbsp; Thanks for your works and your reply for my questions.I
want to&nbsp;get the file you said&nbsp;about NAL&nbsp;units.<br>
&nbsp;&nbsp; Again, I want to ask a question which i refered in
previous question: If the size of NAL unit is bigger than
fMaxsize(should I set fMaxsize myself?),<br>
&nbsp;&nbsp; then&nbsp; fFrameSize=fMaxsize,fNumTruncatedBytes =
fFrameSize - fMaxSize&nbsp; ,as the code below:<br>
&nbsp;<br>
/////////////////////////////////////////////////&nbsp;<br>
&nbsp;if (fFrameSize &gt; fMaxSize) {<br>
&nbsp;&nbsp;&nbsp;fNumTruncatedBytes = fFrameSize - fMaxSize;<br>
&nbsp;&nbsp;&nbsp;fFrameSize = fMaxSize;<br>
&nbsp;&nbsp;}<br>
&nbsp;<br>
&nbsp;memcpy(fTo,Encode_data,fFrameSize);&nbsp;&nbsp;&nbsp;&nbsp;
//Encode_data is defined in another thread<br>
//////////////////////////////////////////////////<br>
&nbsp;</blockquote>
<blockquote type="cite" cite>but how to deal with the
fNumTruncatedBytes data?</blockquote>
<div><br></div>
<div>Are you asking: How to *prevent* ending up with truncated bytes
(i.e., discarded bytes at the end)?&nbsp; The only way to prevent this
is to make sure that your downstream object(s) have enough buffer
space when they are created.</div>
<div><br></div>
<div>If your downstream object is a &quot;FileSink&quot; - i.e.,
you're saving data into a file - then use the &quot;bufferSize&quot;
parameter to &quot;FileSink::createNew()&quot;.</div>
<div><br></div>
<div>If your downstream object is a &quot;RTPSink&quot; (subclass) -
i.e., you're sending RTP packets - then assign
&quot;OutPacketBuffer::maxSize&quot; to a new value, before creating
the RTPSink.&nbsp; (You should see a warning message about
this.)</div>
<x-sigsep><pre>-- 
</pre></x-sigsep>
<div><br>
Ross Finlayson<br>
Live Networks, Inc.<br>
http://www.live555.com/</div>
</body>
</html>