<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></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=""><div dir="ltr" class=""><div class="">I have implemented a multicast out component using SimpleRTPSink and RTCPInstance, and a multicast in component using SimpleRTPSource and RTCPInstance. When the multicast in component is receiving from a multicast out component on the same device, I have them share Groupsocks for RTP and RTCP.</div><div class=""><br class=""></div><div class="">The issue I'm having is when I go to shutdown one component, it seems to stop the other component. The code tracks how many components own the Groupsock, so I know the Groupsock isn't being deleted.</div><div class=""><br class=""></div><div class="">Say for example I'm shutting down the multicast out component like so:</div><div class=""><br class=""></div><div class=""><font face="monospace, monospace" class="">rtp_sink->stopPlaying();</font></div><div class=""><font face="monospace, monospace" class="">Medium::close(framed_source);</font></div><div class=""><font face="monospace, monospace" class="">Medium::close(rtcp_instance);</font></div><div class=""><font face="monospace, monospace" class="">Medium::close(rtp_sink);</font></div><div class=""><font face="monospace, monospace" class=""><br class=""></font></div><div class=""><font face="arial, helvetica, sans-serif" class="">This will cause the multicast in component to stop working and stop receiving any more streams</font></div></div></div></blockquote><div><br class=""></div>The reason for this is that a “RTCPInstance” - even when used only in concert with a “RTPSink” - both sends *and receives* packets. Therefore, closing the “RTCPInstance” object caused the LIVE555 library to turn off background read handling on the ‘groupsock’.</div><div><br class=""></div><div>However, I have just released a new version (2015.08.06) of the “LIVE555 Streaming Media” code that will prevent the “RTCPInstance” destructor from turning off background read handling on the ‘groupsock’ if it is being shared with a “RTPSource” - i.e., if RTP and RTCP are being multiplexed, with all packets being initially received by the “RTPSource”.</div><div><br class=""></div><div>This new version should allow you to close the “RTCPInstance”, while allowing incoming RTP packets to still get handled by the “RTPSource”.</div><div><br class=""></div><div>Note, however, that this will work *only if* you have a *single* “RTCPInstance” object for both your input and output components, rather than separate “RTCPInstance” objects for each. I.e., you will need to create your “RTPSource” and “RTPSink” objects (in either order), and then create a (single) “RTCPInstance” that takes both your “RTPSource” and “RTPSink” objects as parameter (to “RTCPInstance::createNew()”).</div><div><br class=""></div><div>Then, when closing the “RTCPInstance”, you must do so before closing *either of* the “RTPSource” or “RTPSink” instances. (And, of course, you must close the “RTCPInstance” only once.)</div><div><br class=""></div><div>This should let you do what you’re trying to do (though I’m not sure why you’re trying to do it…).</div><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>