> I have few options for this:
>             0 implies that the encoder will add the start codes
>            1, 2, 4: length prefixed NAL units of size 1, 2, or 4 bytes
>  
> If I set up the parameter to 0 the Discreteframer complains with the 
> following message ‘H264VideoStreamDiscreteFramer error: MPEG 'start code' 
> seen in the input\n";’     I guess that’s expected because I should not 
> include start codes at this point all clear. However, with the parameter in 
> the encoder set to 1, 2 or  4 it didn’t complain at all but I still do not 
> visualize anything in the player.

Remember that the data that you copy to *fTo should be a NAL unit, and nothing 
else.  That means no start code at the front.  But it also means nothing else 
at the front - including your 'length prefix'.

In other words - you need to omit the 'length prefix' when you copy the NAL 
unit to *fTo.  (Of course, you will use this 'length prefix' value to tell you 
how much data to copy, and you'll also set "fFrameSize" to this value.)


> I wonder why are the implications with start codes or prefixed NAL units size 
> and the discreteframer..

You don't need to speculate about this.  Remember, You Have Complete Source 
Code.  Just look at the code in "liveMedia/H264VideoStreamFramer.cpp", starting 
at line 62.  This code expects the delivered data to be a NAL unit - i.e., 
beginning with a byte that contains the "nal_unit_type" - and nothing else.

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

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to