/* * Copyright 2020 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/ #include"test/gtest.h" #include"test/scenario/scenario.h"
// Wait until initial probing rampup is done and then set a low max bitrate.
s.RunFor(TimeDelta::Seconds(1));
EXPECT_GE(DataRate::BitsPerSec(caller->GetStats().send_bandwidth_bps),
5 * send_call_config.transport.rates.start_rate);
BitrateConstraints bitrate_config;
bitrate_config.max_bitrate_bps = kConstrainedRate.bps();
caller->UpdateBitrateConstraints(bitrate_config);
// Wait until the low send bitrate has taken effect, and then set a much // higher max bitrate.
s.RunFor(TimeDelta::Seconds(2));
EXPECT_LT(DataRate::BitsPerSec(caller->GetStats().send_bandwidth_bps),
kConstrainedRate * 1.1);
bitrate_config.max_bitrate_bps = 2 * kHighRate.bps();
caller->UpdateBitrateConstraints(bitrate_config);
// Check that the max send bitrate is reached quicker than would be possible // with simple AIMD rate control.
s.RunFor(TimeDelta::Seconds(1));
EXPECT_GE(DataRate::BitsPerSec(caller->GetStats().send_bandwidth_bps),
kHighRate);
}
// Only QVGA enabled initially. Run until initial probing is done and BWE // has settled.
video_stream->send()->UpdateActiveLayers({true, false, false});
s.RunFor(TimeDelta::Seconds(2));
// Remove network constraints and run for a while more, BWE should be much // less than required HD rate.
send_net->UpdateConfig([&](NetworkSimulationConfig* c) {
c->bandwidth = DataRate::PlusInfinity();
});
s.RunFor(TimeDelta::Seconds(2));
// Enable all layers, triggering a probe.
video_stream->send()->UpdateActiveLayers({true, true, true});
// Run for a short while and verify BWE has ramped up fast.
s.RunFor(TimeDelta::Seconds(2));
EXPECT_GT(DataRate::BitsPerSec(caller->GetStats().send_bandwidth_bps),
kHdRate);
}
} // namespace test
} // namespace webrtc
Messung V0.5
¤ Dauer der Verarbeitung: 0.19 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.