[Live-devel] Unable to set PPS/SPS headers

Ross Finlayson finlayson at live555.com
Thu Aug 1 02:26:35 PDT 2013


> The problem is that my SPS/PPS NALs are never used in SDP. After some
> debugging i reached the place where Session Description is created in
> H264VideoRTPSink:
> 
> if (sps == NULL || pps == NULL) {
>    // We need to get SPS and PPS from our framer source:
>    if (fOurFragmenter == NULL) return NULL; // we don't yet have a
> fragmenter (and therefore not a source)
[...]
> Here, framerSource->getSPSandPPS() never gets called because at this point
> fOurFragmenter  is NULL.

It looks like you haven't even started playing the stream - i.e., you've never even called "startPlaying()" on your "H264VideoRTPSink" object!

Note, however, that if you're using a RTP server, then this should all be happening automatically (once you get the first re	quest from a RTSP client).  Make sure that you're implementing the virtual functions "createNewStreamSource()" and "createNewRTPSink()" properly.

Another thing you can do - because you know the SPS/PPS NAL units in advance - is pass them as parameters to one of the alternative forms of "H264VideoRTPSink::createNew()", which you call from your "createNewRTPSink()" virtual function implementation.  (See "liveMedia/include/H264VideoRTPSink.hh")


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/20130801/e2b5d186/attachment.html>


More information about the live-devel mailing list