[Live-devel] testOnDemandRTSPServer.cpp question

cn PACO pony8420 at gmail.com
Fri Sep 29 23:04:04 PDT 2006


I rewrite the testOnDemandRTSPServer.cpp as follows.

The testOnDemandRTSPServer.CPP will produce two URLs, each URL include a
m4v video separately.

I use the Ethereal tools to analyze the packet.

According to the Ethereal analytical result, each URL has a pair port is the
RTP port and RTCP port.

So this RTSP server will have two each RTP ports, two each RTCP ports and a
RTSP port.

Do these two URLs have the way to use a pair port( one RTP port and one RTCP
port ) together ?

Ignoring the RTSP contain a few URLs, I hope the RTSP server  only uses one
RTSP port, one RTP, and one RTCP port.
*****************************************************************************************************

int main(int argc, char** argv)
{
 // Begin by setting up our usage environment:
 TaskScheduler* scheduler = BasicTaskScheduler::createNew();
 env = BasicUsageEnvironment::createNew(*scheduler);

 // Create the RTSP server:
 RTSPServer* rtspServer = RTSPServer::createNew(*env, 8554, NULL, 45);
 if (rtspServer == NULL)
 {
  *env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";
  exit(1);
 }

 char const* descriptionString = "Session streamed by
\"testOnDemandRTSPServer\"";

 // 1: A MPEG-4 video elementary stream:
 {
  char const* streamName = "Video01";
  char const* inputFileName = "test1.m4v";
  ServerMediaSession* sms
   = ServerMediaSession::createNew(*env, streamName, streamName,
   descriptionString);

  sms->addSubsession(MPEG4VideoFileServerMediaSubsession
   ::createNew(*env, inputFileName, reuseFirstSource));

  rtspServer->addServerMediaSession(sms);
 }

 // 2: A MPEG-4 video elementary stream:
 {
  char const* streamName = "Video02";
  char const* inputFileName = "test2.m4v";
  ServerMediaSession* sms
   = ServerMediaSession::createNew(*env, streamName, streamName,
   descriptionString);

  sms->addSubsession(MPEG4VideoFileServerMediaSubsession
   ::createNew(*env, inputFileName, reuseFirstSource));

  rtspServer->addServerMediaSession(sms);
 }

 env->taskScheduler().doEventLoop();

 return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20060929/fd7a526e/attachment.html 


More information about the live-devel mailing list