[Live-devel] How to dispatch media data to multiple sinks?

Ross Finlayson finlayson at live555.com
Thu Oct 13 21:34:56 PDT 2011


No, unfortunately there's no general 'frame duplicator' mechanism in our library.


> Now, I known I can use a FileSink for save the media data to file. 
> 
> RTPSource -> FileSink
> 
> But, how to send to the live player simultaneously? Should I make a Filter class, so the chain becomes:
> 
> RTPSource -> Filter -> RTPSink(to player)

Yes, the simplest thing to do here would be to write your own filter class (a subclass of "FramedFilter") that copies input frames to the output, but also writes them to a file.  The "writing to a file" would be done directly (i.e., using "fwrite()"), rather than using a "FileSink").


> If I should do so, how about send to 2 and more live player

The simplest way to do this is just to use multicast.  I.e., send the frames out just once (using a single "RTPSink" object, but do so using an IP multicast address).  (E.g., our "testRelay" demo application does something like this.)

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/20111013/7879073b/attachment.html>


More information about the live-devel mailing list