[Live-devel] Some modifications done on the library

Ross Finlayson finlayson at live555.com
Thu Oct 5 06:42:36 PDT 2006


>  > - In "FramedSource.hh", I don't believe that variables such as
>>  "fAfterGettingFunc" should be "protected".  These are used only by
>>  the implementations of "FramedSource::getNextFrame()" and
>>  "FramedSource::afterGetting()" - which are central to the functioning
>>  of the library - and I don't see how/why subclasses would want to
>>  access (let alone modify) these variables.
>That's because I implemented a class to duplicate received frames in 
>order to serve several RTP sinks from a single RTP source. The 
>signature of method getNextFrame() had to be modified to add a 
>clientID in argument  list and therefore I needed to get access to 
>those variables.

Alternatively (and this is the method I'd use), don't change 
"getNextFrame()", but instead have your 'Duplicator' class create a 
new object (of some new class - e.g., called "SourceDuplicate") to 
serve each of your sinks.  I.e., each "SourceDuplicate" object would 
still be read by only one sink - preserving the current 
"getNextFrame()" model (and code).   Instead, the (multiple) 
"SourceDuplicate" objects would read from the (single) "Duplicator" 
object using a *new* function that looks similar to "getNextFrame()", 
but which adds a new 'clientId' parameter.

This would be similar to what I currently do with "MPEG1or2Demux" and 
"MPEG1or2DemuxedElementaryStream" (except that code is demultiplexing 
data rather than duplicating it).
-- 

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


More information about the live-devel mailing list