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
|
@@ -14,7 +14,7 @@ namespace RTC
|
|
|
14
14
|
{
|
|
15
15
|
MS_TRACE();
|
|
16
16
|
|
|
17
|
-
auto peerImplementationStringView = Types::
|
|
17
|
+
auto peerImplementationStringView = Types::sctpImplementationToString(this->peerImplementation);
|
|
18
18
|
|
|
19
19
|
MS_DUMP_CLEAN(indentation, "<SCTP::AssociationMetrics>");
|
|
20
20
|
MS_DUMP_CLEAN(indentation, " tx packets count: %" PRIu64, this->txPacketsCount);
|
|
@@ -118,7 +118,7 @@ namespace RTC
|
|
|
118
118
|
this->nextMid.Increment();
|
|
119
119
|
|
|
120
120
|
// This might unblock assembling more messages.
|
|
121
|
-
return -TryToAssembleMessages();
|
|
121
|
+
return -static_cast<int32_t>(TryToAssembleMessages());
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// Slow path.
|
|
@@ -159,7 +159,7 @@ namespace RTC
|
|
|
159
159
|
removedBytes += std::accumulate(
|
|
160
160
|
it->second.begin(),
|
|
161
161
|
it->second.end(),
|
|
162
|
-
0,
|
|
162
|
+
size_t{ 0 },
|
|
163
163
|
[](size_t acc, const auto& i)
|
|
164
164
|
{
|
|
165
165
|
const auto& data = i.second.second;
|
|
@@ -295,7 +295,7 @@ namespace RTC
|
|
|
295
295
|
const size_t payloadLength = std::accumulate(
|
|
296
296
|
tsnChunks.begin(),
|
|
297
297
|
tsnChunks.end(),
|
|
298
|
-
0,
|
|
298
|
+
size_t{ 0 },
|
|
299
299
|
[](size_t acc, const auto& i)
|
|
300
300
|
{
|
|
301
301
|
const auto& data = i.second.second;
|
|
@@ -13,7 +13,8 @@ namespace RTC
|
|
|
13
13
|
{
|
|
14
14
|
ReassemblyQueue::ReassemblyQueue(size_t maxLengthBytes, bool useMessageInterleaving)
|
|
15
15
|
: maxLengthBytes(maxLengthBytes),
|
|
16
|
-
watermarkBytes(
|
|
16
|
+
watermarkBytes(
|
|
17
|
+
static_cast<size_t>(this->maxLengthBytes * ReassemblyQueue::HighWatermarkLimit)),
|
|
17
18
|
reassemblyStreams(CreateReassemblyStreams(
|
|
18
19
|
[this](std::span<const Types::UnwrappedTsn> tsns, Message message)
|
|
19
20
|
{
|
|
@@ -114,7 +114,7 @@ namespace RTC
|
|
|
114
114
|
const size_t payloadLength = std::accumulate(
|
|
115
115
|
start,
|
|
116
116
|
end,
|
|
117
|
-
0,
|
|
117
|
+
size_t{ 0 },
|
|
118
118
|
[](size_t acc, const auto& i)
|
|
119
119
|
{
|
|
120
120
|
const auto& data = i.second;
|
|
@@ -200,13 +200,13 @@ namespace RTC
|
|
|
200
200
|
size_t removedBytes = std::accumulate(
|
|
201
201
|
this->chunksBySsn.begin(),
|
|
202
202
|
endIt,
|
|
203
|
-
0,
|
|
203
|
+
size_t{ 0 },
|
|
204
204
|
[](size_t acc1, const auto& i1)
|
|
205
205
|
{
|
|
206
206
|
return acc1 + std::accumulate(
|
|
207
207
|
i1.second.begin(),
|
|
208
208
|
i1.second.end(),
|
|
209
|
-
0,
|
|
209
|
+
size_t{ 0 },
|
|
210
210
|
[](size_t acc2, const auto& i2)
|
|
211
211
|
{
|
|
212
212
|
const auto& data = i2.second;
|
|
@@ -349,7 +349,7 @@ namespace RTC
|
|
|
349
349
|
const size_t removedBytes = std::accumulate(
|
|
350
350
|
this->chunks.begin(),
|
|
351
351
|
endIt,
|
|
352
|
-
0,
|
|
352
|
+
size_t{ 0 },
|
|
353
353
|
[](size_t acc, const auto& i)
|
|
354
354
|
{
|
|
355
355
|
const auto& data = i.second;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#include "RTC/SCTP/tx/RetransmissionTimeout.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
|
-
#include <cmath> // std::abs(), std::
|
|
6
|
+
#include <cmath> // std::abs(), std::round()
|
|
7
7
|
|
|
8
8
|
namespace RTC
|
|
9
9
|
{
|
|
@@ -33,8 +33,8 @@ namespace RTC
|
|
|
33
33
|
maxRttUs(sctpOptions.maxRttMs * 1000),
|
|
34
34
|
minRttVarianceUs(
|
|
35
35
|
static_cast<int64_t>((sctpOptions.minRttVarianceMs * 1000) / HeuristicVarianceAdjustment)),
|
|
36
|
-
srttUs(sctpOptions.initialRtoMs * 1000),
|
|
37
|
-
rtoUs(sctpOptions.initialRtoMs * 1000),
|
|
36
|
+
srttUs(static_cast<double>(sctpOptions.initialRtoMs * 1000)),
|
|
37
|
+
rtoUs(static_cast<double>(sctpOptions.initialRtoMs * 1000)),
|
|
38
38
|
firstMeasurement(true)
|
|
39
39
|
{
|
|
40
40
|
MS_TRACE();
|
|
@@ -76,7 +76,7 @@ namespace RTC
|
|
|
76
76
|
// https://datatracker.ietf.org/doc/html/rfc9260#section-6.3.1
|
|
77
77
|
if (this->firstMeasurement)
|
|
78
78
|
{
|
|
79
|
-
this->srttUs = rttUs;
|
|
79
|
+
this->srttUs = static_cast<double>(rttUs);
|
|
80
80
|
this->rttVarUs = rttUs / 2.0;
|
|
81
81
|
this->firstMeasurement = false;
|
|
82
82
|
}
|
|
@@ -41,16 +41,18 @@ namespace RTC
|
|
|
41
41
|
this->maxRetransmits = maxRetransmits.value();
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
if (this->maxPacketLifeTime && this->maxRetransmits)
|
|
44
|
+
if (this->maxPacketLifeTime.has_value() && this->maxRetransmits.has_value())
|
|
45
45
|
{
|
|
46
46
|
MS_THROW_TYPE_ERROR("cannot provide both maxPacketLifeTime and maxRetransmits");
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
if (
|
|
49
|
+
if (
|
|
50
|
+
orderedGiven && this->ordered &&
|
|
51
|
+
(this->maxPacketLifeTime.has_value() || this->maxRetransmits.has_value()))
|
|
50
52
|
{
|
|
51
53
|
MS_THROW_TYPE_ERROR("cannot be ordered with maxPacketLifeTime or maxRetransmits");
|
|
52
54
|
}
|
|
53
|
-
else if (!orderedGiven && (this->maxPacketLifeTime || this->maxRetransmits))
|
|
55
|
+
else if (!orderedGiven && (this->maxPacketLifeTime.has_value() || this->maxRetransmits.has_value()))
|
|
54
56
|
{
|
|
55
57
|
this->ordered = false;
|
|
56
58
|
}
|
|
@@ -62,12 +64,6 @@ namespace RTC
|
|
|
62
64
|
MS_TRACE();
|
|
63
65
|
|
|
64
66
|
return FBS::SctpParameters::CreateSctpStreamParameters(
|
|
65
|
-
builder,
|
|
66
|
-
this->streamId,
|
|
67
|
-
this->ordered,
|
|
68
|
-
this->maxPacketLifeTime ? flatbuffers::Optional<uint16_t>(this->maxPacketLifeTime)
|
|
69
|
-
: flatbuffers::nullopt,
|
|
70
|
-
this->maxRetransmits ? flatbuffers::Optional<uint16_t>(this->maxRetransmits)
|
|
71
|
-
: flatbuffers::nullopt);
|
|
67
|
+
builder, this->streamId, this->ordered, this->maxPacketLifeTime, this->maxRetransmits);
|
|
72
68
|
}
|
|
73
69
|
} // namespace RTC
|
|
@@ -219,11 +219,11 @@ namespace RTC
|
|
|
219
219
|
// packet lost.
|
|
220
220
|
if (lossPercentage < 2)
|
|
221
221
|
{
|
|
222
|
-
virtualBitrate = 1.08 * bitrate;
|
|
222
|
+
virtualBitrate = static_cast<int64_t>(1.08 * bitrate);
|
|
223
223
|
}
|
|
224
224
|
else if (lossPercentage > 10)
|
|
225
225
|
{
|
|
226
|
-
virtualBitrate = (1 - 0.5 * (lossPercentage / 100)) * bitrate;
|
|
226
|
+
virtualBitrate = static_cast<int64_t>((1 - 0.5 * (lossPercentage / 100)) * bitrate);
|
|
227
227
|
}
|
|
228
228
|
else
|
|
229
229
|
{
|
|
@@ -56,7 +56,7 @@ namespace RTC
|
|
|
56
56
|
return FBS::SrtpParameters::SrtpCryptoSuite::AES_CM_128_HMAC_SHA1_32;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
NO_DEFAULT();
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -86,7 +86,7 @@ namespace RTC
|
|
|
86
86
|
return SrtpSession::CryptoSuite::AES_CM_128_HMAC_SHA1_32;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
NO_DEFAULT();
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
@@ -160,11 +160,11 @@ namespace RTC
|
|
|
160
160
|
// packet lost.
|
|
161
161
|
if (lossPercentage < 2)
|
|
162
162
|
{
|
|
163
|
-
virtualBitrate = 1.08 * bitrate;
|
|
163
|
+
virtualBitrate = static_cast<int64_t>(1.08 * bitrate);
|
|
164
164
|
}
|
|
165
165
|
else if (lossPercentage > 10)
|
|
166
166
|
{
|
|
167
|
-
virtualBitrate = (1 - 0.5 * (lossPercentage / 100)) * bitrate;
|
|
167
|
+
virtualBitrate = static_cast<int64_t>((1 - 0.5 * (lossPercentage / 100)) * bitrate);
|
|
168
168
|
}
|
|
169
169
|
else
|
|
170
170
|
{
|
|
@@ -168,7 +168,7 @@ namespace RTC
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
void TcpConnection::Send(const uint8_t* data, size_t len,
|
|
171
|
+
void TcpConnection::Send(const uint8_t* data, size_t len, onSendCallback cb)
|
|
172
172
|
{
|
|
173
173
|
MS_TRACE();
|
|
174
174
|
|
|
@@ -177,6 +177,6 @@ namespace RTC
|
|
|
177
177
|
uint8_t frameLen[2];
|
|
178
178
|
|
|
179
179
|
Utils::Byte::Set2Bytes(frameLen, 0, len);
|
|
180
|
-
::TcpConnectionHandle::Write(frameLen, 2, data, len, cb);
|
|
180
|
+
::TcpConnectionHandle::Write(frameLen, 2, data, len, std::move(cb));
|
|
181
181
|
}
|
|
182
182
|
} // namespace RTC
|