<div id="RTEContent"> <meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"><title></title> <meta name="GENERATOR" content="OpenOffice.org 2.0 (Linux)"> <meta name="AUTHOR" content="khaled2"> <meta name="CREATED" content="20051230;14334400"> <meta name="CHANGEDBY" content="khaled2"> <meta name="CHANGED" content="20051230;15353500"> <style> <!-- @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } --> </style> <div style="margin-bottom: 0cm;">Hi ,</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">i am trying to find a way to duplicate a stream.</div> <div style="margin-bottom: 0cm;">Of course ill not do it by pointing on the same FramedSource,this would give an error :Trying to read ....in the same time.</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">Though my idea is to create a different FramedSource ,in my case source of type MPEG4ESVideoRTPSource for each
request i receive.</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">I ve done this by adding a method on MediaSubsession doing the folowing:</div> <div style="margin-bottom: 0cm;"><br> </div> <pre>FramedSource* MediaSubsession::createVideoSource() {<br><br> <b>return</b> MPEG4ESVideoRTPSource::createNew(env(), fRTPSocket,<br> fRTPPayloadFormat,<br> fRTPTimestampFrequency);<br><br>}</pre><div style="margin-bottom: 0cm;"> And then later on i define a ServerMediaSession for each stream i would like to deliver to my client.</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">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.</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">Though the problem is that those sources are using the same Environement.</div>
<div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">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.</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">I dont understand why my First FramedSource get destroyed when i play the second one?</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">i see that both of the sources use the same Task Scheduler but why the first one get destroyed?</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">Can you please help me to make both of the streams working in parallel?</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;"><br> </div> <div
style="margin-bottom: 0cm;">There is no reason i think it wouldnt work if they listen on the same socket so logically they gonna get the same stream.</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;">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.</div> <div style="margin-bottom: 0cm;">I am using one thread and one process,for all the stream i request.</div> <div style="margin-bottom: 0cm;"><br> </div> <div style="margin-bottom: 0cm;"></div><div style="margin-bottom: 0cm;">Thank you in advance for your help.</div> </div><p>
                <hr size=1> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com">Téléchargez</a> la version beta.