[Live-devel] Duplicating one stream using different FramedSources

Tilouche Khaled kall_tiller at yahoo.fr
Fri Dec 30 15:43:48 PST 2005


                        Hi ,
 
 
 i am trying to find a way to duplicate a stream.
 Of course ill not do it by pointing on the same FramedSource,this would give an error :Trying to read ....in the same time.
 
 
 Though my idea is to create a different FramedSource ,in my case source  of type MPEG4ESVideoRTPSource for each request i receive.
 
 
 I ve done this by adding a method on MediaSubsession doing the folowing:
 
 
 
FramedSource* MediaSubsession::createVideoSource() {

   return       MPEG4ESVideoRTPSource::createNew(env(), fRTPSocket,
               fRTPPayloadFormat,
               fRTPTimestampFrequency);

}
 And then later on i define a ServerMediaSession for each stream i would like to deliver to my client.
 
 
 i ll use each time in my method createNewStream the FramedSource returned so i am sure in that way ill never point on the same FramedSource 2 times.
 
 
 Though the problem is that those sources are using the same Environement.
 
 
 And surprisingling when i ask one of them the get to be played by a player while the other one is in progress.I see that the active one wich is in progress get cut due to  a stopNetworkReading in the RTPInterface due to a call on the MultiFramedSource Destructor.
 
 
 I dont understand why my First FramedSource get destroyed when i play the second one?
 
 
 i see that both of the sources use the same Task Scheduler but why the first one get destroyed?
 
 
 
 
 Can you please help me to make both of the streams working in parallel?
 
 
 
 
 There is no reason i think it wouldnt work if they listen on the same socket so logically they gonna get the same stream.
 
 
 At the end as a result am getting a transfert of the stream from one client to the other but not bouth of them get the stream in the same time.
 I am using one thread and one process,for all the stream i request.
 
 
 
Thank you in advance for your help.
 

		
---------------------------------
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20051230/4a8da13a/attachment.html


More information about the live-devel mailing list