[Live-devel] getNextFrame Variables

#TAY KOON HWEE# TAYK0004 at ntu.edu.sg
Fri Jan 5 15:06:36 PST 2007


Hi guys,

 

once again, great thanks to Ross for helping me clear many doubts in RTP.

 

I have some uncertainties regarding DoGetNextFrame() Variables, which I hope anyone can assist.

 

fTO : a RTP buffer, we are to copy video data into this buffer for framing

eg.  g_video_enc_rbuf->read(fTo, fMaxSize, 0); //the read function will copy the data to fTo

       memcpy(fTo,g_video_enc_rbuf,fFrameSize); // using memcpy function

 

fPresentationTime: give time information to each frame

 

eg. gettimeofday(&fPresentationTime, NULL); //a simpler form

 

// a more detailed form

if (fPresentationTime.tv_sec == 0 && fPresentationTime.tv_usec == 0) {

      // This is the first frame, so use the current time:

      gettimeofday(&fPresentationTime, NULL);

    } else {

      // Increment by the play time of the previous frame (50ms), my encoder's frame rate is 20fps

    unsigned uSeconds         = fPresentationTime.tv_usec + 50000;

    fPresentationTime.tv_sec += uSeconds/1000000;

    fPresentationTime.tv_usec = uSeconds%1000000;

 

fMaxSize: 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.

 

eg. Can anyone provide some examples on setting fMaxSize?

 

fFrameSize: Determine the RTP frame size

 

eg. Can anyone provide some examples on setting fFrameSize?

 

 

 

That's all I can think of for the variables for DoGetNextFrame. If I miss out anything, pls kindly add in.

 

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.

 

Many thanks and regards.

 

 

Zkunhui

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070105/60c29b71/attachment.html 


More information about the live-devel mailing list