[Live-devel] problem while playing H263 rtp file

Parveen Jain parveenjain at live.com
Tue Jun 8 06:57:01 PDT 2010








   Hi All,  I am trying to write a sip application for audio/video  call using codec PCMU and H.263.I negotiate the SDP parameter with kapanga(sip softphone) and then call the Live555 API for sending the H.263 video.But somehow on receiving the H.263 video stream, Kapnga shows "Bad marker" and "header damaged" on reception of H263 packet.  I negotiate with kapanga using "h263-1998" and payload type 105 .Following is my code snippet for starting the video call:(this is almost same what has been given in live555's test program)
int PlayVideo(char *ipAddr,int videoRtpPort,int videoRtcpPort) {  // Begin by setting up our usage environment:  TaskScheduler* scheduler = BasicTaskScheduler::createNew();  env = BasicUsageEnvironment::createNew(*scheduler);
  // Create 'groupsocks' for RTP and RTCP:  char const* destinationAddressStr#ifdef USE_SSM    //= "10.0.8.32";  =ipAddr;#else    = "239.255.42.42";  // Note: This is a multicast address.  If you wish to stream using  // unicast instead, then replace this string with the unicast address  // of the (single) destination.  (You may also need to make a similar  // change to the receiver program.)#endif  const unsigned short rtpPortNum =videoRtpPort;                        // 8888;  const unsigned short rtcpPortNum = videoRtcpPort;  const unsigned char ttl = 255; // low, in case routers don't admin scope
  struct in_addr destinationAddress;  destinationAddress.s_addr = our_inet_addr(destinationAddressStr);  const Port rtpPort(rtpPortNum);  const Port rtcpPort(rtcpPortNum);
  Groupsock rtpGroupsock(*env, destinationAddress, rtpPort, ttl);  Groupsock rtcpGroupsock(*env, destinationAddress, rtcpPort, ttl);#ifdef USE_SSM  rtpGroupsock.multicastSendOnly();  rtcpGroupsock.multicastSendOnly();#endif
  // Create a 'MPEG Video RTP' sink from the RTP 'groupsock':  //videoSink = MPEG1or2VideoRTPSink::createNew(*env, &rtpGroupsock);        videoSink =H263plusVideoRTPSink::createNew(*env, &rtpGroupsock,105);
  // Create (and start) a 'RTCP instance' for this RTP sink:  const unsigned estimatedSessionBandwidth = 500; // in kbps; for RTCP b/w share  const unsigned maxCNAMElen = 100;  unsigned char CNAME[maxCNAMElen+1];  gethostname((char*)CNAME, maxCNAMElen);  CNAME[maxCNAMElen] = '\0'; // just in case#ifdef IMPLEMENT_RTSP_SERVER  RTCPInstance* rtcp =#endif
RTCPInstance::createNew(*env, &rtcpGroupsock,                              estimatedSessionBandwidth, CNAME,                              videoSink, NULL /* we're a server */, isSSM);  // Note: This starts RTCP running automatically
#ifdef IMPLEMENT_RTSP_SERVER  RTSPServer* rtspServer = RTSPServer::createNew(*env);  // Note that this (attempts to) start a server on the default RTSP server  // port: 554.  To use a different port number, add it as an extra  // (optional) parameter to the "RTSPServer::createNew()" call above.  if (rtspServer == NULL) {    *env << "Failed to create RTSP server: " << env->getResultMsg() << "\n";    exit(1);  }  ServerMediaSession* sms    = ServerMediaSession::createNew(*env, "testStream", inputFileName,                   "Session streamed by \"testMPEG1or2VideoStreamer\"",                                           isSSM);  sms->addSubsession(PassiveServerMediaSubsession::createNew(*videoSink, rtcp));  rtspServer->addServerMediaSession(sms);
  char* url = rtspServer->rtspURL(sms);  *env << "Play this stream using the URL \"" << url << "\"\n";  delete[] url;#endif
  // Finally, start the streaming:  *env << "Beginning streaming...\n";  play();
  env->taskScheduler().doEventLoop(); // does not return
  return 0; // only to prevent compiler warning}
I am also attaching the media file which I am using for streaming.Can anyone please help me for pointing out the issue ?
Best Regards,Parveen Jain
 		 	   		  
Build a bright career through MSN Education Sign up now. 		 	   		  
_________________________________________________________________
Bollywood, beauties and the latest flicks on MSN entertainment
http://entertainment.in.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20100608/bbd58ddd/attachment-0001.html>


More information about the live-devel mailing list