<div>I rewrite the testOnDemandRTSPServer.cpp as follows.</div>
<div>&nbsp;</div>
<div>The testOnDemandRTSPServer.CPP will produce two URLs, each URL include a m4v&nbsp;video separately.</div>
<div>&nbsp;</div>
<div>I use the Ethereal tools to analyze the packet.</div>
<div>&nbsp;</div>
<div>According to the Ethereal analytical result, each URL has a pair port is the RTP port and RTCP port.</div>
<div>&nbsp;</div>
<div>So this RTSP server will have two each RTP ports, two each RTCP ports and a RTSP port.</div>
<div>&nbsp;</div>
<div>Do these two URLs have the way to use a pair port( one RTP port and one RTCP port ) together ?</div>
<div>&nbsp;</div>Ignoring the RTSP contain a few URLs, I hope the RTSP server&nbsp; only uses&nbsp;one RTSP port,&nbsp;one RTP, and one RTCP port.
<div>&nbsp;</div>
<div>*****************************************************************************************************</div>
<div>
<p>int main(int argc, char** argv) <br>{&nbsp;<br>&nbsp;// Begin by setting up our usage environment:<br>&nbsp;TaskScheduler* scheduler = BasicTaskScheduler::createNew();<br>&nbsp;env = BasicUsageEnvironment::createNew(*scheduler);</p>
<p>&nbsp;// Create the RTSP server:<br>&nbsp;RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554, NULL, 45);<br>&nbsp;if (rtspServer == NULL) <br>&nbsp;{<br>&nbsp;&nbsp;*env &lt;&lt; &quot;Failed to create RTSP server: &quot; &lt;&lt; env-&gt;getResultMsg() &lt;&lt; &quot;\n&quot;;
<br>&nbsp;&nbsp;exit(1);&nbsp;<br>&nbsp;}</p>
<p>&nbsp;char const* descriptionString = &quot;Session streamed by \&quot;testOnDemandRTSPServer\&quot;&quot;;</p>
<p>&nbsp;// 1: A MPEG-4 video elementary stream:<br>&nbsp;{<br>&nbsp;&nbsp;char const* streamName = &quot;Video01&quot;;<br>&nbsp;&nbsp;char const* inputFileName = &quot;test1.m4v&quot;;<br>&nbsp;&nbsp;ServerMediaSession* sms<br>&nbsp;&nbsp;&nbsp;= ServerMediaSession::createNew(*env, streamName, streamName,
<br>&nbsp;&nbsp;&nbsp;descriptionString);</p>
<p>&nbsp;&nbsp;sms-&gt;addSubsession(MPEG4VideoFileServerMediaSubsession<br>&nbsp;&nbsp;&nbsp;::createNew(*env, inputFileName, reuseFirstSource));</p>
<p>&nbsp;&nbsp;rtspServer-&gt;addServerMediaSession(sms);<br>&nbsp;}</p>
<p>&nbsp;// 2: A MPEG-4 video elementary stream:<br>&nbsp;{<br>&nbsp;&nbsp;char const* streamName = &quot;Video02&quot;;<br>&nbsp;&nbsp;char const* inputFileName = &quot;test2.m4v&quot;;<br>&nbsp;&nbsp;ServerMediaSession* sms<br>&nbsp;&nbsp;&nbsp;= ServerMediaSession::createNew(*env, streamName, streamName,
<br>&nbsp;&nbsp;&nbsp;descriptionString);</p>
<p>&nbsp;&nbsp;sms-&gt;addSubsession(MPEG4VideoFileServerMediaSubsession<br>&nbsp;&nbsp;&nbsp;::createNew(*env, inputFileName, reuseFirstSource));</p>
<p>&nbsp;&nbsp;rtspServer-&gt;addServerMediaSession(sms);<br>&nbsp;}</p>
<p>&nbsp;env-&gt;taskScheduler().doEventLoop(); <br>&nbsp;<br>&nbsp;return 0;<br>}</p></div>