> I am receiving h.264 frames in a method of a class whose implementation is 
> based on DummySink class derived from MediaSink. My program is not decoding 
> or displaying frames, it is just re-transmitting them to another application 
> that needs to know frame type without parsing frames.
> What's the best way to determine the type of the frame (I, P, or B)?

Look at the last 5 bits of the first byte of the NAL unit - i.e., take the 
first byte of the NAL unit, and ‘and’ it with 0x1F.  This gives you the 
“nal_unit_type”.

The meaning of each NAL unit type is defined by the H.264 video specification.  
You can also see it described in our code in the array 
“nal_unit_type_description_h264”; see “liveMedia/H264or5VideoStreamFramer.cpp”, 
lines 194-226.


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

_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to