Cast: Skip receiver log messages with time delta that can't be encoded.
When sending receiver log messages in RTCP, we use 12 bits to represent
the time delta of (current event timestamp - event timestamp of first
event in frame). We have a DCHECK to check the time delta can fit in 12
bits, which is failing because we try to encode events that are more
than 2^12 - 1 milliseconds apart.
This change throws away events that are older than 2^12 milliseconds
from the latest event of the frame when building receiver log.
Furthermore, it sorts the events to make sure that delta is
nonnegative.
Also, added comments and changed some variable naming to try to make
it more clear what we are doing during encoding.
TODO in later CL: instead of delta from first event, delta from
previous event.
BUG=348254
Review URL: https://codereview.chromium.org/
185873004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255089 0039d316-1c4b-4281-b951-d872f2087c98