[Live-devel] Attach sink to multiple sources

Ross Finlayson finlayson at live555.com
Fri Feb 29 17:36:41 PST 2008


>I was
>wondering if it was theoretically possible to design a custom Sink 
>class, which instances could be attached to various sources.

The best way to do this would not be to define a new type of sink, 
but instead define a new type of source - i.e., a subclass of 
"FramedSource" - that would, as usual, feed into a single sink, but 
would read from multiple sources, as desired.

More specifically, your new "FramedSource" subclass would perhaps 
take the (multiple) input sources as parameters to its constructor 
(and its "createNew()" function), and would implement the 
"doGetNextFrame()" virtual function by reading from the appropriate 
input source.
-- 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/


More information about the live-devel mailing list