<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)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@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:12.0pt;
font-family:"Times New Roman","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;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.apple-style-span
{mso-style-name:apple-style-span;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.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><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Hi Ross,<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Thanks for the correction. I fed “</span><b><span style='font-size:14.0pt'>LiveSourceWithx264</span></b><span style='font-family:"Calibri","sans-serif";color:#1F497D'>” </span>into "<b><span style='font-size:14.0pt'>H264VideoStreamDiscreteFramer</span></b>” and now it works if I comment out the virtual function “<b><span style='font-size:14.0pt'>getAuxSDPLine</span></b>” in my implementation. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In a previous question posted by user,<o:p></o:p></p><p class=MsoNormal><a href="http://lists.live555.com/pipermail/live-devel/2011-December/014276.html">http://lists.live555.com/pipermail/live-devel/2011-December/014276.html</a><o:p></o:p></p><pre>you said this function is needed “only for when you're streaming codecs like H.264 or MPEG-4 video that require special 'configuration' parameters”<o:p></o:p></pre><pre>and I am streaming h264 video.<o:p></o:p></pre><pre><o:p> </o:p></pre><pre>My getAuxSDPLine() is <o:p></o:p></pre><pre><o:p> </o:p></pre><pre style='margin-left:.5in'><span style='font-size:12.0pt;color:#1F497D'> </span><span style='font-size:11.0pt;color:#1F497D'> char const* H264LiveServerMediaSession::getAuxSDPLine(RTPSink* rtpSink, FramedSource* inputSource)<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> {<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> if(fAuxSDPLine != NULL) return fAuxSDPLine;<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> if(fDummySink == NULL)<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> {<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> fDummySink = rtpSink;<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> fDummySink->startPlaying(*inputSource, afterPlayingDummy, this);<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> checkForAuxSDPLine(this);<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> }<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'><o:p> </o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> envir().taskScheduler().doEventLoop(&fDoneFlag);<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> return fAuxSDPLine;<o:p></o:p></span></pre><pre style='margin-left:.5in'><span style='font-size:11.0pt;color:#1F497D'> }<o:p></o:p></span></pre><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>After entering into the doEventLoop() my function is going into infinite loop because it is not getting SPS and PPS nal units.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If I comment out the function it is working on brower and vlc player on desktop. But it is not working on iPad brower ie it is rendering one frame and getting struck.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Does this happen because I have not received SPS and PPS nal units ?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Vikram Singh<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> live-devel-bounces@ns.live555.com [mailto:live-devel-bounces@ns.live555.com] <b>On Behalf Of </b>Ross Finlayson<br><b>Sent:</b> Saturday, April 19, 2014 11:38 AM<br><b>To:</b> LIVE555 Streaming Media - development & use<br><b>Subject:</b> Re: [Live-devel] Frames are corrupted<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div style='margin-left:.5in'><p class=MsoNormal style='text-indent:-.25in'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>-</span><span style='font-size:7.0pt;color:#1F497D'> <span class=apple-converted-space> </span></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I think the issue is with<span class=apple-converted-space> </span></span><b><span style='font-family:"Calibri","sans-serif";color:#1F497D'>fMaxSize</span></b><span class=apple-converted-space><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>in<span class=apple-converted-space> </span></span><b><span style='font-family:"Calibri","sans-serif";color:#376092'>deliverFrame</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>() which starts from<span class=apple-converted-space> </span></span><b><span style='font-size:10.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>150000</span></b><span class=apple-converted-space><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>and goes to zero which should not happen.</span><o:p></o:p></p></div></div></blockquote><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>OK, your problem is that - in your implementation of the "createNewStreamSource()" virtual function - you are feeding a "LiveSourceWithx264" object into a "H264VideoStreamFramer". This is wrong, because "H264VideoStreamFramer" is used only when parsing a H.264 *byte stream*, not a discrete sequence of NAL units. Instead, you should be feeding a "LiveSourceWithx264" into a "H264VideoStreamDiscreteFramer".<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Also, it's important that the H.264 NAL units that you deliver - from the "LiveSourceWithx264" - into the "H264VideoStreamDiscreteFramer" *not* begin with a 0x00 0x00 0x00 0x01 'start code'. I.e., you need to remove these 4 bytes (and adjust "fFrameSize" accordingly) when you do the delivery.<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span class=apple-style-span><span style='font-family:"Helvetica","sans-serif";color:black'>Ross Finlayson</span></span><span style='font-family:"Helvetica","sans-serif";color:black'><br><span class=apple-style-span>Live Networks, Inc.</span><br><span class=apple-style-span><a href="http://www.live555.com/">http://www.live555.com/</a></span></span> <o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>