[Live-devel] how to create custom sink

Victor lyamtsev vlyamtsev at gmail.com
Tue Feb 9 13:40:10 PST 2010


Any idea if i can find any specific example for H.264 ?
As i couldn't find base class for H264MediaSubsession, I am trying to
create H264 subsession with

PassiveServerMediaSubsession::createNew(RTPSink& rtpSink,
					RTCPInstance* rtcpInstance)
 The question now is: how to createRTPSink ? The "H264VideoRTPSink"
class seems to be an abstruct and doesn't have implemetation for
createNew , or readNextFrame...
Thank you,
-V

No, I don't think you need to modify (or subclass) the existing
"RTSPServer" at all.  Instead you need only define new
"ServerMediaSubsession" subclasses - one for your AAC audio source,
and another for your H.264 video source.  Each subclass will create
an appropriate "RTPSource" object ("MPEG4GenericRTPSource " for AAC
audio; H264VideoRTPSource for H.264 video) for delivering its input
data, and, of course, create appropriate "RTPSink" subclasses
("MPEG4GenericRTPSink " for AAC audio; H264VideoRTPSink for H.264
video) for its output.

Specifically, if you want to stream to your clients via multicast,
you should define subclasses of "PassiveServerMediaSubsession"; if
you want to stream to your clients via unicast, you should define
subclasses of "OnDemandServerMediaSubsession".


More information about the live-devel mailing list