[Live-devel] How to receive h264 frames in testRTSPClient

Barry Stump bstump at codemass.com
Fri May 11 14:27:57 PDT 2012


>
> Correct me if I am wrong, but currently testRTSPClient receives RTP
> packets. Is there a way to receive the individual h264 frames, Ie. parse
> the incoming packets and provide each individual h264 frame (each i frame
> and p frames).
>
>
In your MediaSink derived class (called "DummySink" in the testRTSPClient
code), the afterGettingFrame() method gets called for each H.264 NAL unit
(frame).  The Live555 library takes care of removing the RTP headers and
reassembling fragmented frames for you.

If you need to know the type of frame, look at the NAL unit type, using
something like this:

int nal_type = fReceiveBuffer[0] &0x1F;
envir() << "afterGettingFrame() received NAL unit type " << nal_type <<
"\n";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120511/a4a942b3/attachment.html>


More information about the live-devel mailing list