<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>In the current Live555 source we have a sample application <strong>testMPEG2TransportStreamer</strong></div>
<div>which reads a MPEG Transport Stream file (named "test.ts"), and streams it, using RTP, </div>
<div>to the multicast group 239.255.42.42, port 1234 and i can change the file also.</div>
<div> </div>
<div>Now my question is how i can multicast the same file on multiple multicast addresses using the same </div>
<div>application and how can i multicast other source (ts) files on multiple multicast addresses using the same</div>
<div>application?<br></div></blockquote><div><br></div>You can do this very easily - using the existing "testMPEG2TransportStreamer" code as a model.</div><div><br></div><div>For each multicast address that you want to send to, you:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>1/ create two "Groupsock" objects - one for RTP, the other for RTCP. (The port number for RTP should be even; the next higher (i.e., odd) port number should be for RTCP.)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>2/ create a new "SimpleRTPSink" object from the RTP "Groupsock"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>3/ create a new "RTCPInstance" object from the RTCP "Groupsock"</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>4/ create a new "ByteStreamFileSource" object (for the file that you want to read from)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>5/ create a new "MPEG2TransportStreamFramer" object (for the "ByteStreamFileSource" object that you created in step 4/)</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>6/ call "startPlaying()" on the "SimpleRTPSink" object that you created in step 4/, taking, as parameter, the "MPEG2TransportStreamFramer" object that you created in step 5/</div><div><br></div><div>I.e., you do steps 1/ through 6/ for each file+multicast address that you want to stream.</div><div><br></div><div>Then (and only then), once you've done all this, you call</div><div><span class="Apple-tab-span" style="white-space:pre"> env->taskScheduler().doEventLoop();</span></div><div>to enter the application's 'event loop' (which is where the actual streaming gets done).</div><br><br><div apple-content-edited="true">
<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; font-size: medium; "><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; font-size: medium; ">Ross Finlayson<br>Live Networks, Inc.<br><a href="http://www.live555.com/">http://www.live555.com/</a></span></span>
</div>
<br></body></html>