[AG-DEV] UCL common lib rtp_recv & frame timing

Andrew Ford andrew.ford at rit.edu
Wed Jul 28 10:41:41 CDT 2010


Hi Rhys,

I've tried calling rtp_recv once with both 10ms and 1ms timeout times (as
well as no timeout at all) and it looks like it doesn't make a difference. I
also tried changing the system UDP buffer sizes to see if that had any
effect, but it doesn't seem to.

--Andrew

2010/7/27 Rhys Hawkins <rhys.hawkins at anu.edu.au>

> On Tue, 27 Jul 2010 14:12:37 -0400
> Andrew Ford <andrew.ford at rit.edu> wrote:
>
> >
> >   timeout.tv_sec = 0;
> >   timeout.tv_usec = 10000;
> >   for (int i = 0; i < 1000 && rtp_recv(session, &timeout, _timestamp); i
> ++) {
> >
> >
> >     timeout.tv_sec = 0;
> >     timeout.tv_usec = 10;
> >
> >   }
> >
>
> Hi Andrew,
>
> All that code is doing is a crude version of:
>
>  while (elapsed_time < 10ms) {
>    process incoming packets
>  }
>
> You could try and replace the for loop with just one call to the rtp_recv
> function, ie:
>
>  timeout.tv_sec = 0;
>  timeout.tv_usec = 10000;
>   rtp_recv(session, &timeout, _timestamp);
>
> and see if that fixes your problem.
>
> The code above was to handle an issue with DV decoding in that decoding an
> entire frame of DV took a certain length of time and during that time the
> UDP buffer (kernel side) could overflow causing loss of data. I don't think
> it should be the cause of your problems, but things are pretty foggy that
> far back in time so it may have other ramifications I've forgotten about.
>
> Cheers,
>     Rhys
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/ag-dev/attachments/20100728/e941ac42/attachment.htm>


More information about the ag-dev mailing list