| Index: webrtc/call/rampup_tests.cc
|
| diff --git a/webrtc/call/rampup_tests.cc b/webrtc/call/rampup_tests.cc
|
| index eec3258773e75f927642c85846b883cbe75ed0a5..f637f7757735e628d137956ba13cd31100769176 100644
|
| --- a/webrtc/call/rampup_tests.cc
|
| +++ b/webrtc/call/rampup_tests.cc
|
| @@ -20,7 +20,6 @@ namespace webrtc {
|
| namespace {
|
|
|
| static const int64_t kPollIntervalMs = 20;
|
| -static const int kHighBandwidthLimitBps = 80000;
|
| static const int kExpectedHighVideoBitrateBps = 60000;
|
| static const int kExpectedHighAudioBitrateBps = 30000;
|
| static const int kLowBandwidthLimitBps = 20000;
|
| @@ -367,7 +366,7 @@ RampUpDownUpTester::RampUpDownUpTester(size_t num_video_streams,
|
| state_start_ms_(clock_->TimeInMilliseconds()),
|
| interval_start_ms_(clock_->TimeInMilliseconds()),
|
| sent_bytes_(0) {
|
| - forward_transport_config_.link_capacity_kbps = kHighBandwidthLimitBps / 1000;
|
| + forward_transport_config_.link_capacity_kbps = GetHighLinkCapacity();
|
| }
|
|
|
| RampUpDownUpTester::~RampUpDownUpTester() {}
|
| @@ -420,9 +419,16 @@ std::string RampUpDownUpTester::GetModifierString() const {
|
| }
|
|
|
| int RampUpDownUpTester::GetExpectedHighBitrate() const {
|
| - if (num_audio_streams_ > 0 && num_video_streams_ == 0)
|
| - return kExpectedHighAudioBitrateBps;
|
| - return kExpectedHighVideoBitrateBps;
|
| + int expected_bitrate_bps = 0;
|
| + if (num_audio_streams_ > 0)
|
| + expected_bitrate_bps += kExpectedHighAudioBitrateBps;
|
| + if (num_video_streams_ > 0)
|
| + expected_bitrate_bps += kExpectedHighVideoBitrateBps;
|
| + return expected_bitrate_bps;
|
| +}
|
| +
|
| +int RampUpDownUpTester::GetHighLinkCapacity() const {
|
| + return 4 * GetExpectedHighBitrate() / (3 * 1000);
|
| }
|
|
|
| void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) {
|
| @@ -453,8 +459,7 @@ void RampUpDownUpTester::EvolveTestState(int bitrate_bps, bool suspended) {
|
| suspended == check_suspend_state) {
|
| // The ramp-down was successful. Change the channel limit back to a
|
| // high value, and move to the next test state.
|
| - forward_transport_config_.link_capacity_kbps =
|
| - kHighBandwidthLimitBps / 1000;
|
| + forward_transport_config_.link_capacity_kbps = GetHighLinkCapacity();
|
| send_transport_->SetConfig(forward_transport_config_);
|
| test_state_ = kSecondRampup;
|
| webrtc::test::PrintResult("ramp_up_down_up", GetModifierString(),
|
| @@ -490,123 +495,51 @@ class RampUpTest : public test::CallTest {
|
| }
|
| };
|
|
|
| -TEST_F(RampUpTest, SingleStream) {
|
| - RampUpTester test(1, 0, 0, RtpExtension::kTimestampOffsetUri, false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, Simulcast) {
|
| - RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, SimulcastWithRtx) {
|
| - RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, SimulcastByRedWithRtx) {
|
| - RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, true);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, SingleStreamWithHighStartBitrate) {
|
| - RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
|
| - RtpExtension::kTimestampOffsetUri, false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| static const uint32_t kStartBitrateBps = 60000;
|
|
|
| -// Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
|
| -TEST_F(RampUpTest, DISABLED_UpDownUpOneStream) {
|
| - RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
|
| - false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, DISABLED_UpDownUpThreeStreams) {
|
| - RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
|
| - false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -// Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
|
| -TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamRtx) {
|
| - RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
|
| - true, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, UpDownUpThreeStreamsRtx) {
|
| - RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
|
| - true, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -// Disabled: https://bugs.chromium.org/p/webrtc/issues/detail?id=5576
|
| -TEST_F(RampUpTest, DISABLED_UpDownUpOneStreamByRedRtx) {
|
| - RampUpDownUpTester test(1, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
|
| - true, true);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, UpDownUpThreeStreamsByRedRtx) {
|
| +TEST_F(RampUpTest, UpDownUpAbsSendTimeSimulcastRedRtx) {
|
| RampUpDownUpTester test(3, 0, kStartBitrateBps, RtpExtension::kAbsSendTimeUri,
|
| true, true);
|
| RunBaseTest(&test);
|
| }
|
|
|
| -TEST_F(RampUpTest, SendSideVideoUpDownUpRtx) {
|
| +TEST_F(RampUpTest, UpDownUpTransportSequenceNumberRtx) {
|
| RampUpDownUpTester test(3, 0, kStartBitrateBps,
|
| RtpExtension::kTransportSequenceNumberUri, true,
|
| false);
|
| RunBaseTest(&test);
|
| }
|
|
|
| -// TODO(holmer): Enable when audio bitrates are included in the bitrate
|
| -// allocation.
|
| -TEST_F(RampUpTest, DISABLED_SendSideAudioVideoUpDownUpRtx) {
|
| +TEST_F(RampUpTest, UpDownUpAudioVideoTransportSequenceNumberRtx) {
|
| RampUpDownUpTester test(3, 1, kStartBitrateBps,
|
| RtpExtension::kTransportSequenceNumberUri, true,
|
| false);
|
| RunBaseTest(&test);
|
| }
|
|
|
| -TEST_F(RampUpTest, SendSideAudioOnlyUpDownUpRtx) {
|
| +TEST_F(RampUpTest, UpDownUpAudioTransportSequenceNumberRtx) {
|
| RampUpDownUpTester test(0, 1, kStartBitrateBps,
|
| RtpExtension::kTransportSequenceNumberUri, true,
|
| false);
|
| RunBaseTest(&test);
|
| }
|
|
|
| -TEST_F(RampUpTest, AbsSendTimeSingleStream) {
|
| - RampUpTester test(1, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, AbsSendTimeSimulcast) {
|
| - RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
|
| +TEST_F(RampUpTest, TOffsetSimulcastRedRtx) {
|
| + RampUpTester test(3, 0, 0, RtpExtension::kTimestampOffsetUri, true, true);
|
| RunBaseTest(&test);
|
| }
|
|
|
| -TEST_F(RampUpTest, AbsSendTimeSimulcastWithRtx) {
|
| - RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, true, false);
|
| +TEST_F(RampUpTest, AbsSendTime) {
|
| + RampUpTester test(1, 0, 0, RtpExtension::kAbsSendTimeUri, false, false);
|
| RunBaseTest(&test);
|
| }
|
|
|
| -TEST_F(RampUpTest, AbsSendTimeSimulcastByRedWithRtx) {
|
| +TEST_F(RampUpTest, AbsSendTimeSimulcastRedRtx) {
|
| RampUpTester test(3, 0, 0, RtpExtension::kAbsSendTimeUri, true, true);
|
| RunBaseTest(&test);
|
| }
|
|
|
| -TEST_F(RampUpTest, AbsSendTimeSingleStreamWithHighStartBitrate) {
|
| - RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
|
| - RtpExtension::kAbsSendTimeUri, false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, TransportSequenceNumberSingleStream) {
|
| +TEST_F(RampUpTest, TransportSequenceNumber) {
|
| RampUpTester test(1, 0, 0, RtpExtension::kTransportSequenceNumberUri, false,
|
| false);
|
| RunBaseTest(&test);
|
| @@ -618,27 +551,9 @@ TEST_F(RampUpTest, TransportSequenceNumberSimulcast) {
|
| RunBaseTest(&test);
|
| }
|
|
|
| -TEST_F(RampUpTest, TransportSequenceNumberSimulcastWithRtx) {
|
| - RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumberUri, true,
|
| - false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, AudioVideoTransportSequenceNumberSimulcastWithRtx) {
|
| - RampUpTester test(3, 1, 0, RtpExtension::kTransportSequenceNumberUri, true,
|
| - false);
|
| - RunBaseTest(&test);
|
| -}
|
| -
|
| -TEST_F(RampUpTest, TransportSequenceNumberSimulcastByRedWithRtx) {
|
| +TEST_F(RampUpTest, TransportSequenceNumberSimulcastRedRtx) {
|
| RampUpTester test(3, 0, 0, RtpExtension::kTransportSequenceNumberUri, true,
|
| true);
|
| RunBaseTest(&test);
|
| }
|
| -
|
| -TEST_F(RampUpTest, TransportSequenceNumberSingleStreamWithHighStartBitrate) {
|
| - RampUpTester test(1, 0, 0.9 * kSingleStreamTargetBps,
|
| - RtpExtension::kTransportSequenceNumberUri, false, false);
|
| - RunBaseTest(&test);
|
| -}
|
| } // namespace webrtc
|
|
|