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

This reverts commit 739a5b3692880cb6b41ae620fb9e755c39b044b1.

Reason for revert: Speculate revert due to perf alerts.

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}

TBR=sprang@webrtc.org,srte@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10809
Change-Id: Ic0ad7d45031bf33c24583dfde308bdd8087a62aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158799
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29682}
This commit is contained in:
Erik Språng
2019-11-04 13:53:09 +00:00
committed by Commit Bot
parent ebf4552c8f
commit bb56d4b0e2
8 changed files with 122 additions and 139 deletions

View File

@ -246,9 +246,9 @@ class PacingControllerTest : public ::testing::Test {
TimeDelta::Zero());
}
Timestamp next_probe = pacer_->NextProbeTime();
if (next_probe != Timestamp::PlusInfinity()) {
return std::max(TimeDelta::Zero(), next_probe - clock_.CurrentTime());
auto next_probe = pacer_->TimeUntilNextProbe();
if (next_probe) {
return *next_probe;
}
const TimeDelta min_packet_limit = TimeDelta::ms(5);