[asterisk-dev] [Code Review] Improve behavior of jitterbuffer when maxjitterbuffer is set

Matthew Nicholson mnicholson at digium.com
Fri Feb 6 14:03:30 CST 2009


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/144/
-----------------------------------------------------------

(Updated 2009-02-06 14:03:30.680460)


Review request for Asterisk Developers.


Changes
-------

Tweaked the testing done section.


Summary
-------

This patch improves the way the jitterbuffer handles maxjitterbuffer and dramatically reduces the number of frames dropped when maxjitterbuffer is exceeded.  In the current jitterbuffer, when maxjitterbuffer is exceeded, all new frames are dropped until the jitterbuffer is empty.  This patch modifies the code to only drop frames until maxjitterbuffer is no longer exceeded.

Also, previously when maxjitterbuffer was exceeded, dropped frames were not tracked causing stats for dropped frames to be incorrect, this patch also addresses that problem.


This addresses bug 14044.
    http://bugs.digium.com/view.php?id=14044


Diffs
-----

  /branches/1.4/main/jitterbuf.c 162139 

Diff: http://reviewboard.digium.com/r/144/diff


Testing (updated)
-------

To test this patch I setup two boxes and one endpoint;

sip endpoint -> box1 -> box2

I used netem (from the linux kernel) on box2 to generate jitter in all packets it originated.  I set netem to delay 50% of the packets by 0ms to 1100ms and I set maxjitterbuffer to 1000ms.  The new code performed as intended and dramatically increased audio quality.


Thanks,

Matthew




More information about the asterisk-dev mailing list