[Live-devel] Getting remote RTP packets and streaming them to client

粘耀文 dconan0404 at yahoo.com.tw
Fri Aug 14 00:07:19 PDT 2009


Hi all,
 
I want to get remote RTP packets which send from IPcam and then streaming them to the client player. For this, I wrote a new subsession called MPEG4VideoServerMediaSubsession. 
 
This is my subsession
 
 FramedSource* MPEG4VideoServerMediaSubsession
 ::createNewStreamSource(unsigned /*clientSessionId*/, unsigned& estBitrate) {
     estBitrate = 90000; // kbps, estimate

     struct in_addr serverAddress;
     serverAddress.s_addr = our_inet_addr("192.168.13.145");
     const Port recvPort(8888); 
     const unsigned char ttl = 255; 
     Groupsock rtpGroupsockVideo(envir(), serverAddress, recvPort, ttl);
     FramedSource* videoES = MPEG4ESVideoRTPSource::createNew(envir(),
                    &rtpGroupsockVideo, 96, 90000);
 
    return MPEG4VideoStreamDiscreteFramer::createNew(envir(), videoES);
}
 
createNewRTPSink() is the same with MPEG4VideoFileServerMediaSubsession.cpp.
 
char const* MPEG4VideoServerMediaSubsession
::getAuxSDPLine(RTPSink* rtpSink, FramedSource* inputSource) {
    char const* auxSDPLine = "a=fmtp:96 streamtype=4; profile-level-id=1;
    config=000001000000012000C8088002D14043C14183;\n";
    return auxSDPLine;
}
 
The SDP line I got from the IPcam SDP file.
 
The main program is the same like testOnDemandRTSPServer.cpp. The only different is using my subsession to replace the FileSubsession.
 
But I got a crash and have no idea how to solve it. Have anyone can give some hint?
Thanks a lot.

___________________________________________________ 
 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! 
 http://messenger.yahoo.com.tw/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090814/22871cfe/attachment.html>


More information about the live-devel mailing list