webrtc/modules/rtp_rtcp
Niels Möller 1a3859c161 Simplify book-keeping of lost packets
Update the |cumulative_lost_| counter per received packet. The rules
follow from RFC 3550 and are fairly simple: Decrement the counter by
one for every received packet. For every in-order packet, i.e., increasing
|received_seq_max_|, add that change to |cumulative_lost_|.

Net change is zero as long as packets are received in proper sequence.

This way, GetStats() always returns an up-to-date value, independent
of the timing of RTCP report blocks.

For RTCP reports, keep a workaround to never report negative cumulative loss.

Bug: webrtc:10679
Change-Id: I47ff3bf266ff2382f405ec9828d34f7fad7068b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150641
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29058}
2019-09-04 08:53:32 +00:00
..
include Fix 28 ClangTidy - Readability findings in modules/rtp_rtcp/ 2019-09-04 07:38:20 +00:00
mocks Removes deprecated InsertPacket/TimeToSendPacket/TimeToSendPadding 2019-08-26 11:55:55 +00:00
source Simplify book-keeping of lost packets 2019-09-04 08:53:32 +00:00
test/testFec Revert "Refactor FEC code to use COW buffers" 2019-09-03 07:53:05 +00:00
BUILD.gn Split out RtpSource from libjingle_peerconnection_api 2019-09-02 14:04:47 +00:00
DEPS Replace field trials with WebRtcKeyValueConfig in RtpRtcpModule 2019-02-21 14:25:34 +00:00
OWNERS Add sprang@ as owner in modules/rtp_rtcp 2019-07-24 17:06:36 +00:00