[vlc-devel] Re: [Patch] RTP reordering - dropping of old/duplicate packets
Marian Durkovic
md at bts.sk
Fri Sep 30 09:25:21 CEST 2005
On Thu, Sep 29, 2005 at 10:12:51PM -0400, braymond at echostorm.net wrote:
> I've worked in the VTC community for a long time and although long delays
> are bad a small smount of buffering can smooth what would be an unplayable
> stream into something usable by handling some jitter and out of order
> packets. Like you say buffering can be bad, I can however see a
> configurable static buffer being useful, or even optionally the same kind
> of dynamic RTP buffer used in most H.323 stacks.
>
> Generally a 100-200ms buffer is enough to smooth out minor troublespots
> and most people won't even notice anything like that, but it doesn't have
> to be used.
Just to add: requirements for packet reordering are in most cases less
demanding than requirements to compensate network or OS jitter.
VLC by default implements a 300 msec buffer to compensate network jitter
(see udp-caching). This is much more than satisfactory for reordering
purposes - however it will probably require serious modifications to
be able to insert late packet somewhere into the middle of this buffer.
Thus I've prepared just a simple patch which improves the situation by
trashing duplicates and/or late packets and thus reducing the number
of discontinuities from 3 to only 1. Since it's very simple, I'd appeciate
if this patch could be included into 0.8.4-test2.
Thanks & kind regards,
M.
>
> - Brian
>
> > Be careful about anything reordering RTP -- the whole idea is Real Time --
> > adding buffers is bad juju for people who rely on it to be just that.
> >
> > -----Original Message-----
> > From: vlc-devel-bounce at videolan.org [mailto:vlc-devel-bounce at videolan.org]
> > On Behalf Of Marian Durkovic
> > Sent: Thursday, September 29, 2005 10:10 AM
> > To: vlc-devel at videolan.org
> > Subject: [vlc-devel] [Patch] RTP reordering - dropping of old/duplicate
> > packets
> >
> > Hi all,
> >
> > I've added a bit of code to the UDP/RTP input, which assures that old or
> > duplicate RTP packets are trashed. When the network performs packet
> > reordering, only one discontinuity happens instead of 3 before - since the
> > old packet is trashed. If multiple copies of the same packet are received,
> > only one is used and all the others are trashed.
> >
> > This is still not the full solution, since in case of packet reordering
> > this code is not able to restore the correct order and still creates one
> > discontinuity. But to avoid this, some kind of buffer needs to be
> > implemented, which would be able to hold the early packets until the
> > correct
> > one arrives.
> >
> > Please find the patch in the attachment.
> >
> >
> > With kind regards,
> >
> > M.
> >
> > --------------------------------------------------------------------------
> > ---- ----
> > ---- Marian Durkovic network manager ----
> > ---- ----
> > ---- Slovak Technical University Tel: +421 2 524 51 301 ----
> > ---- Computer Centre, Nam. Slobody 17 Fax: +421 2 524 94 351 ----
> > ---- 812 43 Bratislava, Slovak Republic E-mail/sip: md at bts.sk ----
> > ---- ----
> > --------------------------------------------------------------------------
> >
> > --
> > This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> > To unsubscribe, please read http://developers.videolan.org/lists.html
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list