<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif, 新細明體;font-size:18pt"><DIV><FONT size=3>Hi all,</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>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. </FONT></DIV>
<DIV><FONT size=3></FONT><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>This is my subsession</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3> FramedSource* MPEG4VideoServerMediaSubsession<BR> ::createNewStreamSource(unsigned /*clientSessionId*/, unsigned& estBitrate) {<BR> estBitrate = 90000; // kbps, estimate</FONT></DIV>
<DIV><FONT size=3><BR> struct in_addr serverAddress;<BR> serverAddress.s_addr = our_inet_addr("192.168.13.145");</FONT></DIV>
<DIV><FONT size=3> const Port recvPort(8888); <BR> const unsigned char ttl = 255; <BR> Groupsock rtpGroupsockVideo(envir(), serverAddress, recvPort, ttl);</FONT></DIV>
<DIV><FONT size=3> FramedSource* videoES = MPEG4ESVideoRTPSource::createNew(envir(),<BR> &rtpGroupsockVideo, 96, 90000);</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3> return MPEG4VideoStreamDiscreteFramer::createNew(envir(), videoES);</FONT><FONT size=3><BR>}</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>createNewRTPSink() is the same with MPEG4VideoFileServerMediaSubsession.cpp.</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>char const* MPEG4VideoServerMediaSubsession<BR>::getAuxSDPLine(RTPSink* rtpSink, FramedSource* inputSource) {<BR> char const* auxSDPLine = "a=fmtp:96 streamtype=4; profile-level-id=1;</FONT></DIV>
<DIV><FONT size=3> config=000001000000012000C8088002D14043C14183;\n";</FONT></DIV>
<DIV><FONT size=3> return auxSDPLine;<BR>}</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>The SDP line I got from the IPcam SDP file.</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>The main program is the same like testOnDemandRTSPServer.cpp. The only different is using my subsession to replace the FileSubsession.</FONT></DIV>
<DIV><FONT size=3></FONT> </DIV>
<DIV><FONT size=3>But I got a crash and have no idea how to solve it. Have anyone can give some hint?</FONT></DIV>
<DIV><FONT size=3>Thanks a lot.</FONT></DIV></div><br>___________________________________________________ <br> 您的生活即時通 - 溝通、娛樂、生活、工作一次搞定! <br> http://messenger.yahoo.com.tw/</body></html>