mediasoup 3.27.0 → 3.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/node/lib/Consumer.d.ts.map +1 -1
- package/node/lib/Consumer.js +4 -51
- package/node/lib/Producer.d.ts.map +1 -1
- package/node/lib/Producer.js +4 -8
- package/node/lib/ProducerTypes.d.ts +4 -2
- package/node/lib/ProducerTypes.d.ts.map +1 -1
- package/node/lib/Router.d.ts.map +1 -1
- package/node/lib/Router.js +4 -0
- package/node/lib/Transport.d.ts.map +1 -1
- package/node/lib/Transport.js +7 -10
- package/node/lib/fbs/rtp-parameters/rtp-header-extension-uri.d.ts +3 -4
- package/node/lib/fbs/rtp-parameters/rtp-header-extension-uri.d.ts.map +1 -1
- package/node/lib/fbs/rtp-parameters/rtp-header-extension-uri.js +3 -4
- package/node/lib/ortc.d.ts +0 -2
- package/node/lib/ortc.d.ts.map +1 -1
- package/node/lib/ortc.js +11 -21
- package/node/lib/rtpMappingFbsUtils.d.ts +6 -0
- package/node/lib/rtpMappingFbsUtils.d.ts.map +1 -0
- package/node/lib/rtpMappingFbsUtils.js +65 -0
- package/node/lib/rtpParametersFbsUtils.d.ts.map +1 -1
- package/node/lib/rtpParametersFbsUtils.js +0 -6
- package/node/lib/rtpParametersTypes.d.ts +1 -1
- package/node/lib/rtpParametersTypes.d.ts.map +1 -1
- package/node/lib/rtpStreamFbsUtils.d.ts +4 -0
- package/node/lib/rtpStreamFbsUtils.d.ts.map +1 -0
- package/node/lib/rtpStreamFbsUtils.js +51 -0
- package/node/lib/supportedRtpCapabilities.d.ts.map +1 -1
- package/node/lib/supportedRtpCapabilities.js +6 -13
- package/node/lib/test/test-Consumer.js +1 -13
- package/node/lib/test/test-DataConsumer.js +9 -0
- package/node/lib/test/test-DataProducer.js +38 -0
- package/node/lib/test/test-PipeTransport.js +27 -29
- package/node/lib/test/test-Producer.js +97 -0
- package/node/lib/test/test-ortc.js +34 -14
- package/package.json +10 -10
- package/worker/fbs/FBS/meson.build +25 -0
- package/worker/fbs/meson.build +15 -18
- package/worker/fbs/rtpParameters.fbs +0 -1
- package/worker/fuzzer/src/FuzzerUtils.cpp +5 -3
- package/worker/fuzzer/src/RTC/RTP/FuzzerPacket.cpp +16 -2
- package/worker/include/DepLibUV.hpp +13 -0
- package/worker/include/RTC/BWE/AlrDetector.hpp +97 -0
- package/worker/include/RTC/BWE/BitrateProber.hpp +217 -0
- package/worker/include/RTC/BWE/BitrateUtils.hpp +39 -0
- package/worker/include/RTC/BWE/BweTypes.hpp +171 -3
- package/worker/include/RTC/BWE/FeedbackAdapter.hpp +0 -14
- package/worker/include/RTC/BWE/InterArrival.hpp +117 -0
- package/worker/include/RTC/BWE/IntervalBudget.hpp +81 -0
- package/worker/include/RTC/BWE/LossBasedController.hpp +625 -0
- package/worker/include/RTC/BWE/OveruseDetector.hpp +71 -0
- package/worker/include/RTC/BWE/OveruseEstimator.hpp +115 -0
- package/worker/include/RTC/BWE/ProbeBitrateEstimator.hpp +84 -0
- package/worker/include/RTC/BWE/ProbeController.hpp +379 -0
- package/worker/include/RTC/BWE/ProbePacketGenerator.hpp +130 -0
- package/worker/include/RTC/BWE/ProbingScheduler.hpp +187 -0
- package/worker/include/RTC/BWE/RembGenerator.hpp +96 -0
- package/worker/include/RTC/BWE/RemoteBitrateEstimatorAbsSendTime.hpp +237 -0
- package/worker/include/RTC/BWE/RobustThroughputEstimator.hpp +26 -0
- package/worker/include/RTC/BWE/SendPacketHistory.hpp +161 -25
- package/worker/include/RTC/BWE/TargetRateController.hpp +306 -0
- package/worker/include/RTC/BWE/TransportWideCcFeedbackGenerator.hpp +146 -0
- package/worker/include/RTC/BWE/TrendlineEstimator.hpp +73 -16
- package/worker/include/RTC/Consts.hpp +70 -0
- package/worker/include/RTC/DataConsumer.hpp +3 -5
- package/worker/include/RTC/DirectTransport.hpp +4 -5
- package/worker/include/RTC/PipeTransport.hpp +4 -5
- package/worker/include/RTC/PlainTransport.hpp +4 -5
- package/worker/include/RTC/RTCP/FeedbackPsRemb.hpp +6 -7
- package/worker/include/RTC/RTCP/FeedbackRtpTransport.hpp +3 -1
- package/worker/include/RTC/RTP/Codecs/Tools.hpp +1 -1
- package/worker/include/RTC/RTP/HeaderExtensionIds.hpp +0 -1
- package/worker/include/RTC/RTP/Packet.hpp +16 -4
- package/worker/include/RTC/RTP/ProbationGenerator.hpp +0 -8
- package/worker/include/RTC/RTP/RtpStream.hpp +12 -9
- package/worker/include/RTC/RTP/RtpStreamRecv.hpp +22 -4
- package/worker/include/RTC/RTP/RtpStreamSend.hpp +4 -2
- package/worker/include/RTC/RTP/RtxStream.hpp +10 -4
- package/worker/include/RTC/RateCalculator.hpp +103 -24
- package/worker/include/RTC/RemoteCaptureTimeEstimator.hpp +33 -3
- package/worker/include/RTC/{RtcLogger.hpp → RtcLogger/RtpPacket.hpp} +5 -3
- package/worker/include/RTC/RtcLogger/SendBurst.hpp +88 -0
- package/worker/include/RTC/RtpDictionaries.hpp +3 -4
- package/worker/include/RTC/SCTP/association/Association.hpp +1 -1
- package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +36 -0
- package/worker/include/RTC/SCTP/public/AssociationMetrics.hpp +0 -1
- package/worker/include/RTC/SCTP/public/SctpTypes.hpp +9 -9
- package/worker/include/RTC/SCTP/rx/DataTracker.hpp +1 -1
- package/worker/include/RTC/SCTP/rx/ReassemblyQueue.hpp +11 -1
- package/worker/include/RTC/SctpDictionaries.hpp +2 -2
- package/worker/include/RTC/TcpConnection.hpp +2 -1
- package/worker/include/RTC/Transport.hpp +23 -8
- package/worker/include/RTC/TransportTuple.hpp +61 -6
- package/worker/include/RTC/WebRtcTransport.hpp +4 -5
- package/worker/include/Shared.hpp +5 -0
- package/worker/include/SharedInterface.hpp +10 -0
- package/worker/include/Utils.hpp +72 -3
- package/worker/include/common.hpp +12 -4
- package/worker/include/handles/SendCallbacks.hpp +34 -0
- package/worker/include/handles/TcpConnectionHandle.hpp +4 -12
- package/worker/include/handles/UdpSocketHandle.hpp +4 -8
- package/worker/meson.build +45 -1
- package/worker/meson_options.txt +1 -0
- package/worker/mocks/include/MockShared.hpp +16 -2
- package/worker/mocks/include/handles/MockBackoffTimerHandle.hpp +1 -1
- package/worker/scripts/package-lock.json +6 -6
- package/worker/src/RTC/BWE/AimdRateControl.cpp +4 -5
- package/worker/src/RTC/BWE/AlrDetector.cpp +80 -0
- package/worker/src/RTC/BWE/BitrateProber.cpp +256 -0
- package/worker/src/RTC/BWE/BitrateUtils.cpp +54 -0
- package/worker/src/RTC/BWE/DelayBasedBwe.cpp +2 -2
- package/worker/src/RTC/BWE/FeedbackAdapter.cpp +20 -37
- package/worker/src/RTC/BWE/InterArrival.cpp +216 -0
- package/worker/src/RTC/BWE/IntervalBudget.cpp +93 -0
- package/worker/src/RTC/BWE/LossBasedController.cpp +1194 -0
- package/worker/src/RTC/BWE/OveruseDetector.cpp +128 -0
- package/worker/src/RTC/BWE/OveruseEstimator.cpp +166 -0
- package/worker/src/RTC/BWE/ProbeBitrateEstimator.cpp +222 -0
- package/worker/src/RTC/BWE/ProbeController.cpp +645 -0
- package/worker/src/RTC/BWE/ProbePacketGenerator.cpp +140 -0
- package/worker/src/RTC/BWE/ProbingScheduler.cpp +196 -0
- package/worker/src/RTC/BWE/RembGenerator.cpp +169 -0
- package/worker/src/RTC/BWE/RemoteBitrateEstimatorAbsSendTime.cpp +497 -0
- package/worker/src/RTC/BWE/RobustThroughputEstimator.cpp +47 -0
- package/worker/src/RTC/BWE/SendPacketHistory.cpp +173 -50
- package/worker/src/RTC/BWE/TargetRateController.cpp +433 -0
- package/worker/src/RTC/BWE/TransportWideCcFeedbackGenerator.cpp +377 -0
- package/worker/src/RTC/BWE/TrendlineEstimator.cpp +102 -5
- package/worker/src/RTC/Consumer.cpp +7 -5
- package/worker/src/RTC/DataConsumer.cpp +8 -10
- package/worker/src/RTC/DirectTransport.cpp +14 -8
- package/worker/src/RTC/DtlsTransport.cpp +8 -8
- package/worker/src/RTC/ICE/IceCandidate.cpp +4 -4
- package/worker/src/RTC/ICE/IceServer.cpp +1 -1
- package/worker/src/RTC/PipeTransport.cpp +13 -8
- package/worker/src/RTC/PlainTransport.cpp +13 -8
- package/worker/src/RTC/Producer.cpp +14 -31
- package/worker/src/RTC/RTCP/Bye.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +18 -0
- package/worker/src/RTC/RTCP/FeedbackPsRpsi.cpp +2 -2
- package/worker/src/RTC/RTCP/FeedbackPsVbcm.cpp +2 -1
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +2 -2
- package/worker/src/RTC/RTCP/Sdes.cpp +1 -1
- package/worker/src/RTC/RTP/Codecs/DependencyDescriptor.cpp +2 -1
- package/worker/src/RTC/RTP/Packet.cpp +26 -11
- package/worker/src/RTC/RTP/ProbationGenerator.cpp +5 -6
- package/worker/src/RTC/RTP/RtpStream.cpp +1 -1
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +69 -48
- package/worker/src/RTC/RTP/RtpStreamSend.cpp +31 -31
- package/worker/src/RTC/RTP/RtxStream.cpp +22 -7
- package/worker/src/RTC/RateCalculator.cpp +133 -28
- package/worker/src/RTC/RemoteCaptureTimeEstimator.cpp +56 -1
- package/worker/src/RTC/{RtcLogger.cpp → RtcLogger/RtpPacket.cpp} +2 -2
- package/worker/src/RTC/RtcLogger/SendBurst.cpp +124 -0
- package/worker/src/RTC/RtpDictionaries/RtpHeaderExtensionUri.cpp +2 -12
- package/worker/src/RTC/RtpDictionaries/RtpParameters.cpp +1 -1
- package/worker/src/RTC/SCTP/association/Association.cpp +16 -2
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +106 -1
- package/worker/src/RTC/SCTP/public/AssociationMetrics.cpp +1 -1
- package/worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp +3 -3
- package/worker/src/RTC/SCTP/rx/ReassemblyQueue.cpp +2 -1
- package/worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp +4 -4
- package/worker/src/RTC/SCTP/tx/RetransmissionTimeout.cpp +4 -4
- package/worker/src/RTC/SctpDictionaries/SctpStreamParameters.cpp +6 -10
- package/worker/src/RTC/SimulcastProducerStreamManager.cpp +2 -2
- package/worker/src/RTC/SrtpSession.cpp +2 -2
- package/worker/src/RTC/SvcProducerStreamManager.cpp +2 -2
- package/worker/src/RTC/TcpConnection.cpp +2 -2
- package/worker/src/RTC/Transport.cpp +112 -75
- package/worker/src/RTC/TransportTuple.cpp +4 -4
- package/worker/src/RTC/WebRtcServer.cpp +4 -3
- package/worker/src/RTC/WebRtcTransport.cpp +20 -13
- package/worker/src/Utils/BitStream.cpp +24 -0
- package/worker/src/handles/BackoffTimerHandle.cpp +1 -1
- package/worker/src/handles/TcpConnectionHandle.cpp +13 -23
- package/worker/src/handles/UdpSocketHandle.cpp +14 -21
- package/worker/tasks.py +43 -18
- package/worker/test/include/RTC/BWE/helpers/LinkSimulator.hpp +68 -14
- package/worker/test/include/RTC/BWE/helpers/RemoteBitrateEstimatorAbsSendTimeTestHelper.hpp +125 -0
- package/worker/test/src/RTC/BWE/TestAlrDetector.cpp +110 -0
- package/worker/test/src/RTC/BWE/TestBitrateProber.cpp +418 -0
- package/worker/test/src/RTC/BWE/TestBitrateUtils.cpp +61 -0
- package/worker/test/src/RTC/BWE/TestDelayBasedBwe.cpp +4 -4
- package/worker/test/src/RTC/BWE/TestFeedbackAdapter.cpp +53 -37
- package/worker/test/src/RTC/BWE/TestInterArrival.cpp +643 -0
- package/worker/test/src/RTC/BWE/TestIntervalBudget.cpp +130 -0
- package/worker/test/src/RTC/BWE/TestLossBasedController.cpp +1199 -0
- package/worker/test/src/RTC/BWE/TestOveruseDetector.cpp +519 -0
- package/worker/test/src/RTC/BWE/TestProbeBitrateEstimator.cpp +266 -0
- package/worker/test/src/RTC/BWE/TestProbeController.cpp +1682 -0
- package/worker/test/src/RTC/BWE/TestProbePacketGenerator.cpp +265 -0
- package/worker/test/src/RTC/BWE/TestProbingScheduler.cpp +260 -0
- package/worker/test/src/RTC/BWE/TestRembGenerator.cpp +285 -0
- package/worker/test/src/RTC/BWE/TestRemoteBitrateEstimatorAbsSendTime.cpp +414 -0
- package/worker/test/src/RTC/BWE/TestSendPacketHistory.cpp +296 -77
- package/worker/test/src/RTC/BWE/TestTargetRateController.cpp +337 -0
- package/worker/test/src/RTC/BWE/TestTransportWideCcFeedbackGenerator.cpp +578 -0
- package/worker/test/src/RTC/BWE/TestTrendlineEstimator.cpp +45 -0
- package/worker/test/src/RTC/BWE/helpers/LinkSimulator.cpp +133 -29
- package/worker/test/src/RTC/BWE/helpers/RemoteBitrateEstimatorAbsSendTimeTestHelper.cpp +625 -0
- package/worker/test/src/RTC/RTCP/TestFeedbackPsRemb.cpp +19 -0
- package/worker/test/src/RTC/RTP/TestPacket.cpp +58 -4
- package/worker/test/src/RTC/RTP/TestProbationGenerator.cpp +3 -2
- package/worker/test/src/RTC/RTP/TestRtpStreamRecv.cpp +50 -0
- package/worker/test/src/RTC/RTP/TestRtpStreamSend.cpp +59 -0
- package/worker/test/src/RTC/SCTP/association/TestStreamResetHandler.cpp +111 -0
- package/worker/test/src/RTC/TestRateCalculator.cpp +322 -60
- package/worker/test/src/RTC/TestRemoteCaptureTimeEstimator.cpp +95 -7
- package/worker/test/src/RTC/TestSimpleProducerStreamManager.cpp +34 -16
- package/worker/test/src/RTC/TestSimulcastProducerStreamManager.cpp +31 -13
- package/worker/test/src/RTC/TestSvcProducerStreamManager.cpp +37 -19
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +10 -10
- package/worker/test/src/Utils/TestTime.cpp +120 -21
|
@@ -10,49 +10,105 @@ SCENARIO("BWE SendPacketHistory", "[bwe][sendpackethistory]")
|
|
|
10
10
|
constexpr size_t PacketSize{ 1000 };
|
|
11
11
|
constexpr uint32_t Ssrc{ 1111 };
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// Take note of a packet without it having left yet.
|
|
14
|
+
const auto addPacket = [](
|
|
15
|
+
RTC::BWE::SendPacketHistory& sendPacketHistory,
|
|
16
|
+
uint16_t seq,
|
|
17
|
+
size_t size,
|
|
18
|
+
int64_t createdAtUs) -> int64_t
|
|
19
|
+
{
|
|
20
|
+
return sendPacketHistory.AddPacket(
|
|
21
|
+
{ .ssrc = Ssrc, .seq = seq, .size = size, .createdAtUs = createdAtUs });
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Take note of a packet and of it having left right away, which is what most
|
|
25
|
+
// cases need.
|
|
26
|
+
const auto sendPacket =
|
|
27
|
+
[&addPacket](
|
|
28
|
+
RTC::BWE::SendPacketHistory& sendPacketHistory, uint16_t seq, size_t size, int64_t atUs) -> int64_t
|
|
29
|
+
{
|
|
30
|
+
const int64_t sequenceNumber = addPacket(sendPacketHistory, seq, size, atUs);
|
|
31
|
+
|
|
32
|
+
sendPacketHistory.ProcessSentPacket(sequenceNumber, atUs);
|
|
33
|
+
|
|
34
|
+
return sequenceNumber;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
SECTION("a packet is retrieved as it was sent")
|
|
14
38
|
{
|
|
15
39
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
const int64_t sequenceNumber = sendPacketHistory.AddPacket(
|
|
42
|
+
{ .ssrc = Ssrc, .seq = 100, .size = PacketSize, .isAudio = true, .createdAtUs = InitialTimeUs });
|
|
43
|
+
|
|
44
|
+
REQUIRE(sequenceNumber == 0);
|
|
45
|
+
|
|
46
|
+
sendPacketHistory.ProcessSentPacket(sequenceNumber, InitialTimeUs + 500);
|
|
18
47
|
|
|
19
|
-
|
|
20
|
-
REQUIRE(sendPacketHistory.GetLastSequenceNumber() == 0);
|
|
48
|
+
const auto retrievedEntry = sendPacketHistory.RetrievePacket(0, true);
|
|
21
49
|
|
|
22
|
-
REQUIRE(
|
|
23
|
-
REQUIRE(sendPacketHistory.GetLastSequenceNumber() == 1);
|
|
50
|
+
REQUIRE(retrievedEntry.has_value());
|
|
24
51
|
|
|
25
|
-
|
|
26
|
-
|
|
52
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
53
|
+
const auto& entry = retrievedEntry.value();
|
|
54
|
+
|
|
55
|
+
REQUIRE(entry.ssrc == Ssrc);
|
|
56
|
+
REQUIRE(entry.seq == 100);
|
|
57
|
+
REQUIRE(entry.createdAtUs == InitialTimeUs);
|
|
58
|
+
REQUIRE(entry.sentPacket.sequenceNumber == 0);
|
|
59
|
+
REQUIRE(entry.sentPacket.size == PacketSize);
|
|
60
|
+
REQUIRE(entry.sentPacket.isAudio == true);
|
|
61
|
+
// The send time is the one it left at, not the one it was taken note of.
|
|
62
|
+
REQUIRE(entry.sentPacket.sendTimeUs == InitialTimeUs + 500);
|
|
27
63
|
}
|
|
28
64
|
|
|
29
|
-
SECTION("a packet
|
|
65
|
+
SECTION("the burst a packet belongs to survives the history")
|
|
30
66
|
{
|
|
31
67
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
32
68
|
|
|
33
|
-
const
|
|
34
|
-
|
|
69
|
+
const RTC::BWE::Types::ProbeCluster probeCluster{ .id = 7, .minProbes = 5, .minBytes = 4000 };
|
|
70
|
+
|
|
71
|
+
const int64_t sequenceNumber = sendPacketHistory.AddPacket(
|
|
72
|
+
{ .ssrc = Ssrc,
|
|
73
|
+
.seq = 100,
|
|
74
|
+
.size = PacketSize,
|
|
75
|
+
.probeCluster = probeCluster,
|
|
76
|
+
.createdAtUs = InitialTimeUs });
|
|
77
|
+
|
|
78
|
+
sendPacketHistory.ProcessSentPacket(sequenceNumber, InitialTimeUs);
|
|
35
79
|
|
|
36
|
-
const auto
|
|
80
|
+
const auto retrievedEntry = sendPacketHistory.RetrievePacket(0, true);
|
|
37
81
|
|
|
38
|
-
REQUIRE(
|
|
82
|
+
REQUIRE(retrievedEntry.has_value());
|
|
39
83
|
|
|
40
84
|
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
41
|
-
const auto&
|
|
85
|
+
const auto& retrievedProbeCluster = retrievedEntry.value().sentPacket.probeCluster;
|
|
86
|
+
|
|
87
|
+
REQUIRE(retrievedProbeCluster.has_value());
|
|
88
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
89
|
+
REQUIRE(retrievedProbeCluster.value().id == 7);
|
|
90
|
+
}
|
|
42
91
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
92
|
+
SECTION("a packet that never left is not resolved")
|
|
93
|
+
{
|
|
94
|
+
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
95
|
+
|
|
96
|
+
addPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
97
|
+
|
|
98
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true) == std::nullopt);
|
|
99
|
+
|
|
100
|
+
sendPacketHistory.ProcessSentPacket(0, InitialTimeUs);
|
|
101
|
+
|
|
102
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true).has_value());
|
|
47
103
|
}
|
|
48
104
|
|
|
49
|
-
SECTION("a sequence number that was never
|
|
105
|
+
SECTION("a sequence number that was never taken note of is not resolved")
|
|
50
106
|
{
|
|
51
107
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
52
108
|
|
|
53
109
|
REQUIRE(sendPacketHistory.RetrievePacket(0, true) == std::nullopt);
|
|
54
110
|
|
|
55
|
-
sendPacketHistory
|
|
111
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
56
112
|
|
|
57
113
|
REQUIRE(sendPacketHistory.RetrievePacket(-1, true) == std::nullopt);
|
|
58
114
|
REQUIRE(sendPacketHistory.RetrievePacket(1, true) == std::nullopt);
|
|
@@ -63,89 +119,164 @@ SCENARIO("BWE SendPacketHistory", "[bwe][sendpackethistory]")
|
|
|
63
119
|
{
|
|
64
120
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
65
121
|
|
|
66
|
-
|
|
67
|
-
sendPacketHistory.AddPacket(Ssrc, 100, PacketSize, false, InitialTimeUs);
|
|
122
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
68
123
|
|
|
69
|
-
REQUIRE(sendPacketHistory.RetrievePacket(
|
|
70
|
-
REQUIRE(sendPacketHistory.RetrievePacket(
|
|
124
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true).has_value());
|
|
125
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true) == std::nullopt);
|
|
71
126
|
}
|
|
72
127
|
|
|
73
128
|
SECTION("a packet reported as lost is kept, since it may be reported as received later")
|
|
74
129
|
{
|
|
75
130
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
76
131
|
|
|
77
|
-
|
|
78
|
-
sendPacketHistory.AddPacket(Ssrc, 100, PacketSize, false, InitialTimeUs);
|
|
132
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
79
133
|
|
|
80
|
-
REQUIRE(sendPacketHistory.RetrievePacket(
|
|
81
|
-
REQUIRE(sendPacketHistory.RetrievePacket(
|
|
82
|
-
REQUIRE(sendPacketHistory.RetrievePacket(
|
|
83
|
-
REQUIRE(sendPacketHistory.RetrievePacket(
|
|
134
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, false).has_value());
|
|
135
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, false).has_value());
|
|
136
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true).has_value());
|
|
137
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true) == std::nullopt);
|
|
84
138
|
}
|
|
85
139
|
|
|
86
|
-
SECTION("a
|
|
140
|
+
SECTION("the first report of a loss is told apart from the same loss reported again")
|
|
87
141
|
{
|
|
88
142
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
89
143
|
|
|
90
|
-
|
|
91
|
-
sendPacketHistory.AddPacket(Ssrc, 100, PacketSize, false, InitialTimeUs);
|
|
144
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
92
145
|
|
|
93
|
-
sendPacketHistory.
|
|
146
|
+
const auto firstReport = sendPacketHistory.RetrievePacket(0, false);
|
|
147
|
+
|
|
148
|
+
REQUIRE(firstReport.has_value());
|
|
149
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
150
|
+
REQUIRE(firstReport.value().previouslyReportedLost == false);
|
|
94
151
|
|
|
95
|
-
const auto
|
|
152
|
+
const auto secondReport = sendPacketHistory.RetrievePacket(0, false);
|
|
96
153
|
|
|
97
|
-
REQUIRE(
|
|
154
|
+
REQUIRE(secondReport.has_value());
|
|
98
155
|
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
99
|
-
REQUIRE(
|
|
156
|
+
REQUIRE(secondReport.value().previouslyReportedLost == true);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
SECTION("a packet is resolved by its SSRC and RTP sequence number too")
|
|
160
|
+
{
|
|
161
|
+
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
162
|
+
|
|
163
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
164
|
+
sendPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + 10000);
|
|
165
|
+
|
|
166
|
+
const auto retrievedEntry = sendPacketHistory.RetrievePacket(Ssrc, 100, true);
|
|
167
|
+
|
|
168
|
+
REQUIRE(retrievedEntry.has_value());
|
|
169
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
170
|
+
REQUIRE(retrievedEntry.value().sentPacket.sequenceNumber == 0);
|
|
100
171
|
|
|
101
172
|
// The very same RTP sequence number of another stream is another packet.
|
|
102
173
|
REQUIRE(sendPacketHistory.RetrievePacket(Ssrc + 1, 101, true) == std::nullopt);
|
|
103
174
|
}
|
|
104
175
|
|
|
105
|
-
SECTION("the
|
|
176
|
+
SECTION("the first send of a repeated SSRC and RTP sequence number keeps the mapping")
|
|
106
177
|
{
|
|
107
178
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
108
179
|
|
|
109
|
-
sendPacketHistory
|
|
180
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
181
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs + 10000);
|
|
110
182
|
|
|
111
|
-
const
|
|
112
|
-
sendPacketHistory.AddPacket(Ssrc, 100, PacketSize, false, InitialTimeUs + 10000);
|
|
183
|
+
const auto retrievedEntry = sendPacketHistory.RetrievePacket(Ssrc, 100, true);
|
|
113
184
|
|
|
114
|
-
|
|
185
|
+
REQUIRE(retrievedEntry.has_value());
|
|
186
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
187
|
+
REQUIRE(retrievedEntry.value().sentPacket.sequenceNumber == 0);
|
|
188
|
+
}
|
|
115
189
|
|
|
116
|
-
|
|
190
|
+
SECTION("both sends of a repeated SSRC and RTP sequence number have an ambiguous arrival time")
|
|
191
|
+
{
|
|
192
|
+
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
193
|
+
|
|
194
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
195
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs + 10000);
|
|
196
|
+
|
|
197
|
+
const auto firstEntry = sendPacketHistory.RetrievePacket(0, true);
|
|
198
|
+
|
|
199
|
+
REQUIRE(firstEntry.has_value());
|
|
117
200
|
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
118
|
-
REQUIRE(
|
|
201
|
+
REQUIRE(firstEntry.value().ambiguousReceiveTime == true);
|
|
202
|
+
|
|
203
|
+
const auto secondEntry = sendPacketHistory.RetrievePacket(1, true);
|
|
204
|
+
|
|
205
|
+
REQUIRE(secondEntry.has_value());
|
|
206
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
207
|
+
REQUIRE(secondEntry.value().ambiguousReceiveTime == true);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
SECTION("a retransmission without RTX is ambiguous although the packet it repeats is gone")
|
|
211
|
+
{
|
|
212
|
+
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
213
|
+
|
|
214
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
215
|
+
|
|
216
|
+
// Reported as received, so it's not held anymore.
|
|
217
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true).has_value());
|
|
218
|
+
|
|
219
|
+
// Retransmitted reusing the very same SSRC and RTP sequence number.
|
|
220
|
+
const int64_t sequenceNumber = sendPacketHistory.AddPacket(
|
|
221
|
+
{ .ssrc = Ssrc,
|
|
222
|
+
.seq = 100,
|
|
223
|
+
.size = PacketSize,
|
|
224
|
+
.isRetransmission = true,
|
|
225
|
+
.originalSsrc = Ssrc,
|
|
226
|
+
.createdAtUs = InitialTimeUs + 10000 });
|
|
227
|
+
|
|
228
|
+
sendPacketHistory.ProcessSentPacket(sequenceNumber, InitialTimeUs + 10000);
|
|
229
|
+
|
|
230
|
+
const auto retrievedEntry = sendPacketHistory.RetrievePacket(1, true);
|
|
231
|
+
|
|
232
|
+
REQUIRE(retrievedEntry.has_value());
|
|
233
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
234
|
+
REQUIRE(retrievedEntry.value().ambiguousReceiveTime == true);
|
|
119
235
|
}
|
|
120
236
|
|
|
121
|
-
SECTION("
|
|
237
|
+
SECTION("a retransmission over RTX is not ambiguous, since it goes under its own SSRC")
|
|
122
238
|
{
|
|
123
239
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
124
240
|
|
|
125
|
-
|
|
126
|
-
|
|
241
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
242
|
+
|
|
243
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true).has_value());
|
|
127
244
|
|
|
128
|
-
|
|
129
|
-
|
|
245
|
+
// Retransmitted over RTX, so under another SSRC and sequence number.
|
|
246
|
+
const int64_t sequenceNumber = sendPacketHistory.AddPacket(
|
|
247
|
+
{ .ssrc = Ssrc + 1,
|
|
248
|
+
.seq = 7,
|
|
249
|
+
.size = PacketSize,
|
|
250
|
+
.isRetransmission = true,
|
|
251
|
+
.originalSsrc = Ssrc,
|
|
252
|
+
.createdAtUs = InitialTimeUs + 10000 });
|
|
130
253
|
|
|
131
|
-
|
|
254
|
+
sendPacketHistory.ProcessSentPacket(sequenceNumber, InitialTimeUs + 10000);
|
|
132
255
|
|
|
133
|
-
const auto
|
|
256
|
+
const auto retrievedEntry = sendPacketHistory.RetrievePacket(1, true);
|
|
134
257
|
|
|
135
|
-
REQUIRE(
|
|
258
|
+
REQUIRE(retrievedEntry.has_value());
|
|
136
259
|
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
137
|
-
REQUIRE(
|
|
260
|
+
REQUIRE(retrievedEntry.value().ambiguousReceiveTime == false);
|
|
138
261
|
}
|
|
139
262
|
|
|
140
|
-
SECTION("bytes in flight are those of the packets no feedback has reported on")
|
|
263
|
+
SECTION("bytes in flight are those of the packets that left and no feedback has reported on")
|
|
141
264
|
{
|
|
142
265
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
143
266
|
|
|
144
267
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 0);
|
|
145
268
|
|
|
146
|
-
|
|
147
|
-
sendPacketHistory
|
|
148
|
-
|
|
269
|
+
// Taking note of a packet is not yet sending it.
|
|
270
|
+
addPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
271
|
+
|
|
272
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 0);
|
|
273
|
+
|
|
274
|
+
sendPacketHistory.ProcessSentPacket(0, InitialTimeUs);
|
|
275
|
+
|
|
276
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == PacketSize);
|
|
277
|
+
|
|
278
|
+
sendPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + 10000);
|
|
279
|
+
sendPacket(sendPacketHistory, 102, PacketSize, InitialTimeUs + 20000);
|
|
149
280
|
|
|
150
281
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 3 * PacketSize);
|
|
151
282
|
|
|
@@ -159,31 +290,87 @@ SCENARIO("BWE SendPacketHistory", "[bwe][sendpackethistory]")
|
|
|
159
290
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 0);
|
|
160
291
|
}
|
|
161
292
|
|
|
162
|
-
SECTION("a packet
|
|
293
|
+
SECTION("a packet that leaves twice does not count its bytes twice")
|
|
163
294
|
{
|
|
164
295
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
165
296
|
|
|
166
|
-
sendPacketHistory
|
|
167
|
-
sendPacketHistory.AddPacket(Ssrc, 101, 300, false, InitialTimeUs + 10000);
|
|
297
|
+
addPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
168
298
|
|
|
169
|
-
|
|
299
|
+
REQUIRE(sendPacketHistory.ProcessSentPacket(0, InitialTimeUs).has_value());
|
|
300
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == PacketSize);
|
|
301
|
+
|
|
302
|
+
REQUIRE(sendPacketHistory.ProcessSentPacket(0, InitialTimeUs + 1000) == std::nullopt);
|
|
303
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == PacketSize);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
SECTION("a packet is told the bytes that were in flight when it left")
|
|
307
|
+
{
|
|
308
|
+
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
309
|
+
|
|
310
|
+
addPacket(sendPacketHistory, 100, 200, InitialTimeUs);
|
|
311
|
+
|
|
312
|
+
const auto firstSentPacket = sendPacketHistory.ProcessSentPacket(0, InitialTimeUs);
|
|
170
313
|
|
|
171
314
|
REQUIRE(firstSentPacket.has_value());
|
|
172
315
|
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
173
|
-
REQUIRE(firstSentPacket
|
|
316
|
+
REQUIRE(firstSentPacket.value().sequenceNumber == 0);
|
|
317
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
318
|
+
REQUIRE(firstSentPacket.value().dataInFlight == 200);
|
|
319
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 200);
|
|
174
320
|
|
|
175
|
-
|
|
321
|
+
addPacket(sendPacketHistory, 101, 300, InitialTimeUs + 10000);
|
|
322
|
+
|
|
323
|
+
const auto secondSentPacket = sendPacketHistory.ProcessSentPacket(1, InitialTimeUs + 10000);
|
|
176
324
|
|
|
177
325
|
REQUIRE(secondSentPacket.has_value());
|
|
178
326
|
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
179
|
-
REQUIRE(secondSentPacket
|
|
327
|
+
REQUIRE(secondSentPacket.value().dataInFlight == 500);
|
|
328
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 500);
|
|
329
|
+
|
|
330
|
+
// And it's what a feedback resolves it into as well.
|
|
331
|
+
const auto firstEntry = sendPacketHistory.RetrievePacket(0, false);
|
|
332
|
+
|
|
333
|
+
REQUIRE(firstEntry.has_value());
|
|
334
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
335
|
+
REQUIRE(firstEntry.value().sentPacket.dataInFlight == 200);
|
|
336
|
+
|
|
337
|
+
const auto secondEntry = sendPacketHistory.RetrievePacket(1, false);
|
|
338
|
+
|
|
339
|
+
REQUIRE(secondEntry.has_value());
|
|
340
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
341
|
+
REQUIRE(secondEntry.value().sentPacket.dataInFlight == 500);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
SECTION("bytes that left untracked are attributed to the next packet that leaves")
|
|
345
|
+
{
|
|
346
|
+
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
347
|
+
|
|
348
|
+
sendPacketHistory.ProcessSentUntrackedPacket(400, InitialTimeUs);
|
|
349
|
+
sendPacketHistory.ProcessSentUntrackedPacket(600, InitialTimeUs + 1000);
|
|
350
|
+
|
|
351
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs + 2000);
|
|
352
|
+
|
|
353
|
+
const auto firstEntry = sendPacketHistory.RetrievePacket(0, false);
|
|
354
|
+
|
|
355
|
+
REQUIRE(firstEntry.has_value());
|
|
356
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
357
|
+
REQUIRE(firstEntry.value().sentPacket.priorUnackedData == 1000);
|
|
358
|
+
|
|
359
|
+
// They are attributed once, not to every packet that follows.
|
|
360
|
+
sendPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + 3000);
|
|
361
|
+
|
|
362
|
+
const auto secondEntry = sendPacketHistory.RetrievePacket(1, false);
|
|
363
|
+
|
|
364
|
+
REQUIRE(secondEntry.has_value());
|
|
365
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
366
|
+
REQUIRE(secondEntry.value().sentPacket.priorUnackedData == 0);
|
|
180
367
|
}
|
|
181
368
|
|
|
182
369
|
SECTION("a packet reported as lost stops counting as in flight")
|
|
183
370
|
{
|
|
184
371
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
185
372
|
|
|
186
|
-
sendPacketHistory
|
|
373
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
187
374
|
|
|
188
375
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == PacketSize);
|
|
189
376
|
|
|
@@ -201,9 +388,9 @@ SCENARIO("BWE SendPacketHistory", "[bwe][sendpackethistory]")
|
|
|
201
388
|
{
|
|
202
389
|
RTC::BWE::SendPacketHistory sendPacketHistory;
|
|
203
390
|
|
|
204
|
-
sendPacketHistory
|
|
205
|
-
sendPacketHistory
|
|
206
|
-
sendPacketHistory
|
|
391
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
392
|
+
sendPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + 10000);
|
|
393
|
+
sendPacket(sendPacketHistory, 102, PacketSize, InitialTimeUs + 20000);
|
|
207
394
|
|
|
208
395
|
sendPacketHistory.RetrievePacket(2, true);
|
|
209
396
|
|
|
@@ -221,22 +408,39 @@ SCENARIO("BWE SendPacketHistory", "[bwe][sendpackethistory]")
|
|
|
221
408
|
|
|
222
409
|
RTC::BWE::SendPacketHistory sendPacketHistory({ .windowDurationUs = WindowDurationUs });
|
|
223
410
|
|
|
224
|
-
|
|
225
|
-
sendPacketHistory.AddPacket(Ssrc, 100, PacketSize, false, InitialTimeUs);
|
|
411
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
226
412
|
|
|
227
413
|
// Right at the window it's still held.
|
|
228
|
-
sendPacketHistory
|
|
414
|
+
sendPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + WindowDurationUs);
|
|
229
415
|
|
|
230
416
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 2 * PacketSize);
|
|
231
417
|
|
|
232
|
-
sendPacketHistory
|
|
418
|
+
sendPacket(sendPacketHistory, 102, PacketSize, InitialTimeUs + WindowDurationUs + 1);
|
|
233
419
|
|
|
234
|
-
REQUIRE(sendPacketHistory.RetrievePacket(
|
|
420
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true) == std::nullopt);
|
|
235
421
|
REQUIRE(sendPacketHistory.RetrievePacket(Ssrc, 100, true) == std::nullopt);
|
|
236
422
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 2 * PacketSize);
|
|
237
423
|
|
|
238
|
-
//
|
|
239
|
-
|
|
424
|
+
// Dropping a packet doesn't make the history forget how far the numbers got,
|
|
425
|
+
// so one beyond them is still refused.
|
|
426
|
+
REQUIRE(sendPacketHistory.RetrievePacket(3, true) == std::nullopt);
|
|
427
|
+
REQUIRE(sendPacketHistory.RetrievePacket(2, true).has_value());
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
SECTION("the window counts from when a packet was taken note of, not from when it left")
|
|
431
|
+
{
|
|
432
|
+
constexpr int64_t WindowDurationUs{ 1000000 };
|
|
433
|
+
|
|
434
|
+
RTC::BWE::SendPacketHistory sendPacketHistory({ .windowDurationUs = WindowDurationUs });
|
|
435
|
+
|
|
436
|
+
addPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
437
|
+
|
|
438
|
+
// It took the whole window to leave, which doesn't buy it any more time.
|
|
439
|
+
sendPacketHistory.ProcessSentPacket(0, InitialTimeUs + WindowDurationUs);
|
|
440
|
+
|
|
441
|
+
addPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + WindowDurationUs + 1);
|
|
442
|
+
|
|
443
|
+
REQUIRE(sendPacketHistory.RetrievePacket(0, true) == std::nullopt);
|
|
240
444
|
}
|
|
241
445
|
|
|
242
446
|
SECTION("the window does not take out the bytes of a packet already reported on")
|
|
@@ -245,14 +449,29 @@ SCENARIO("BWE SendPacketHistory", "[bwe][sendpackethistory]")
|
|
|
245
449
|
|
|
246
450
|
RTC::BWE::SendPacketHistory sendPacketHistory({ .windowDurationUs = WindowDurationUs });
|
|
247
451
|
|
|
248
|
-
sendPacketHistory
|
|
452
|
+
sendPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
249
453
|
|
|
250
454
|
// Reported as lost, so its bytes are gone but it's still held.
|
|
251
455
|
sendPacketHistory.RetrievePacket(0, false);
|
|
252
456
|
|
|
253
457
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 0);
|
|
254
458
|
|
|
255
|
-
sendPacketHistory
|
|
459
|
+
sendPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + WindowDurationUs + 1);
|
|
460
|
+
|
|
461
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == PacketSize);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
SECTION("the window does not take out the bytes of a packet that never left")
|
|
465
|
+
{
|
|
466
|
+
constexpr int64_t WindowDurationUs{ 1000000 };
|
|
467
|
+
|
|
468
|
+
RTC::BWE::SendPacketHistory sendPacketHistory({ .windowDurationUs = WindowDurationUs });
|
|
469
|
+
|
|
470
|
+
addPacket(sendPacketHistory, 100, PacketSize, InitialTimeUs);
|
|
471
|
+
|
|
472
|
+
REQUIRE(sendPacketHistory.GetOutstandingBytes() == 0);
|
|
473
|
+
|
|
474
|
+
sendPacket(sendPacketHistory, 101, PacketSize, InitialTimeUs + WindowDurationUs + 1);
|
|
256
475
|
|
|
257
476
|
REQUIRE(sendPacketHistory.GetOutstandingBytes() == PacketSize);
|
|
258
477
|
}
|