<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">So, to check my understanding and to document for anyone who ever feels brave enough to do this...<br class=""><br class="">For each X:{OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE, GET_PARAMETER, TEARDOWN}, we would need to:<br class=""></div></blockquote><div><br class=""></div>Not necessarily.  The LIVE555 event loop thread code can take care of a lot of the fine-grain details of the RTSP protocol.  In particular, it can be smart enough to:</div><div><span class="Apple-tab-span" style="white-space:pre">   </span>- know that “DESCRIBE” is followed by one or “SETUP”s (one for each track), followed by a “PLAY”</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>- know to automatically start (and keep sending) a “GET_PARAMETER” to signal client liveness (for dumb servers that don’t listen to RTCP).</div><div>In that case, the application thread(s) (i.e., the rest of VLC) need only signal the LIVE555 event loop thread to:</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>- open and start playing a stream</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>- pause a stream</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>- resume a stream</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>- teardown a stream</div><div>so you’ve got only 4 message types (between the rest-of-VLC thread(s) and the LIVE555 event loop thread instead of 7.</div><div><br class=""></div><div>(Also, feel free to define and implement whatever thread-safe asynchronous messaging mechanism you want if you’re not happy with the “triggerEvent()” mechanism that LIVE555 provides.)</div><div><br class=""></div><div><br class=""></div><div><blockquote type="cite" class=""><div class="">Then we'd need a new thread calling doEventLoop(), with a watch variable only set for shutdown.</div></blockquote><div><br class=""></div>Exactly.</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">As you pointed out before, the GET_PARAMETER keepalives could be done as a scheduleDelayedTask(), so that would save one in exchange…</div></blockquote><div><br class=""></div>Although, as I noted above, you can probably save more by offloading some of the RTSP protocol logic to the LIVE555 event loop thread.</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">Because as Felix points out there can be multiple active RTSP streams</div></blockquote><div><br class=""></div>As I noted in my earlier message, the (single-threaded) LIVE555 event loop can do this as well.</div><br class=""><br class=""><div apple-content-edited="true" class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;  ">Ross Finlayson<br class="">Live Networks, Inc.<br class=""><a href="http://www.live555.com/" class="">http://www.live555.com/</a></span></span>
</div>
<br class=""></body></html>