<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=utf-8">
<meta name="Generator" content="Microsoft Word 12 (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;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
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;}
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;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks Ross, that has worked well.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Richard.<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 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> live-devel [mailto:live-devel-bounces@ns.live555.com]
<b>On Behalf Of </b>Ross Finlayson<br>
<b>Sent:</b> 24 October 2014 18:36<br>
<b>To:</b> LIVE555 Streaming Media - development & use<br>
<b>Subject:</b> Re: [Live-devel] H264or5VideoStreamParser::parse() from a FramedSource<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>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">After creating my own class's<o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt"><span style="font-size:9.5pt;font-family:Symbol">·</span><span style="font-size:7.0pt"> <span class="apple-converted-space"> </span></span><span style="font-size:9.5pt;font-family:Consolas">class myRTSPSinkOndemandMediaSubsession
: public OnDemandServerMediaSubsession</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
<div style="margin-left:36.0pt">
<p class="MsoNormal" style="text-indent:-18.0pt"><span style="font-size:9.5pt;font-family:Symbol">·</span><span style="font-size:7.0pt"> <span class="apple-converted-space"> </span></span><span style="font-size:9.5pt;font-family:Consolas">class myFrameSource
: public FramedSource</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><o:p></o:p></span></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">If your “myFrameSource” class delivers discrete H.264 NAL units (i.e., one at a time), rather than an unstructured byte stream, then you MUST feed this into a “H264VideoStreamDiscreteFramer”, NOT a “H264VideoStreamFramer”.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">In particular, your “myRTSPSinkOndemandMediaSubsession” class’s implementation of the "createNewStreamSource()” virtual function should look something like this: <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">//////////<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">FramedSource* myRTSPSinkOndemandMediaSubsession::createNewStreamSource(unsigned /*clientSessionId*/, unsigned& estBitrate) {<br>
estBitrate = 500; // in kbps; set this to an appropriate estimate of your stream’s bitrate<br>
<br>
// Create the video source:<br>
FramedSource* videoSource = myFrameSource::createNew(envir(), params);<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> // Create a framer for the video stream:<br>
return H264VideoStreamDiscreteFramer::createNew(envir(), videoSource);<br>
}<o:p></o:p></p>
<div>
<p class="MsoNormal">//////////<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
Note also that - because you’re feeding into a “H264VideoStreamDiscreteFramer” - each H.264 NAL unit delivered by your “myFrameSource” object MUST NOT begin with a ‘start code’ (0x00 0x00 0x00 0x01).<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Also, if your encoder doesn’t automatically do so, then you should arrange for the first two NAL units delivered by your “myFrameSource” object to be a SPS and a PPS NAL unit. (Alternatively, in your implementation of the “createNewRTPSink()”
virtual function, you can use one of the forms of “H264VideoRTPSink::createNew()” that takes SPS and PPS NAL unit information as parameters.)<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><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"><br>
<br>
______________________________________________________________________<br>
This email has been scanned by the Symantec Email Security.cloud service.<br>
For more information please visit <a href="http://www.symanteccloud.com">http://www.symanteccloud.com</a><br>
______________________________________________________________________<o:p></o:p></p>
</div>
<br clear="both">
______________________________________________________________________<BR>
This email has been scanned by the Symantec Email Security.cloud service.<BR>
For more information please visit http://www.symanteccloud.com<BR>
______________________________________________________________________<BR>
</body>
</html>