<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Balloon Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
{mso-style-name:"Balloon Text Char";
mso-style-priority:99;
mso-style-link:"Balloon Text";
font-family:"Tahoma","sans-serif";}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.EmailStyle22
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'>Hi,</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Problem:<o:p></o:p></span></p><p class=MsoNormal><b>I see the NALS being sent up but <span style='color:#1F497D'>to the framer from the Video Source but the</span> RTSP is not sending them out. Any ideas where I have gone wrong? Any suggestions would be greatly appreciated.<o:p></o:p></b></p><p class=MsoNormal><b><o:p> </o:p></b></p><p class=MsoNormal><b>From the output from Wireshark. I think the problem may be the SDP record. I see the request and response but then VLC immediately tears down the connection after receiving the Source description. And if so how do I handle that?<o:p></o:p></b></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Here is what I have done </span><span style='color:#1F497D'>to get this</span><span style='color:#1F497D'> far:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal>I am using the testOnDemandRTSPServer<span style='color:#1F497D'>.cpp</span> as my template<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I added the following to the main function.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> // Create VENC stream source<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> {<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> char const* streamName = "vencVideoTest";<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> char const* inputFileName = "/data/out/VID_CH00.h264"; // NOT USED it is here for information only<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> ServerMediaSession* sms<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> = ServerMediaSession::createNew(*env, streamName, streamName,<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> descriptionString);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> sms->addSubsession(H264VideoVencMediaSubsession<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> ::createNew(*env,vencConfigSettings.chanId, reuseFirstSource));<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> rtspServer->addServerMediaSession(sms);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> announceStream(rtspServer, sms, streamName, inputFileName);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> }<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b>I’ve created the H264VideoVencMediaSubsession to inherit from the OnDemandServerMediaSubssession<o:p></o:p></b></p><p class=MsoNormal>H264VideoVencMediaSubsession : OnDemandServerMediaSubsession<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The H264VideoVencMediaSubsession::createNewStreamSource returns a<b> H264VideoStreamDiscreteFramer</b><o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'>FramedSource* H264VideoVencMediaSubsession::createNewStreamSource(unsigned /*clientSessionId*/, unsigned& estBitrate) {<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> estBitrate = 500; // kbps, estimate<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> fprintf(stderr,"%s:%d %s\n",__FILE__,__LINE__,__FUNCTION__);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> fflush(stderr);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> // Create the video source:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> VencSource* vencSource = VencSource::createNew(envir(), fChanId);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> if (vencSource == NULL) return NULL;<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> vencSource->signalVencEventStartCB(); // need to register video encoder call back within scheduler thread<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> // Create a framer for the Video Elementary Stream:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'> return H264VideoStreamDiscreteFramer::createNew(envir(), vencSource);<o:p></o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'><span style='font-size:9.0pt;font-family:"Courier New"'>}<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The Video encoder hands VencSource VCL frames that may contain multiple NALs so the deliverFrame strips off the start NAL frame codes finds the end of the NAL unit and delivers one NAL unit per frame delivery. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><b>I see these NALS being sent up but the RTSP is not sending them out. Any ideas where I have gone wrong? Any suggestions would be greatly appreciated.<o:p></o:p></b></p><p class=MsoNormal><b><o:p> </o:p></b></p><p class=MsoNormal><b>From the output from Wireshark. I think the problem may be the SDP record. I see the request and response but then VLC immediately tears down the connection after receiving the Source description. And if so how do I handle that?<o:p></o:p></b></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><img width=1333 height=694 id="Picture_x0020_1" src="cid:image001.png@01CE3698.16C792F0"><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Richard Legault<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Lead Design Engineer<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Nuvation Research<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Waterloo On Canada<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p></div></body></html>