<!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>
Thanks for your works and your reply for my questions.I
want to get the file you said about NAL units.<br>
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>
then fFrameSize=fMaxsize,fNumTruncatedBytes =
fFrameSize - fMaxSize ,as the code below:<br>
<br>
///////////////////////////////////////////////// <br>
if (fFrameSize > fMaxSize) {<br>
fNumTruncatedBytes = fFrameSize - fMaxSize;<br>
fFrameSize = fMaxSize;<br>
}<br>
<br>
memcpy(fTo,Encode_data,fFrameSize);
//Encode_data is defined in another thread<br>
//////////////////////////////////////////////////<br>
</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)? 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 "FileSink" - i.e.,
you're saving data into a file - then use the "bufferSize"
parameter to "FileSink::createNew()".</div>
<div><br></div>
<div>If your downstream object is a "RTPSink" (subclass) -
i.e., you're sending RTP packets - then assign
"OutPacketBuffer::maxSize" to a new value, before creating
the RTPSink. (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>