<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.5730.11" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#000000 size=2>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: Arial">Hi guys,</SPAN><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"> <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">once again, great thanks to Ross for helping me clear many doubts in RTP.</SPAN><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"> <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have some uncertainties regarding DoGetNextFrame() Variables, which I hope anyone can assist.</SPAN><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman"> <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><STRONG><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">fTO</SPAN></STRONG><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> : a RTP buffer, we are to copy video data into this buffer for framing</SPAN><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">eg.</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"> g_video_enc_rbuf->read(fTo, fMaxSize, 0); //the read function will copy the data to fTo</SPAN><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: Arial"><FONT size=3> </FONT></SPAN><SPAN style="FONT-SIZE: 9pt; COLOR: #333333; FONT-FAMILY: SimSun; mso-bidi-font-family: Arial"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun">memcpy(fTo,g_video_enc_rbuf,fFrameSize); // using memcpy function<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">fPresentationTime</SPAN></B><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">: give time information to each frame<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">eg. </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">gettimeofday(&fPresentationTime, NULL); //a simpler form<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun">// a more detailed form<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun">if (fPresentationTime.tv_sec == 0 && fPresentationTime.tv_usec == 0) {</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"> // This is the first frame, so use the current time:</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"> gettimeofday(&fPresentationTime, NULL);</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"> } else {</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"> // Increment by the play time of the previous frame (50ms), my encoder’s frame rate is 20fps</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"> unsigned uSeconds = fPresentationTime.tv_usec + 50000;</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"> fPresentationTime.tv_sec += uSeconds/1000000;</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: 'Courier New'; mso-fareast-font-family: SimSun"> fPresentationTime.tv_usec = uSeconds%1000000;<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">fMaxSize</SPAN></B><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">: Setting the maximum size of a rtp frame. Not necessary if you have already set your encoder to limit the size of a frame. For truncation purpose.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">eg. Can anyone provide some examples on setting fMaxSize?<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">fFrameSize</SPAN></B><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">: Determine the RTP frame size<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">eg. Can anyone provide some examples on setting fFrameSize?</SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p></o:p></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">That’s all I can think of for the variables for DoGetNextFrame. If I miss out anything, pls kindly add in.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">I compiling all the emails which contains information on these information so that anyone in future can refer to them instead of asking again in the mailing list. I can share a file which I have done detailing on NAL units so that people doing h.264 framer can have a better understanding when writing the code.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">Many thanks and regards.<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun"><o:p> </o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun">Zkunhui<o:p></o:p></SPAN></P></FONT><FONT face=Arial size=2></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>