Reland "Add documentation, tests and simplify webrtc::SimulatedNetwork."

This is a reland of commit c1d5fda22c8ae456950c5549d22d099b478c67e2

Original change's description:
> Add documentation, tests and simplify webrtc::SimulatedNetwork.
>
> This CL increases the test coverage for webrtc::SimualtedNetwork, adds
> some more comments to the class and the interface it implements and
> simplify the logic around capacity and delay management in the
> simulated network.
>
> More CLs will follow to continue the refactoring but this is the
> ground work to make this more modular in the future.
>
> Bug: webrtc:14525, b/243202138
> Change-Id: Ib0408cf6e2c1cdceb71f8bec3202d2960c5b4d3c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278042
> Reviewed-by: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38388}

Bug: webrtc:14525, b/243202138, b/256595485
Change-Id: Iaf8160eb8f8e29034b8f98e81ce07eb608663d30
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280963
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38557}
This commit is contained in:
Mirko Bonadei
2022-10-13 13:06:08 +00:00
committed by WebRTC LUCI CQ
parent 7a39964107
commit 248fdb16ba
8 changed files with 739 additions and 85 deletions

View File

@ -96,7 +96,10 @@ TEST(RemoteEstimateEndToEnd, AudioUsesAbsSendTimeExtension) {
// want to ignore those and we can do that on the basis that the first
// byte of RTP packets are guaranteed to not be 0.
RtpPacket rtp_packet(&extension_map);
if (rtp_packet.Parse(packet.data)) {
// TODO(bugs.webrtc.org/14525): Look why there are RTP packets with
// payload 72 or 73 (these don't have the RTP AbsoluteSendTime
// Extension).
if (rtp_packet.Parse(packet.data) && rtp_packet.PayloadType() == 111) {
EXPECT_TRUE(rtp_packet.HasExtension<AbsoluteSendTime>());
received_abs_send_time = true;
}