[Live-devel] OnDemandMediaSubsession, DeviceSource, SDP

Ross Finlayson finlayson at live555.com
Sun Jun 17 12:40:59 PDT 2012


> I have subclassed FramedSource similarly to the DeviceSource 
> example to accept calls from a separate thread using the 
> signalNewFrameData() method. It parses the mdat data coming
> from an iPhone mp4 hardware encoder, which should be
> an AVC H264 Stream. This "file stream" parser  replaces
> the NAL Lengths with NAL start codes 0x00000001 
> (and delivers this modified stream buffer to fTO). 
[...]
> createNewStreamSource->DeviceSource->return H264VideoStreamFramer

Because your input source is delivering discrete NAL units (i.e., one-at-a-time), then it would be better to use a "H264VideoStreamDiscreteFramer", not a "H264VideoStreamFramer".  Each 'frame' (really "NAL unit") must be delivered to the "H264VideoStreamDiscreteFramer" *without* a preceding start code.

> Unfortunately when extracting this data 
> OnDemandServerMediaSubsession fails to produce any SDP 
> description of the stream, I can only assume this is because 
> the SPS PPS are not being sent in-Band the h264 data from 
> the MP4 mdat contents.


Yes.  


> createNewRTPSink->return H264VideoRTPSink. 

This is where you can pass the SPS and PPS NAL units, because they are not present in-band.  Note - in "liveMedia/include/H264VideoRTPSink.hh" - the optional variants of the "createNew()" function, which allow you to pass the SPS and PPS NAL units, either directly, or as a comma-separated pair of Base-64-encoded strings.


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/20120617/2b8c5990/attachment.html>


More information about the live-devel mailing list