[Live-devel] Packets and delay

Ross Finlayson finlayson at live555.com
Mon Sep 9 08:58:05 PDT 2013


> In other words, suppose only N+2 is delayed we would have:
> N, N+1, ---delay 100ms --- N+2

No.  In this case - because there's no gap in RTP sequence number - each of these three packets is delivered immediately, when they arrive.  There's no extra delay.


>  But suppose N+2 and N+3 are delayed would we have? (Assuming that the threshold is expired)
> N, N+1, ---delay 100ms --- N+4
> Or
> N, N+1, ---delay 100ms---, ---delay 100ms---, N+4

In this case the delay starts only after the arrival of packet N+4.  In other words: Packets N and N+1 are delivered immediately, when they arrive.  Then, after packet N+4 arrives, because there's a gap in the RTP sequence numbers, the code delays the delivery of packet N+4, to see if packets N+2 and/or N+3 arrive next.  Specifically:
- If packet N+2 arrives before 100ms has elapsed, then it is delivered immediately, and the 100ms timer is reset.
	- If packet N+3 then arrives next, before 100ms (after the arrival of packet N+2) has elapsed, then packet N+3 is also delivered immediately.  Then packet N+4 is delivered next.  In this case, there's no extra delay.
	- If, however, 100ms (after the arrival of packet N+2) elapses without packet N+3 arriving, then packet N+4 is delivered instead - i.e., after a single delay of 100ms.  (In this case, packet N+3 is never delivered, even if it happens to arrive afterwards.)
- If packet N+3 (but not packet N+2) arrives next, before 100ms (after the arrival of packet N+4) has elapsed, then the 100ms timer is reset.
	- If packet N+2 then arrives, before 100ms (after the arrival of packet N+3) has elapsed, then packet N+2 is delivered immediately.  Then packet N+3 is delivered next.  Then packet N+4 is delivered next.  In this case, there's no extra delay.
	- If, however, 100ms (after the arrival of packet N+3) elapses without packet N+2 arriving, then packet N+3 is delivered instead - i.e., after a single delay of 100ms.  Then packet N+4 is delivered next.  (In this case, packet N+2 is never delivered, even if it happens to arrive afterwards.)
- If neither packet N+2 or N+3 arrives before 100 ms (after the arrival of packet N+4) has elapsed, then packet N+4 is delivered instead - i.e., after a single delay of 100ms.  (In this case, packet N+2 and N+3 are never delivered, even if they happens to arrive afterwards.)

In other words, if there's only packet loss - but no packet reordering - in the network, then no incoming packet will ever be delayed more than 100ms before being delivered.  If there's no packet loss (and no packet reordering), then no incoming packet will ever be delayed.

Once again, there is nothing here that you need concern yourself with.  This will be my (and your) last posting on this topic.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130909/123603bf/attachment-0001.html>


More information about the live-devel mailing list