[Live-devel] variable number of TS packets in a udp packet

Ross Finlayson finlayson at live555.com
Fri Mar 23 21:18:28 PDT 2012


> I developed some code with Live555 to receive mpeg ts stream over raw UDP and send it out wrapped in RTP. It works fine for me. Now, I need to receive UDP packet containing 7 TS packets but send out the UDP/RTP packet with variable number (from 1 to 7) of TS packets in it. That means one single incoming UDP packet (with 7 TS packets payload) needs to be broken into 2 or more outgoing RTP packets. What's the best way to do that with Live555?

The best way to do this is to insert a 'filter' object between the "BasicUDPSource" object (that receives Transport Stream data over raw UDP) and the "SimpleRTPSink" object (on which you send Transport Stream data over RTP).  This filter object will deliver the appropriate number of 188-byte TS packets from each chunk of 7 TS packets that it receives from its upstream "BasicUDPSource" object.

Specifically, you would define your own subclass of "FramedFilter", and reimplement the "doGetNextFrame()" virtual member function.


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/20120323/117a3fd9/attachment.html>


More information about the live-devel mailing list