<html><head><base href="x-msg://208/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; 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; "><div lang="ZH-CN" link="blue" vlink="purple"><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif; "><span lang="EN-US"> I want to create a rtsp server that supports multiple live video source playing using threads. I have created my custom live source, sink and session object and modified MediaSubsession::initiate to handle it. I created multiple rtspclients using threads to use my own session. The problem is: I can play only one session.</span><span lang="EN-US" style="font-size: 12pt; font-family: ÐÂËÎÌå; color: rgb(1, 128, 129); "><span class="Apple-converted-space"> </span></span><span lang="EN-US">Do I need to create separate subsessions for each live channel playing using different urlsurfix? How can I synchronize between these clients?</span></div></div></div></span></blockquote><div><br></div></div>Unfortunately I found your question a little confusing. It wasn't clear to me whether (1) your question was about a RTSP server (How to set up a RTSP server that supports multiple streams?), or whether (2) your question was about RTSP clients (How to create multiple, concurrent RTSP clients?).<div><br></div><div>If your question is (1) (How to set up a RTSP server that supports multiple streams?), then I suggest that you look at the code for the "testOnDemandRTSPServer" for guidance, and also read the FAQ entries that discuss how to have a server that streams from live source(s). Note, in particular, that each stream (e.g., coming from a specific video+audio source) has its own "ServerMediaSession", with its own name (which gets used in the "rtsp://" URL that will be used to access the stream). Each particular track within the stream (e.g., audio, video, text) will have its own "ServerMediaSubsession". Once again, the "testOnDemandRTSPServer" code should make this clearer.</div><div><br></div><div>If your question is (2) (How to create multiple, concurrent RTSP clients?), then there are several possible ways to do this:</div><div>- Create multiple processes, each receiving its own "rtsp://" URL. For example, you can run multiple copies of the "openRTSP" application - which will require no extra programming at all.</div><div>- Write a single application (i.e., process) that opens/receives multiple concurrent "rtsp://" URLs, using a single thread of control. See the code for the "testRTSPClient" demo application for guidance on how to do this.</div><div>- Write a single application (i.e., process) that opens/receives multiple concurrent "rtsp://" URLs, using multiple threads (one thread for each "rtsp://" URL). This approach is possible, although not recommended. If you really want to do this, then you need to read and understand the FAQ entry about threads. (Note, in particular, that each thread *must* use a separate "TaskScheduler" and "UsageEnvironment".)</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>