[Live-devel] getNextFrame Variables

Ross Finlayson finlayson at live555.com
Mon Jan 8 10:39:37 PST 2007


>hi ZkunhuiÅC
>    Thanks for your works and your reply for my 
>questions.I want to get the file you said about 
>NAL units.
>    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?),
>    then  fFrameSize=fMaxsize,fNumTruncatedBytes 
>= fFrameSize - fMaxSize  ,as the code below:
>
>///////////////////////////////////////////////// 
>  if (fFrameSize > fMaxSize) {
>    fNumTruncatedBytes = fFrameSize - fMaxSize;
>    fFrameSize = fMaxSize;
>   }
>
>  memcpy(fTo,Encode_data,fFrameSize); 
>//Encode_data is defined in another thread
>//////////////////////////////////////////////////
>
>but how to deal with the fNumTruncatedBytes data?

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.

If your downstream object is a "FileSink" - i.e., 
you're saving data into a file - then use the 
"bufferSize" parameter to "FileSink::createNew()".

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.)
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070108/3616eb1b/attachment.html 


More information about the live-devel mailing list