Revert "Revert "Revert "Reland "Moved congestion controller to task queue.""""

This reverts commit 65792c5a5c542201f7b9feefded505842692e6ed.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Revert "Reland "Moved congestion controller to task queue."""
> 
> This reverts commit 4e849f6925b2ac44b0957a228d7131fc391fca54.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert "Reland "Moved congestion controller to task queue.""
> > 
> > This reverts commit 57daeb7ac7f3d80992905b53fea500953fcfd793.
> > 
> > Reason for revert: Cause increased congestion and deadlocks in downstream project
> > 
> > Original change's description:
> > > Reland "Moved congestion controller to task queue."
> > > 
> > > This is a reland of 0cbcba7ea0dced1a7f353c64d6cf91d46ccb29f9.
> > > 
> > > Original change's description:
> > > > Moved congestion controller to task queue.
> > > > 
> > > > The goal of this work is to make it easier to experiment with the
> > > > bandwidth estimation implementation. For this reason network control
> > > > functionality is moved from SendSideCongestionController(SSCC),
> > > > PacedSender and BitrateController to the newly created
> > > > GoogCcNetworkController which implements the newly created
> > > > NetworkControllerInterface. This allows the implementation to be
> > > > replaced at runtime in the future.
> > > > 
> > > > This is the first part of a split of a larger CL, see:
> > > > https://webrtc-review.googlesource.com/c/src/+/39788/8
> > > > For further explanations.
> > > > 
> > > > Bug: webrtc:8415
> > > > Change-Id: I770189c04cc31b313bd4e57821acff55fbcb1ad3
> > > > Reviewed-on: https://webrtc-review.googlesource.com/43840
> > > > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > > > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#21868}
> > > 
> > > Bug: webrtc:8415
> > > Change-Id: I1d1756a30deed5b421b1c91c1918a13b6bb455da
> > > Reviewed-on: https://webrtc-review.googlesource.com/48000
> > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#21899}
> > 
> > TBR=terelius@webrtc.org,stefan@webrtc.org,srte@webrtc.org
> > 
> > # Not skipping CQ checks because original CL landed > 1 day ago.
> > 
> > Bug: webrtc:8415
> > Change-Id: Ida8074dcac2cc28b3629228eb22846d8a8e81b83
> > Reviewed-on: https://webrtc-review.googlesource.com/52980
> > Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22017}
> 
> TBR=danilchap@webrtc.org,terelius@webrtc.org,stefan@webrtc.org,srte@webrtc.org
> 
> Change-Id: I3393b74370c4f4d0955f50728005b2b925be169b
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8415
> Reviewed-on: https://webrtc-review.googlesource.com/53262
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22023}

TBR=danilchap@webrtc.org,terelius@webrtc.org,stefan@webrtc.org,srte@webrtc.org

Change-Id: Id68ad986ee51142b7be3381d0793709b4392fe2c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8415
Reviewed-on: https://webrtc-review.googlesource.com/53360
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22024}
This commit is contained in:
Sebastian Jansson
2018-02-14 16:53:38 +00:00
committed by Commit Bot
parent 65792c5a5c
commit ea86bb74fc
57 changed files with 844 additions and 3006 deletions

View File

@ -477,47 +477,47 @@ TEST_P(BweSimulation, Evaluation8) {
RunPauseResumeFlows(GetParam());
}
// Following test cases begin with "GoogCcComparison" run the
// evaluation test cases for both GoogCc and other calling RMCAT.
// Following test cases begin with "GccComparison" run the
// evaluation test cases for both GCC and other calling RMCAT.
TEST_P(BweSimulation, GoogCcComparison1) {
TEST_P(BweSimulation, GccComparison1) {
RunVariableCapacity1SingleFlow(GetParam());
BweTest goog_cc_test(false);
goog_cc_test.RunVariableCapacity1SingleFlow(kSendSideEstimator);
BweTest gcc_test(false);
gcc_test.RunVariableCapacity1SingleFlow(kSendSideEstimator);
}
TEST_P(BweSimulation, GoogCcComparison2) {
TEST_P(BweSimulation, GccComparison2) {
const size_t kNumFlows = 2;
RunVariableCapacity2MultipleFlows(GetParam(), kNumFlows);
BweTest goog_cc_test(false);
goog_cc_test.RunVariableCapacity2MultipleFlows(kSendSideEstimator, kNumFlows);
BweTest gcc_test(false);
gcc_test.RunVariableCapacity2MultipleFlows(kSendSideEstimator, kNumFlows);
}
TEST_P(BweSimulation, GoogCcComparison3) {
TEST_P(BweSimulation, GccComparison3) {
RunBidirectionalFlow(GetParam());
BweTest goog_cc_test(false);
goog_cc_test.RunBidirectionalFlow(kSendSideEstimator);
BweTest gcc_test(false);
gcc_test.RunBidirectionalFlow(kSendSideEstimator);
}
TEST_P(BweSimulation, GoogCcComparison4) {
TEST_P(BweSimulation, GccComparison4) {
RunSelfFairness(GetParam());
BweTest goog_cc_test(false);
goog_cc_test.RunSelfFairness(GetParam());
BweTest gcc_test(false);
gcc_test.RunSelfFairness(GetParam());
}
TEST_P(BweSimulation, GoogCcComparison5) {
TEST_P(BweSimulation, GccComparison5) {
RunRoundTripTimeFairness(GetParam());
BweTest goog_cc_test(false);
goog_cc_test.RunRoundTripTimeFairness(kSendSideEstimator);
BweTest gcc_test(false);
gcc_test.RunRoundTripTimeFairness(kSendSideEstimator);
}
TEST_P(BweSimulation, GoogCcComparison6) {
TEST_P(BweSimulation, GccComparison6) {
RunLongTcpFairness(GetParam());
BweTest goog_cc_test(false);
goog_cc_test.RunLongTcpFairness(kSendSideEstimator);
BweTest gcc_test(false);
gcc_test.RunLongTcpFairness(kSendSideEstimator);
}
TEST_P(BweSimulation, GoogCcComparison7) {
TEST_P(BweSimulation, GccComparison7) {
const int kNumTcpFiles = 10;
std::vector<int> tcp_file_sizes_bytes =
@ -528,24 +528,24 @@ TEST_P(BweSimulation, GoogCcComparison7) {
RunMultipleShortTcpFairness(GetParam(), tcp_file_sizes_bytes,
tcp_starting_times_ms);
BweTest goog_cc_test(false);
goog_cc_test.RunMultipleShortTcpFairness(
kSendSideEstimator, tcp_file_sizes_bytes, tcp_starting_times_ms);
BweTest gcc_test(false);
gcc_test.RunMultipleShortTcpFairness(kSendSideEstimator, tcp_file_sizes_bytes,
tcp_starting_times_ms);
}
TEST_P(BweSimulation, GoogCcComparison8) {
TEST_P(BweSimulation, GccComparison8) {
RunPauseResumeFlows(GetParam());
BweTest goog_cc_test(false);
goog_cc_test.RunPauseResumeFlows(kSendSideEstimator);
BweTest gcc_test(false);
gcc_test.RunPauseResumeFlows(kSendSideEstimator);
}
TEST_P(BweSimulation, GoogCcComparisonChoke) {
TEST_P(BweSimulation, GccComparisonChoke) {
int array[] = {1000, 500, 1000};
std::vector<int> capacities_kbps(array, array + 3);
RunChoke(GetParam(), capacities_kbps);
BweTest goog_cc_test(false);
goog_cc_test.RunChoke(kSendSideEstimator, capacities_kbps);
BweTest gcc_test(false);
gcc_test.RunChoke(kSendSideEstimator, capacities_kbps);
}
} // namespace bwe

View File

@ -181,8 +181,7 @@ enum BandwidthEstimatorType {
kBbrEstimator
};
const char* const bwe_names[] = {"Null", "NADA", "REMB",
"GoogCc", "TCP", "BBR"};
const char* const bwe_names[] = {"Null", "NADA", "REMB", "GCC", "TCP", "BBR"};
int64_t GetAbsSendTimeInMs(uint32_t abs_send_time);

View File

@ -32,7 +32,7 @@ SendSideBweSender::SendSideBweSender(int kbps,
&event_log_)),
acknowledged_bitrate_estimator_(
rtc::MakeUnique<AcknowledgedBitrateEstimator>()),
bwe_(new DelayBasedBwe(nullptr)),
bwe_(new DelayBasedBwe(nullptr, clock)),
feedback_observer_(bitrate_controller_.get()),
clock_(clock),
send_time_history_(clock_, 10000),
@ -72,7 +72,7 @@ void SendSideBweSender::GiveFeedback(const FeedbackPacket& feedback) {
int64_t rtt_ms =
clock_->TimeInMilliseconds() - feedback.latest_send_time_ms();
bwe_->OnRttUpdate(rtt_ms);
bwe_->OnRttUpdate(rtt_ms, rtt_ms);
BWE_TEST_LOGGING_PLOT(1, "RTT", clock_->TimeInMilliseconds(), rtt_ms);
std::sort(packet_feedback_vector.begin(), packet_feedback_vector.end(),
@ -80,8 +80,7 @@ void SendSideBweSender::GiveFeedback(const FeedbackPacket& feedback) {
acknowledged_bitrate_estimator_->IncomingPacketFeedbackVector(
packet_feedback_vector);
DelayBasedBwe::Result result = bwe_->IncomingPacketFeedbackVector(
packet_feedback_vector, acknowledged_bitrate_estimator_->bitrate_bps(),
clock_->TimeInMilliseconds());
packet_feedback_vector, acknowledged_bitrate_estimator_->bitrate_bps());
if (result.updated)
bitrate_controller_->OnDelayBasedBweResult(result);

View File

@ -24,9 +24,6 @@
namespace webrtc {
namespace testing {
namespace bwe {
namespace {
const float kPaceMultiplier = 2.5f;
}
void PacketSender::Pause() {
running_ = false;
@ -167,7 +164,7 @@ PacedVideoSender::PacedVideoSender(PacketProcessorListener* listener,
? static_cast<Pacer*>(new BbrPacedSender(&clock_, this, nullptr))
: static_cast<Pacer*>(new PacedSender(&clock_, this, nullptr))) {
modules_.push_back(pacer_.get());
pacer_->SetPacingRates(source->bits_per_second() * kPaceMultiplier, 0);
pacer_->SetEstimatedBitrate(source->bits_per_second());
}
PacedVideoSender::~PacedVideoSender() {
@ -315,7 +312,7 @@ void PacedVideoSender::OnNetworkChanged(uint32_t target_bitrate_bps,
uint8_t fraction_lost,
int64_t rtt) {
VideoSender::OnNetworkChanged(target_bitrate_bps, fraction_lost, rtt);
pacer_->SetPacingRates(target_bitrate_bps * kPaceMultiplier, 0);
pacer_->SetEstimatedBitrate(target_bitrate_bps);
}
void PacedVideoSender::OnNetworkChanged(uint32_t bitrate_for_encoder_bps,