[Live-devel] H.264 streaming -- Not receiving all packets

Ross Finlayson finlayson at live555.com
Fri Mar 20 22:36:12 PDT 2009


>The way I understand it and read the code the 
>currentNALUnitEndsAccessUnit() method returning true marks the end 
>of a frame not a a NAL unit. (remember NAL unit does not always 
>equal frame).

Yes, "currentNALUnitEndsAccessUnit()" should return True iff (if and 
only if) the most recently-delivered NAL unit marks the end of a 
video frame (i.e., a complete screen).


>question; if you have a NAL unit that can't fit in the buffer 
>provided in doGetNextFrame() can you hold on to the part of the NAL 
>unit that didn't fit and pass it in the next time doGetNextFrame() 
>is called?

No.  Each NAL unit must fit completely in the output buffer (at the 
server end), and the input buffer (at the receiving end).  (Our 
software takes care of fragmenting a large NAL unit across several 
*network* (RTP) packets, and reassembling at the receiver end, so you 
don't need to concern yourself with this.  However, each NAL unit 
must fit completely within an output (and input) buffer.

Very large NAL units are not a good idea, because they get sent in 
several consecutive RTP packets, and if any one of these packets gets 
lost, then the whole NAL unit will (effectlvely) be lost.  Therefore, 
if possible, you should reduce the size of your NAL units - e.g., 
using slices.

-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list