<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>i run the server with the command ./testOnDemandRTSPServer, but by using the request rtsp://<a href="http://192.168.1.3:8554/mpeg2TransportStreamTest" target="_blank">192.168.1.3:8554/mpeg2TransportStreamTest</a> i can read only one stream "test.ts".</div>
<div>the problem that I just want to read multiple streams "*.ts" with the same runtime.How can i distinguish them?</div></div></div></div></blockquote><div><br></div>Very easily. Note the following code in "testOnDemandRTSPServer.cpp":</div><div><div> // A MPEG-2 Transport Stream:</div><div> {</div><div> char const* streamName = "mpeg2TransportStreamTest";</div><div> char const* inputFileName = "test.ts";</div><div> char const* indexFileName = "test.tsx";</div><div> ServerMediaSession* sms</div><div> = ServerMediaSession::createNew(*env, streamName, streamName,</div><div> descriptionString);</div><div> sms->addSubsession(MPEG2TransportFileServerMediaSubsession</div><div> ::createNew(*env, inputFileName, indexFileName, reuseFirstSource));</div><div> rtspServer->addServerMediaSession(sms);</div><div><br></div><div> announceStream(rtspServer, sms, streamName, inputFileName);</div><div> }</div><div><br></div><div>If you want to support streaming some other Transport Stream file - e.g., named "test1.ts", then just use the same code, but with:</div><div> char const* streamName = "mpeg2TransportStreamTest1";</div><div> char const* inputFileName = "test1.ts";</div><div> char const* indexFileName = "test1.tsx";</div><div><br></div><div><br></div></div><div><blockquote type="cite"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div> and what is the query that I must to use to read different streams for example test.ts and test1.ts?</div></div></div></div></blockquote><div><br></div>The "rtsp://" URL will be different - depending on the "streamName" string.</div><div><br></div><div>E.g., using the above example, the URL will be</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>rtsp://<server-ip-address>:<server-port-number>/mpeg2TransportStreamTest</div><div>for the original stream, and</div><div><div><span class="Apple-tab-span" style="white-space: pre; "> </span>rtsp://<server-ip-address>:<server-port-number>/mpeg2TransportStreamTest1</div><div>for the new stream.</div></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>