Patent ID: 7573894

Claim:
A method of controlling a buffer for reducing litter in a packet network comprising: a) receiving packets into said buffer with a fast attack rate, for each packet, loading the packet into said buffer in correct sequence number position, incrementing said count value, if the count value exceeds said high watermark value then selling said high watermark value to said count value, and if said count value is less than said low watermark value then setting said low watermark value to said count value; b) draining packets from said buffer with a slow decay rate, said draining comprising; i) obtaining a current Dequeue Timestamp; ii) calculating the difference between the current Dequeue Timestamp and a previous Dequeue Timestamp is calculated; iii) if the difference is greater than a Dequeue Time Tick, a determination is made as to whether the buffer is empty and if the buffer is not empty a DequeueBuffer event is generated and both the difference and Dequeue Time Stamp are updated; iv) if the buffer is empty data is inserted by invoking a packet loss concealment, and the Dequeue Time Stamp is updated; v) following step iv) or if the difference is not greater than the Dequeue Time Tick, a determination is made as to whether a predetermined time period has elapsed since a previous buffer slip adjustment; vi) if said predetermined time period has elapsed, then it said low watermark exceeds a low watermark threshold then a DequeueBuffer event is generated and a shrink counter is incremented; vii) if said low watermark does not exceed said low watermark threshold, then said high watermark and said low watermark are set to said count value; viii) following step vii) or if said predetermined time period has not yet elapsed, a determination is made as to whether the buffer is overflowing, in response to which said DequeueBuffer event is generated; and c) maintaining a count value of packets in said buffer; d) maintaining at least a low watermark value representing a minimum of said count value over a time period; e) once within each said period setting said low watermark value equal said count values; f) maintaining a high watermark value representing a maximum of said count value over said time period; and g) setting said high watermark value equal to said count value simultaneously with setting said low water value equal to said count value.