mediasoup 3.24.2 → 3.25.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 +12 -0
- package/node/lib/Transport.d.ts.map +1 -1
- package/node/lib/Transport.js +7 -0
- package/node/lib/ortc.d.ts.map +1 -1
- package/node/lib/ortc.js +10 -0
- package/node/lib/test/test-PipeTransport.js +35 -30
- package/package.json +1 -1
- package/worker/include/DepLibUV.hpp +33 -4
- package/worker/include/RTC/Consumer.hpp +4 -1
- package/worker/include/RTC/Producer.hpp +34 -5
- package/worker/include/RTC/RTCP/Packet.hpp +7 -1
- package/worker/include/RTC/RTP/Packet.hpp +18 -0
- package/worker/include/RTC/RTP/RtpStream.hpp +76 -14
- package/worker/include/RTC/RTP/RtpStreamRecv.hpp +191 -7
- package/worker/include/RTC/RTP/RtpStreamSend.hpp +56 -10
- package/worker/include/RTC/RTP/RtxStream.hpp +34 -2
- package/worker/include/RTC/RemoteCaptureTimeEstimator.hpp +92 -0
- package/worker/include/RTC/RemoteClockOffsetEstimator.hpp +87 -0
- package/worker/include/RTC/Router.hpp +2 -5
- package/worker/include/RTC/SimulcastProducerStreamManager.hpp +3 -0
- package/worker/include/RTC/Transport.hpp +15 -7
- package/worker/include/Shared.hpp +5 -0
- package/worker/include/SharedInterface.hpp +6 -0
- package/worker/include/Utils.hpp +44 -3
- package/worker/meson.build +4 -0
- package/worker/mocks/include/MockShared.hpp +7 -0
- package/worker/src/DepLibUV.cpp +17 -0
- package/worker/src/RTC/Consumer.cpp +8 -5
- package/worker/src/RTC/Producer.cpp +85 -16
- package/worker/src/RTC/RTP/Packet.cpp +9 -1
- package/worker/src/RTC/RTP/RtpStream.cpp +14 -10
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +150 -23
- package/worker/src/RTC/RTP/RtpStreamSend.cpp +34 -19
- package/worker/src/RTC/RTP/RtxStream.cpp +12 -6
- package/worker/src/RTC/RemoteCaptureTimeEstimator.cpp +77 -0
- package/worker/src/RTC/RemoteClockOffsetEstimator.cpp +106 -0
- package/worker/src/RTC/Router.cpp +10 -8
- package/worker/src/RTC/RtpDictionaries/RtcpParameters.cpp +13 -3
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +6 -2
- package/worker/src/RTC/SimulcastProducerStreamManager.cpp +82 -40
- package/worker/src/RTC/Transport.cpp +96 -4
- package/worker/test/src/RTC/RTP/TestPacket.cpp +6 -0
- package/worker/test/src/RTC/RTP/TestRtpStreamRecv.cpp +2 -2
- package/worker/test/src/RTC/RTP/TestRtpStreamSend.cpp +119 -0
- package/worker/test/src/RTC/TestConsumer.cpp +4 -3
- package/worker/test/src/RTC/TestPortManager.cpp +1 -1
- package/worker/test/src/RTC/TestRemoteCaptureTimeEstimator.cpp +164 -0
- package/worker/test/src/RTC/TestRemoteClockOffsetEstimator.cpp +241 -0
- package/worker/test/src/RTC/TestSimpleProducerStreamManager.cpp +2 -2
- package/worker/test/src/RTC/TestSimulcastProducerStreamManager.cpp +340 -15
- package/worker/test/src/RTC/TestSvcProducerStreamManager.cpp +2 -2
- package/worker/test/src/RTC/TestTransportTuple.cpp +1 -1
- package/worker/test/src/Utils/TestTime.cpp +49 -0
|
@@ -66,9 +66,9 @@ namespace
|
|
|
66
66
|
{
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
RTC::RTP::RtpStreamRecv* /*rtpStream*/, uint8_t& /*worstRemoteFractionLost*/) override
|
|
69
|
+
uint8_t OnRtpStreamNeedWorstRemoteFractionLost(RTC::RTP::RtpStreamRecv* /*rtpStream*/) override
|
|
71
70
|
{
|
|
71
|
+
return 0;
|
|
72
72
|
}
|
|
73
73
|
};
|
|
74
74
|
|
|
@@ -16,4 +16,53 @@ SCENARIO("Utils::Time", "[utils][time]")
|
|
|
16
16
|
REQUIRE(ntp2.seconds == ntp.seconds);
|
|
17
17
|
REQUIRE(ntp2.fractions == ntp.fractions);
|
|
18
18
|
}
|
|
19
|
+
|
|
20
|
+
SECTION("TimeMs2Ntp()")
|
|
21
|
+
{
|
|
22
|
+
auto ntp = Utils::Time::TimeMs2Ntp(1500);
|
|
23
|
+
|
|
24
|
+
REQUIRE(ntp.seconds == 1);
|
|
25
|
+
// Half a second in NTP fractional units.
|
|
26
|
+
REQUIRE(ntp.fractions == 2147483648);
|
|
27
|
+
|
|
28
|
+
// A real NTP instant, seconds since Jan 1, 1900, which still fits in 32 bits.
|
|
29
|
+
ntp = Utils::Time::TimeMs2Ntp(3990000000750);
|
|
30
|
+
|
|
31
|
+
REQUIRE(ntp.seconds == 3990000000);
|
|
32
|
+
REQUIRE(Utils::Time::Ntp2TimeMs(ntp) == 3990000000750);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
SECTION("TimeMs2Q32x32()")
|
|
36
|
+
{
|
|
37
|
+
// A whole second is the fractional unit itself.
|
|
38
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
39
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(1000).value() == 4294967296);
|
|
40
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
41
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(-1000).value() == -4294967296);
|
|
42
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
43
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(0).value() == 0);
|
|
44
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
45
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(1).value() == 4294967);
|
|
46
|
+
|
|
47
|
+
// Seconds are 32 bits wide in the format, so 2^31 seconds no longer fit.
|
|
48
|
+
constexpr int64_t OutOfRangeMs{ (1LL << 31) * 1000 };
|
|
49
|
+
|
|
50
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(OutOfRangeMs) == std::nullopt);
|
|
51
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(-OutOfRangeMs) == std::nullopt);
|
|
52
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(OutOfRangeMs - 1).has_value());
|
|
53
|
+
REQUIRE(Utils::Time::TimeMs2Q32x32(-OutOfRangeMs + 1).has_value());
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
SECTION("Q32x32ToTimeMs()")
|
|
57
|
+
{
|
|
58
|
+
REQUIRE(Utils::Time::Q32x32ToTimeMs(4294967296) == 1000);
|
|
59
|
+
REQUIRE(Utils::Time::Q32x32ToTimeMs(-4294967296) == -1000);
|
|
60
|
+
REQUIRE(Utils::Time::Q32x32ToTimeMs(0) == 0);
|
|
61
|
+
|
|
62
|
+
for (const int64_t ms : { 1, -1, 1000, -1000, 123456, -123456 })
|
|
63
|
+
{
|
|
64
|
+
// NOLINTNEXTLINE(bugprone-unchecked-optional-access)
|
|
65
|
+
REQUIRE(Utils::Time::Q32x32ToTimeMs(Utils::Time::TimeMs2Q32x32(ms).value()) == ms);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
19
68
|
}
|