Ross,<br><br>This is fascinating but I can't picture it.  What would the design look like for multiple processes (one per stream as you describe)?<br><br>Are there any examples of this that I can take a look at?<br><br>
Thanks,<br>Tim<br><br><div class="gmail_quote">On Fri, Jul 27, 2012 at 1:23 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><blockquote type="cite"><div>When implementing liveMedia using multiple streams in one process I see two<br>choices:<br><br> 1. Each stream is kept totally separate. I.e. each stream have their own<br>
TaskScheduler, UsageEnvironment, eventLoopWatchVariable and each<br>doEventLoop() is running in a separate thread.<br><br> 2. The rtspClient's share the same TaskScheduler, UsageEnvironment,<br>eventLoopWatchVariable and there is one doEventLoop() running (as in the<br>
testRTSPClient project). <br></div></blockquote><div><br></div>Correct.  Those are the only two choices, *if* you have also chosen to use just one process.  (Note below.)</div><div><br></div><div><br><blockquote type="cite">
<div>I've current implemented design 1, while I see option 2 being the intended<br>choice. The reason for picking 1 is the added "security" of keeping each<br>stream entirely independent, i.e. if an exception occurs for any reason only<br>
one stream should be affected.<br></div></blockquote><div><br></div>Well, it depends on what you mean by "exception".  If one thread has a memory access error, then it will kill the entire process.  And there's nothing to prevent one thread (due to a bug somewhere) from stepping all over memory that's used by another thread.  So there's really not much 'security' here at all.</div>
<div><br></div><div>If your streams really are "entirely independent", then why not use one process for each stream?  That is by far the safest and most reliable approach.</div><div><br></div><div>But for some odd reason, here in the 21st century, the idea of structuring an application as multiple processes seems to have fallen our of favor...</div>
<span class="HOEnZb"><font color="#888888"><div><br></div><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></font></span></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>