[Live-devel] Relaying an MP2T fed into RTP source through an RTSP server

Achraf Gazdar achraf.gazdar at gmail.com
Thu Dec 22 17:12:00 PST 2011


Hi Ross,
I want to serve a live RTP source serving MP2T tv channel through an RTSP
server. To do it I have subclassed the OnDemandServerSubsession throug my
MPEG2TransportUDPServerSubsession class where I have redefined the
createNewStreamSource function as follow

FramedSource* MPEG2TransportUDPServerMediaSubsession
::createNewStreamSource(unsigned/* clientSessionId*/, unsigned& estBitrate){
    estBitrate = 5000;
    return MPEG2TransportStreamFramer::createNew(fEnv,fSource);
}

And I have redefined the createNewRTPSink exactly as done in the
MPEG2TransportFileServerMediaSubsession class.

To test this implementation I have added a new bloc to the
testOnDemandRTSPServer to serve this live stream like this :

{
      char const* tvServiceName = "tv";
      char const* inputAddressStr = "127.0.0.1";
      struct in_addr inputAddress;
      inputAddress.s_addr = our_inet_addr(inputAddressStr);
      Port const inputPort(5004);
      unsigned char const inputTTL = 0;
      Groupsock inputRTPsock(*env, inputAddress, inputPort, inputTTL);
      SimpleRTPSource* RTPSource =
SimpleRTPSource::createNew(*env,&inputRTPsock, 33,
90000, "video/MP2T",
0, False);
      ServerMediaSession* sms
      = ServerMediaSession::createNew(*env, tvServiceName, tvServiceName,
      descriptionString);

sms->addSubsession(MPEG2TransportUDPServerMediaSubsession::createNew(*env,
                RTPSource,
                True));// All clients share the same live source
      rtspServer->addServerMediaSession(sms);
      announceStream(rtspServer, sms,tvServiceName,tvServiceName);

  }



The RTP source is obtained like that
STB--http raw MP2T-->VLC----MP2T on RTP--->testOnDemandRTSPServer . The VLC
and the testOnDemandRTSPServer are running on the same machine. The problem
is that when I request the live stream from any client player I get a
SEGMENTATION FAULT on the tesOnDemandRTSPServer. When I request the RTP
stream with vlc without passing through the server (STB--http raw
MP2T-->VLC----MP2T on RTP--->VLC client) I get the display without any
problem.

Am I missing some thing ????

Thanks in advance
-- 
Achraf Gazdar
Associate Professor on Computer Science
Hana Research Unit, CRISTAL Lab.
http://www.hana-uma.org
Tunisia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111223/f6365f3e/attachment.html>


More information about the live-devel mailing list