Reland "Refactors BitrateProber with unit types and absolute probe time."

This is a reland of 739a5b3692880cb6b41ae620fb9e755c39b044b1

Patchset 1 is the original CL, patchset 3 includes a fix

Original change's description:
> Refactors BitrateProber with unit types and absolute probe time.
>
> Using unit types improves readability and some conversion in PacedSender
> can be removed.
>
> TimeUntilNextProbe() is replaced by NextProbeTime(), so returning an
> absolute time rather than a delta. This fits better with the upcoming
> TaskQueue based pacer, and is also what is already stored internally
> in BitrateProber.
>
> Bug: webrtc:10809
> Change-Id: I5a4e289d2b53e99d3c0a2f4b36a966dba759d5cf
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158743
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#29670}

Bug: webrtc:10809
Change-Id: I033193c78474fdd82c109fdab0a8f09a05f7b30e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158841
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29688}
This commit is contained in:
Erik Språng
2019-11-05 11:21:48 +01:00
committed by Commit Bot
parent 1983458981
commit b210eeb812
8 changed files with 210 additions and 126 deletions

View File

@ -118,10 +118,11 @@ class PacingController {
// effect.
void SetProbingEnabled(bool enabled);
// Time until next probe should be sent. If this value is set, it should be
// Time at which next probe should be sent. If this value is set, it should be
// respected - i.e. don't call ProcessPackets() before this specified time as
// that can have unintended side effects.
absl::optional<TimeDelta> TimeUntilNextProbe();
// If no scheduled probe, Timestamp::PlusInifinity() is returned.
Timestamp NextProbeTime();
// Time since ProcessPackets() was last executed.
TimeDelta TimeElapsedSinceLastProcess() const;