[Live-devel] Another question about connecting a single source to multiple sinks (eg file output and decoder) using a Frame Duplicator / Tee Sink

Dave McMordie mcmordie at viionsystems.com
Tue Nov 22 13:04:24 PST 2011


1.       Would having a fully implemented Tee-sink / Frame Duplicator class
offer significant advantages over ad-hoc methods of replicating a stream
(eg. inside filters)?



It depends on what you want to do with each 'replica'.  If you just need
two 'replicas' - one going to a LIVE555 "MediaSink" (as normal); the other
just being written to a file - then the simplest solution would be to just
do the file writing normally (without using LIVE555 objects).



What specifically do *you* want to do with the replicated streams?





2.       How difficult would it be to implement this class (any gotchas, or
should it be straightforward)?



Unfortunately, if it were easy, I probably would have done it already.



The only real advice I can give right now is here:
http://lists.live555.com/pipermail/live-devel/2006-May/004454.html





As I look closely at this, it looks to me like a challenge may be that
inheriting from both MediaSink and FramedSource could result in some
clashes.



No, this is definitely 'barking up the wrong tree'.  Multiple inheritance
in C++ is (generally speaking) a bad idea, and not relevant here anyway,
because a general 'frame duplicator' mechanism would not contain (or
create) any "MediaSink" objects at all.



Thanks for the prompt reply, Ross.



The issue is that I have no experience writing readable video files in the
correct formats (AVI, mp4, etc.) and wanted to use your code to do so.



I conclude from your input that it is simply easier to write a new
AVIFileWrite class borrowing code liberally from your AVIFileSink class in
order to get the job done.



Certainly it is easy to write the packets out as they appear for decoding.
 It is just a question of getting the rest of the AVI structure (in this
case) correct.



Best,


Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111122/8aa0af7a/attachment-0001.html>


More information about the live-devel mailing list