[Live-devel] Problems with more than one client and RTSP

Eric Peters epeters at graphics.cs.uni-sb.de
Mon Jun 13 16:51:46 PDT 2005


Ross Finlayson wrote:
> 
>> This works very well if I stream multicast or use only one client. Or
>> if I
>> stream from a file and each client rereads the file from the
>> beginning. Now when
>> I connect more than one client the first client runs forward with high
>> quality
>> but all clients connected afterwards are synchronous stuttering.
> 
> 
> Note that if you want to deliver a single input stream, replicated to
> multiple unicast clients (rather than creating a new input stream for
> each new client), then your server should set the "reuseFirstSource"
> parameter to "True" when it creates the instance of the
> "OnDemandServerMediaSubsession" subclass.
> 
> (See the code for "testOnDemandRTSPServer" for an example of this.)
> 
> 

THX for your fast answer.

Sorry, perhaps I didn't explain my complete scenario. I subclassed
ServerMediaSession in RTSPServerMediaSession and ServerMediaSubsession in
NMMServerMediaSubsession. The single input stream is replicated by NMM by a
mechanism called session sharing. This mechanism works very fine in our
environment (for example with a XDisplay or Playback).

I tried to implement the subsession in such a way that is similar to your
OnDemandServerMediaSubsession but there has been some problems (so much time
ahead so I can't remember why ;-)) so I subclassed ServerMediaSubsession. The
most significant difference is, that I have for each client a seperate liveMedia
part (source->framer->sink).

The NMM graph is built in der SMSession-Subclass. The SM-Subsession has the
control about the liveMedia-part such as the BufferedSource (is a FramedSource),
the Framer and the Sink. So in theory for the liveMedia part it should be no
difference if I have two file sources and two sinks or one source which is
replicated and two sinks.

Eric


More information about the live-devel mailing list