The problem with MPEG-4 (and H.264) video is that - to properly serve the 
stream - you need (in the stream's SDP description) certain 'configuration' 
parameters.  Often, these configuration parameters can be obtained only by 
reading the stream itself.  In this case, we have a 'chicken and egg' problem: 
Parameters that are needed to serve the stream can be obtained only by first 
reading the stream.

To solve this, note how in "MPEG4VideoFileServerMediaSubsession" (a subclass of 
"OnDemandServerMediaSubsession") we reimplement the virtual function 
"getAuxSDPLine()".  If you *don't* know - in advance - the configuration 
parameters for the stream, then you will need to also reimplement 
"getAuxSDPLine()", and do something similar, in your own subclass of 
"OnDemandServerMediaSubsession".

If, however, you *do* know - in advance - the configuration parameters for the 
stream, then there is an alternative solution:
Recent versions of the code (>= version 2012.03.20) have an alternative version 
of "MPEG4ESVideoRTPSink::createNew()" that take the configuration parameters as 
arguments.  Specifically, it takes two extra arguments:
        u_int8_t profileAndLevelIndication, char const* configStr
If you know this information in advance, then you should use this new version 
of "MPEG4ESVideoRTPSink::createNew()" in your reimplementation of the 
"createNewRTPSink()" virtual function, and you then *do not* need to 
reimplement "getAuxSDPLine()".


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