<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hello Ross,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">First of all thanks for your support on the topic "OnDemandServerMediaSubsession".</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
And sorry if i am making noise on the mailing list by again asking that someone has already asked under</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">the subject "Please reply query on Proxy Server" that How can Live 555 proxy server code can be used in Thread?</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">and you have replied that </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
The existing "LIVE 555 Proxy Server" can *already* stream concurrently from multiple back-end servers. It does this as a single-threaded application (using an event loop, rather than threads, for concurrency)</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
But the issue is that if am receiving one stream from backend rtsp server and then i want another stream to receive i call the proxy server media with new env and scheduler and without calling the do event loop again.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">This works fine.But in this case the problem is if i stop the the client that is receiving the stream from first streamer and call the delete server media seesion for that particular session as i have taken the array of server media session object than the the stream from the another streamer also stops displaying on the another client.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
What need to be done please tell.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
code is something like this:-</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">env = BasicUsageEnvironment::createNew(*scheduler);</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
sms[index]=ProxyServerMediaSession::createNew(*env, rtspServer,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">proxiedStreamURL, streamName,</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
username, password, tunnelOverHTTPPortNum, verbosityLevel);</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">onlyonce++;</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">if(onlyonce==1)</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
env->taskScheduler().doEventLoop(); </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
on stop</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
rtspServer->deleteservermediasession(sms[index]);</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
index variable maintain for which session we have got the stop command.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Thanks.</div><br><div class="gmail_quote">On Wed, Feb 13, 2013 at 10:44 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div class="im"><blockquote type="cite"><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">//try catch execute when stop message come and my code break here</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">try</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="white-space:pre-wrap"> </span>{</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>if(sms)</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="white-space:pre-wrap"> </span>{</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>Medium::close(sms);</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>}</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>rtspServer->deleteServerMediaSession(sms);</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
}</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>catch(...)</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="white-space:pre-wrap"> </span>{</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>if(sms)</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="white-space:pre-wrap"> </span>{</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>Medium::close(sms);</div>
<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><span style="white-space:pre-wrap"> </span>}</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<span style="white-space:pre-wrap"> </span>rtspServer->deleteServerMediaSession(sms);</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">}</div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Can you please guide why my code is breaking.</div></blockquote><div><br></div></div>It's because you are calling "Medium::close(sms);" as well as "rtspServer->deleteServerMediaSession(sms);". You shouldn't do that! You should only be calling</div>
<div><span style="white-space:pre-wrap"> </span>rtspServer->deleteServerMediaSession(sms);</div><div>That will delete "sms" as well.</div><div class="im"><br><br><div>
<span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px"><span style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;border-collapse:separate;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">Ross Finlayson<br>
Live Networks, Inc.<br><a href="http://www.live555.com/" target="_blank">http://www.live555.com/</a></span></span>
</div>
<br></div></div><br>_______________________________________________<br>
live-devel mailing list<br>
<a href="mailto:live-devel@lists.live555.com">live-devel@lists.live555.com</a><br>
<a href="http://lists.live555.com/mailman/listinfo/live-devel" target="_blank">http://lists.live555.com/mailman/listinfo/live-devel</a><br>
<br></blockquote></div><br>