[Live-devel] Proper use of StreamReplicator

Ross Finlayson finlayson at live555.com
Fri Oct 17 15:09:45 PDT 2014


> In fact, you *might* try having your “ReplicaJPEGVideoSource” class inherit from both “JPEGVideoSource” and “FramedFilter”, but I’m not sure whether or not that will work.  (I’m wary of multiple inheritance in C++, and haven’t used it at all in any of the LIVE555 code so far.))

FYI, I looked into this, and unfortunately that hack (having your “ReplicaJPEGVideoSource” class inherit from both “JPEGVideoSource” and “FramedFilter”) won’t work, because of the ‘Diamond Problem’.  Because both “JPEGVideoSource” and “FramedFilter” inherit (non-virtually) from “FramedSource”, you can’t multiply-inherit from “JPEGVideoSource” and “FramedFilter”, otherwise you’d end up with two copies of “FramedSource”, which would probably be bad.

So, unfortunately you’re going to have to duplicate some of the existing functionality of “FramedFilter” in your new “ReplicaJPEGVideoSource” class.


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/20141017/a424eb88/attachment-0001.html>


More information about the live-devel mailing list