mediasoup 3.26.0 → 3.27.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 +11 -0
- package/node/lib/DataConsumer.js +1 -1
- package/node/lib/Router.js +1 -1
- package/node/lib/Transport.js +15 -15
- package/node/lib/fbs/rtp-parameters/encoding-mapping.d.ts +2 -6
- package/node/lib/fbs/rtp-parameters/encoding-mapping.d.ts.map +1 -1
- package/node/lib/fbs/rtp-parameters/encoding-mapping.js +7 -19
- package/node/lib/fbs/rtp-parameters/rtp-encoding-parameters.d.ts +4 -4
- package/node/lib/fbs/rtp-parameters/rtp-encoding-parameters.js +2 -2
- package/node/lib/fbs/rtp-stream/bitrate-by-layer.d.ts +5 -5
- package/node/lib/fbs/rtp-stream/bitrate-by-layer.d.ts.map +1 -1
- package/node/lib/fbs/rtp-stream/bitrate-by-layer.js +3 -3
- package/node/lib/fbs/rtp-stream/recv-stats.d.ts +5 -5
- package/node/lib/fbs/rtp-stream/recv-stats.d.ts.map +1 -1
- package/node/lib/fbs/rtp-stream/recv-stats.js +3 -3
- package/node/lib/fbs/rtp-stream/send-stats.d.ts +5 -5
- package/node/lib/fbs/rtp-stream/send-stats.d.ts.map +1 -1
- package/node/lib/fbs/rtp-stream/send-stats.js +3 -3
- package/node/lib/fbs/transport/bwe-trace-info.d.ts +23 -23
- package/node/lib/fbs/transport/bwe-trace-info.d.ts.map +1 -1
- package/node/lib/fbs/transport/bwe-trace-info.js +15 -15
- package/node/lib/fbs/transport/options.d.ts +5 -5
- package/node/lib/fbs/transport/options.js +2 -2
- package/node/lib/fbs/transport/set-max-incoming-bitrate-request.d.ts +5 -5
- package/node/lib/fbs/transport/set-max-incoming-bitrate-request.d.ts.map +1 -1
- package/node/lib/fbs/transport/set-max-incoming-bitrate-request.js +3 -3
- package/node/lib/fbs/transport/set-max-outgoing-bitrate-request.d.ts +5 -5
- package/node/lib/fbs/transport/set-max-outgoing-bitrate-request.d.ts.map +1 -1
- package/node/lib/fbs/transport/set-max-outgoing-bitrate-request.js +3 -3
- package/node/lib/fbs/transport/set-min-outgoing-bitrate-request.d.ts +5 -5
- package/node/lib/fbs/transport/set-min-outgoing-bitrate-request.d.ts.map +1 -1
- package/node/lib/fbs/transport/set-min-outgoing-bitrate-request.js +3 -3
- package/node/lib/fbs/transport/stats.d.ts +38 -38
- package/node/lib/fbs/transport/stats.d.ts.map +1 -1
- package/node/lib/fbs/transport/stats.js +25 -25
- package/node/lib/ortc.d.ts +0 -1
- package/node/lib/ortc.d.ts.map +1 -1
- package/node/lib/ortc.js +1 -2
- package/node/lib/rtpParametersFbsUtils.d.ts.map +1 -1
- package/node/lib/rtpParametersFbsUtils.js +2 -2
- package/package.json +9 -9
- package/worker/deps/libwebrtc/libwebrtc/call/rtp_transport_controller_send.cc +10 -10
- package/worker/deps/libwebrtc/libwebrtc/mediasoup_helpers.h +6 -6
- package/worker/deps/libwebrtc/libwebrtc/modules/congestion_controller/goog_cc/alr_detector.cc +1 -1
- package/worker/deps/libwebrtc/libwebrtc/modules/pacing/paced_sender.cc +7 -7
- package/worker/deps/libwebrtc/libwebrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h +1 -1
- package/worker/deps/libwebrtc/libwebrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.cc +1 -1
- package/worker/fbs/rtpParameters.fbs +1 -2
- package/worker/fbs/rtpStream.fbs +3 -3
- package/worker/fbs/transport.fbs +23 -23
- package/worker/fuzzer/include/RTC/FuzzerDtlsTransport.hpp +4 -1
- package/worker/fuzzer/src/FuzzerUtils.cpp +5 -3
- package/worker/fuzzer/src/RTC/FuzzerDtlsTransport.cpp +8 -5
- package/worker/fuzzer/src/RTC/FuzzerRateCalculator.cpp +3 -3
- package/worker/fuzzer/src/RTC/FuzzerTrendCalculator.cpp +6 -6
- package/worker/fuzzer/src/RTC/RTCP/FuzzerFeedbackRtpTransport.cpp +3 -3
- package/worker/fuzzer/src/RTC/RTP/FuzzerPacket.cpp +2 -2
- package/worker/fuzzer/src/RTC/RTP/FuzzerRetransmissionBuffer.cpp +5 -5
- package/worker/fuzzer/src/RTC/RTP/FuzzerRtpStreamSend.cpp +3 -3
- package/worker/fuzzer/src/fuzzer.cpp +4 -0
- package/worker/include/Channel/ChannelNotification.hpp +3 -3
- package/worker/include/Channel/ChannelRequest.hpp +1 -1
- package/worker/include/Channel/ChannelSocket.hpp +11 -0
- package/worker/include/DepLibUV.hpp +16 -33
- package/worker/include/RTC/ActiveSpeakerObserver.hpp +11 -11
- package/worker/include/RTC/AudioLevelObserver.hpp +4 -4
- package/worker/include/RTC/BWE/AcknowledgedBitrateEstimatorInterface.hpp +55 -0
- package/worker/include/RTC/BWE/AimdRateControl.hpp +190 -0
- package/worker/include/RTC/BWE/BweTypes.hpp +211 -0
- package/worker/include/RTC/BWE/DelayBasedBwe.hpp +173 -0
- package/worker/include/RTC/BWE/FeedbackAdapter.hpp +72 -0
- package/worker/include/RTC/BWE/InterArrivalDelta.hpp +106 -0
- package/worker/include/RTC/BWE/LinkCapacityEstimator.hpp +84 -0
- package/worker/include/RTC/BWE/RobustThroughputEstimator.hpp +94 -0
- package/worker/include/RTC/BWE/SendPacketHistory.hpp +137 -0
- package/worker/include/RTC/BWE/TrendlineEstimator.hpp +101 -0
- package/worker/include/RTC/Consts.hpp +6 -6
- package/worker/include/RTC/Consumer.hpp +14 -12
- package/worker/include/RTC/DataConsumer.hpp +3 -3
- package/worker/include/RTC/DataProducer.hpp +3 -3
- package/worker/include/RTC/DtlsTransport.hpp +5 -2
- package/worker/include/RTC/ICE/IceCandidate.hpp +2 -2
- package/worker/include/RTC/ICE/IceServer.hpp +3 -3
- package/worker/include/RTC/KeyFrameRequestManager.hpp +3 -3
- package/worker/include/RTC/NEW_RTCP/packet/Packet.hpp +1 -1
- package/worker/include/RTC/NackGenerator.hpp +12 -12
- package/worker/include/RTC/PipeProducerStreamManager.hpp +3 -4
- package/worker/include/RTC/PipeTransport.hpp +18 -5
- package/worker/include/RTC/PlainTransport.hpp +18 -5
- package/worker/include/RTC/PortManager.hpp +4 -4
- package/worker/include/RTC/Producer.hpp +21 -12
- package/worker/include/RTC/ProducerStreamManager.hpp +12 -6
- package/worker/include/RTC/RTCP/Bye.hpp +2 -2
- package/worker/include/RTC/RTCP/FeedbackPsRemb.hpp +4 -4
- package/worker/include/RTC/RTCP/FeedbackRtpTmmb.hpp +3 -3
- package/worker/include/RTC/RTCP/FeedbackRtpTransport.hpp +54 -39
- package/worker/include/RTC/RTCP/Packet.hpp +3 -3
- package/worker/include/RTC/RTCP/ReceiverReport.hpp +3 -3
- package/worker/include/RTC/RTCP/Sdes.hpp +2 -2
- package/worker/include/RTC/RTCP/XR.hpp +2 -2
- package/worker/include/RTC/RTCP/XrDelaySinceLastRr.hpp +1 -1
- package/worker/include/RTC/RTP/Codecs/H264.hpp +1 -1
- package/worker/include/RTC/RTP/Codecs/Opus.hpp +2 -2
- package/worker/include/RTC/RTP/Codecs/PayloadDescriptorHandler.hpp +3 -3
- package/worker/include/RTC/RTP/Codecs/VP8.hpp +2 -2
- package/worker/include/RTC/RTP/Codecs/VP9.hpp +2 -2
- package/worker/include/RTC/RTP/HeaderExtensionIds.hpp +12 -12
- package/worker/include/RTC/RTP/Packet.hpp +13 -13
- package/worker/include/RTC/RTP/ProbationGenerator.hpp +1 -1
- package/worker/include/RTC/RTP/RetransmissionBuffer.hpp +7 -7
- package/worker/include/RTC/RTP/RtpStream.hpp +37 -51
- package/worker/include/RTC/RTP/RtpStreamRecv.hpp +59 -41
- package/worker/include/RTC/RTP/RtpStreamSend.hpp +20 -14
- package/worker/include/RTC/RTP/RtxStream.hpp +12 -13
- package/worker/include/RTC/RateCalculator.hpp +50 -44
- package/worker/include/RTC/RemoteCaptureTimeEstimator.hpp +5 -4
- package/worker/include/RTC/RemoteClockOffsetEstimator.hpp +11 -11
- package/worker/include/RTC/Router.hpp +6 -0
- package/worker/include/RTC/RtcLogger.hpp +1 -1
- package/worker/include/RTC/RtpDictionaries.hpp +10 -10
- package/worker/include/RTC/SCTP/association/Association.hpp +56 -28
- package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +4 -4
- package/worker/include/RTC/SCTP/association/StateCookie.hpp +14 -14
- package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +2 -2
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +12 -12
- package/worker/include/RTC/SCTP/association/TransmissionControlBlockContextInterface.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/TLV.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/StateCookieParameter.hpp +3 -3
- package/worker/include/RTC/SCTP/public/AssociationInterface.hpp +4 -1
- package/worker/include/RTC/SCTP/public/AssociationMetrics.hpp +1 -1
- package/worker/include/RTC/SCTP/public/SctpOptions.hpp +12 -12
- package/worker/include/RTC/SCTP/public/SctpTypes.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +15 -16
- package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +7 -8
- package/worker/include/RTC/SCTP/tx/RetransmissionTimeout.hpp +20 -16
- package/worker/include/RTC/SCTP/tx/RoundRobinSendQueue.hpp +5 -6
- package/worker/include/RTC/SCTP/tx/SendQueueInterface.hpp +2 -2
- package/worker/include/RTC/SCTP/tx/StreamScheduler.hpp +5 -5
- package/worker/include/RTC/SctpDictionaries.hpp +3 -3
- package/worker/include/RTC/Serializable.hpp +1 -1
- package/worker/include/RTC/SimpleProducerStreamManager.hpp +3 -4
- package/worker/include/RTC/SimulcastProducerStreamManager.hpp +6 -7
- package/worker/include/RTC/SvcProducerStreamManager.hpp +6 -5
- package/worker/include/RTC/TcpConnection.hpp +9 -3
- package/worker/include/RTC/TcpServer.hpp +3 -0
- package/worker/include/RTC/Transport.hpp +52 -45
- package/worker/include/RTC/TransportCongestionControlClient.hpp +30 -25
- package/worker/include/RTC/TransportCongestionControlServer.hpp +17 -17
- package/worker/include/RTC/TrendCalculator.hpp +5 -5
- package/worker/include/RTC/UdpSocket.hpp +11 -2
- package/worker/include/RTC/WebRtcServer.hpp +20 -5
- package/worker/include/RTC/WebRtcTransport.hpp +35 -10
- package/worker/include/Settings.hpp +4 -2
- package/worker/include/Shared.hpp +5 -20
- package/worker/include/SharedInterface.hpp +6 -28
- package/worker/include/Utils.hpp +40 -21
- package/worker/include/common.hpp +4 -0
- package/worker/include/handles/BackoffTimerHandle.hpp +4 -4
- package/worker/include/handles/BackoffTimerHandleInterface.hpp +5 -5
- package/worker/include/handles/TcpConnectionHandle.hpp +6 -6
- package/worker/include/handles/TcpServerHandle.hpp +1 -1
- package/worker/include/handles/TimerHandle.hpp +15 -9
- package/worker/include/handles/TimerHandleInterface.hpp +10 -4
- package/worker/include/handles/UdpSocketHandle.hpp +3 -3
- package/worker/include/handles/UnixStreamSocketHandle.hpp +2 -2
- package/worker/meson.build +81 -36
- package/worker/meson_options.txt +1 -0
- package/worker/mocks/include/MockShared.hpp +24 -23
- package/worker/mocks/include/RTC/SCTP/association/MockTransmissionControlBlockContext.hpp +51 -27
- package/worker/mocks/include/RTC/SCTP/tx/MockSendQueue.hpp +11 -11
- package/worker/mocks/include/handles/MockBackoffTimerHandle.hpp +10 -10
- package/worker/mocks/include/handles/MockTimerHandle.hpp +60 -22
- package/worker/mocks/src/MockShared.cpp +51 -5
- package/worker/mocks/src/handles/MockBackoffTimerHandle.cpp +29 -15
- package/worker/mocks/src/handles/MockTimerHandle.cpp +117 -0
- package/worker/scripts/clang-scripts.mjs +2 -2
- package/worker/src/Channel/ChannelNotification.cpp +5 -6
- package/worker/src/Channel/ChannelSocket.cpp +20 -2
- package/worker/src/DepLibUV.cpp +4 -5
- package/worker/src/RTC/ActiveSpeakerObserver.cpp +59 -47
- package/worker/src/RTC/AudioLevelObserver.cpp +7 -7
- package/worker/src/RTC/BWE/AimdRateControl.cpp +468 -0
- package/worker/src/RTC/BWE/BweTypes.cpp +61 -0
- package/worker/src/RTC/BWE/DelayBasedBwe.cpp +275 -0
- package/worker/src/RTC/BWE/FeedbackAdapter.cpp +148 -0
- package/worker/src/RTC/BWE/InterArrivalDelta.cpp +181 -0
- package/worker/src/RTC/BWE/LinkCapacityEstimator.cpp +133 -0
- package/worker/src/RTC/BWE/RobustThroughputEstimator.cpp +245 -0
- package/worker/src/RTC/BWE/SendPacketHistory.cpp +184 -0
- package/worker/src/RTC/BWE/TrendlineEstimator.cpp +233 -0
- package/worker/src/RTC/Consumer.cpp +48 -35
- package/worker/src/RTC/DataConsumer.cpp +4 -4
- package/worker/src/RTC/DataProducer.cpp +3 -3
- package/worker/src/RTC/DirectTransport.cpp +2 -2
- package/worker/src/RTC/DtlsTransport.cpp +14 -11
- package/worker/src/RTC/ICE/IceServer.cpp +2 -2
- package/worker/src/RTC/KeyFrameRequestManager.cpp +16 -12
- package/worker/src/RTC/NackGenerator.cpp +12 -12
- package/worker/src/RTC/PipeProducerStreamManager.cpp +6 -6
- package/worker/src/RTC/PipeTransport.cpp +16 -13
- package/worker/src/RTC/PlainTransport.cpp +25 -16
- package/worker/src/RTC/Producer.cpp +50 -36
- package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +13 -6
- package/worker/src/RTC/RTCP/FeedbackRtpTmmb.cpp +14 -5
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +76 -50
- package/worker/src/RTC/RTP/Codecs/VP8.cpp +1 -1
- package/worker/src/RTC/RTP/Codecs/VP9.cpp +4 -4
- package/worker/src/RTC/RTP/Packet.cpp +9 -10
- package/worker/src/RTC/RTP/RetransmissionBuffer.cpp +6 -6
- package/worker/src/RTC/RTP/RtpStream.cpp +19 -19
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +146 -81
- package/worker/src/RTC/RTP/RtpStreamSend.cpp +49 -44
- package/worker/src/RTC/RTP/RtxStream.cpp +7 -10
- package/worker/src/RTC/RateCalculator.cpp +99 -136
- package/worker/src/RTC/RemoteCaptureTimeEstimator.cpp +13 -13
- package/worker/src/RTC/RemoteClockOffsetEstimator.cpp +18 -17
- package/worker/src/RTC/Router.cpp +18 -1
- package/worker/src/RTC/RtpDictionaries/RtpEncodingParameters.cpp +5 -2
- package/worker/src/RTC/SCTP/association/Association.cpp +131 -102
- package/worker/src/RTC/SCTP/association/AssociationListenerDeferrer.cpp +4 -4
- package/worker/src/RTC/SCTP/association/Capabilities.cpp +1 -1
- package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +25 -18
- package/worker/src/RTC/SCTP/association/StateCookie.cpp +7 -6
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +16 -13
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +28 -26
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +0 -1
- package/worker/src/RTC/SCTP/packet/parameters/StateCookieParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/public/AssociationMetrics.cpp +1 -1
- package/worker/src/RTC/SCTP/public/SctpOptions.cpp +13 -13
- package/worker/src/RTC/SCTP/rx/DataTracker.cpp +1 -1
- package/worker/src/RTC/SCTP/rx/ReassemblyQueue.cpp +5 -5
- package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +15 -15
- package/worker/src/RTC/SCTP/tx/RetransmissionQueue.cpp +15 -15
- package/worker/src/RTC/SCTP/tx/RetransmissionTimeout.cpp +29 -26
- package/worker/src/RTC/SCTP/tx/RoundRobinSendQueue.cpp +12 -11
- package/worker/src/RTC/SCTP/tx/StreamScheduler.cpp +4 -4
- package/worker/src/RTC/SctpDictionaries/SctpStreamParameters.cpp +2 -2
- package/worker/src/RTC/SimpleProducerStreamManager.cpp +10 -10
- package/worker/src/RTC/SimulcastProducerStreamManager.cpp +39 -37
- package/worker/src/RTC/SvcProducerStreamManager.cpp +39 -25
- package/worker/src/RTC/TcpConnection.cpp +9 -3
- package/worker/src/RTC/TcpServer.cpp +7 -2
- package/worker/src/RTC/Transport.cpp +242 -302
- package/worker/src/RTC/TransportCongestionControlClient.cpp +78 -71
- package/worker/src/RTC/TransportCongestionControlServer.cpp +38 -40
- package/worker/src/RTC/TrendCalculator.cpp +3 -3
- package/worker/src/RTC/UdpSocket.cpp +14 -3
- package/worker/src/RTC/WebRtcServer.cpp +20 -14
- package/worker/src/RTC/WebRtcTransport.cpp +35 -30
- package/worker/src/Settings.cpp +10 -0
- package/worker/src/Shared.cpp +2 -2
- package/worker/src/Utils/Crypto.cpp +2 -2
- package/worker/src/Worker.cpp +5 -1
- package/worker/src/handles/BackoffTimerHandle.cpp +24 -11
- package/worker/src/handles/TimerHandle.cpp +74 -25
- package/worker/src/lib.cpp +6 -0
- package/worker/tasks.py +171 -44
- package/worker/test/include/RTC/BWE/helpers/LinkSimulator.hpp +117 -0
- package/worker/test/src/RTC/BWE/TestAimdRateControl.cpp +400 -0
- package/worker/test/src/RTC/BWE/TestDelayBasedBwe.cpp +568 -0
- package/worker/test/src/RTC/BWE/TestFeedbackAdapter.cpp +546 -0
- package/worker/test/src/RTC/BWE/TestInterArrivalDelta.cpp +301 -0
- package/worker/test/src/RTC/BWE/TestLinkCapacityEstimator.cpp +115 -0
- package/worker/test/src/RTC/BWE/TestRobustThroughputEstimator.cpp +433 -0
- package/worker/test/src/RTC/BWE/TestSendPacketHistory.cpp +259 -0
- package/worker/test/src/RTC/BWE/TestTrendlineEstimator.cpp +137 -0
- package/worker/test/src/RTC/BWE/helpers/LinkSimulator.cpp +171 -0
- package/worker/test/src/RTC/RTCP/TestFeedbackPsRemb.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTmmb.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTransport.cpp +246 -208
- package/worker/test/src/RTC/RTP/TestPacket.cpp +11 -11
- package/worker/test/src/RTC/RTP/TestRetransmissionBuffer.cpp +12 -12
- package/worker/test/src/RTC/RTP/TestRtpStreamRecv.cpp +23 -16
- package/worker/test/src/RTC/RTP/TestRtpStreamSend.cpp +13 -13
- package/worker/test/src/RTC/SCTP/association/TestAssociation.cpp +27 -22
- package/worker/test/src/RTC/SCTP/association/TestHeartbeatHandler.cpp +21 -15
- package/worker/test/src/RTC/SCTP/association/TestStateCookie.cpp +6 -6
- package/worker/test/src/RTC/SCTP/association/TestStreamResetHandler.cpp +17 -13
- package/worker/test/src/RTC/SCTP/association/TestTransmissionControlBlock.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +23 -23
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/rx/TestDataTracker.cpp +37 -37
- package/worker/test/src/RTC/SCTP/rx/TestInterleavedReassemblyStreams.cpp +10 -10
- package/worker/test/src/RTC/SCTP/rx/TestReassemblyQueue.cpp +1 -1
- package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +93 -93
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionQueue.cpp +247 -247
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionTimeout.cpp +100 -80
- package/worker/test/src/RTC/SCTP/tx/TestRoundRobinSendQueue.cpp +163 -163
- package/worker/test/src/RTC/SCTP/tx/TestStreamScheduler.cpp +76 -77
- package/worker/test/src/RTC/TestConsumer.cpp +8 -3
- package/worker/test/src/RTC/TestKeyFrameRequestManager.cpp +3 -3
- package/worker/test/src/RTC/TestNackGenerator.cpp +3 -3
- package/worker/test/src/RTC/TestPipeProducerStreamManager.cpp +5 -5
- package/worker/test/src/RTC/TestRateCalculator.cpp +110 -14
- package/worker/test/src/RTC/TestRemoteCaptureTimeEstimator.cpp +22 -17
- package/worker/test/src/RTC/TestRemoteClockOffsetEstimator.cpp +87 -85
- package/worker/test/src/RTC/TestSimpleProducerStreamManager.cpp +54 -47
- package/worker/test/src/RTC/TestSimulcastProducerStreamManager.cpp +83 -69
- package/worker/test/src/RTC/TestSvcProducerStreamManager.cpp +76 -65
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +72 -66
- package/worker/test/src/RTC/TestTransportTuple.cpp +19 -4
- package/worker/test/src/TestDepLibUV.cpp +19 -0
- package/worker/test/src/Utils/TestTime.cpp +57 -26
- package/worker/test/src/testHelpers.cpp +1 -1
- package/worker/test/src/tests.cpp +6 -0
- package/worker/include/RTC/SenderBandwidthEstimator.hpp +0 -118
- package/worker/src/RTC/SenderBandwidthEstimator.cpp +0 -269
|
@@ -4,17 +4,19 @@
|
|
|
4
4
|
#include "RTC/KeyFrameRequestManager.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
6
|
|
|
7
|
-
static constexpr
|
|
7
|
+
static constexpr int64_t KeyFrameRetransmissionWaitMs{ 1000 };
|
|
8
8
|
|
|
9
9
|
/* PendingKeyFrameInfo methods. */
|
|
10
10
|
|
|
11
11
|
RTC::PendingKeyFrameInfo::PendingKeyFrameInfo(
|
|
12
12
|
PendingKeyFrameInfo::Listener* listener, SharedInterface* shared, uint32_t ssrc)
|
|
13
|
-
: listener(listener),
|
|
13
|
+
: listener(listener),
|
|
14
|
+
ssrc(ssrc),
|
|
15
|
+
timer(shared->CreateTimer(this, "key-frame-request-manager-pending-key-frame-info"))
|
|
14
16
|
{
|
|
15
17
|
MS_TRACE();
|
|
16
18
|
|
|
17
|
-
this->timer->Start(
|
|
19
|
+
this->timer->Start(KeyFrameRetransmissionWaitMs);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
RTC::PendingKeyFrameInfo::~PendingKeyFrameInfo()
|
|
@@ -38,12 +40,14 @@ void RTC::PendingKeyFrameInfo::OnTimer(TimerHandleInterface* timer)
|
|
|
38
40
|
/* KeyFrameRequestDelayer methods. */
|
|
39
41
|
|
|
40
42
|
RTC::KeyFrameRequestDelayer::KeyFrameRequestDelayer(
|
|
41
|
-
KeyFrameRequestDelayer::Listener* listener, SharedInterface* shared, uint32_t ssrc,
|
|
42
|
-
: listener(listener),
|
|
43
|
+
KeyFrameRequestDelayer::Listener* listener, SharedInterface* shared, uint32_t ssrc, int64_t delayMs)
|
|
44
|
+
: listener(listener),
|
|
45
|
+
ssrc(ssrc),
|
|
46
|
+
timer(shared->CreateTimer(this, "key-frame-request-manager-key-frame-request-delayer"))
|
|
43
47
|
{
|
|
44
48
|
MS_TRACE();
|
|
45
49
|
|
|
46
|
-
this->timer->Start(
|
|
50
|
+
this->timer->Start(delayMs);
|
|
47
51
|
}
|
|
48
52
|
|
|
49
53
|
RTC::KeyFrameRequestDelayer::~KeyFrameRequestDelayer()
|
|
@@ -67,8 +71,8 @@ void RTC::KeyFrameRequestDelayer::OnTimer(TimerHandleInterface* timer)
|
|
|
67
71
|
/* KeyFrameRequestManager methods. */
|
|
68
72
|
|
|
69
73
|
RTC::KeyFrameRequestManager::KeyFrameRequestManager(
|
|
70
|
-
KeyFrameRequestManager::Listener* listener, SharedInterface* shared,
|
|
71
|
-
: listener(listener), shared(shared),
|
|
74
|
+
KeyFrameRequestManager::Listener* listener, SharedInterface* shared, int64_t keyFrameRequestDelayMs)
|
|
75
|
+
: listener(listener), shared(shared), keyFrameRequestDelayMs(keyFrameRequestDelayMs)
|
|
72
76
|
{
|
|
73
77
|
MS_TRACE();
|
|
74
78
|
}
|
|
@@ -98,7 +102,7 @@ void RTC::KeyFrameRequestManager::KeyFrameNeeded(uint32_t ssrc)
|
|
|
98
102
|
{
|
|
99
103
|
MS_TRACE();
|
|
100
104
|
|
|
101
|
-
if (this->
|
|
105
|
+
if (this->keyFrameRequestDelayMs > 0)
|
|
102
106
|
{
|
|
103
107
|
auto it = this->mapSsrcKeyFrameRequestDelayer.find(ssrc);
|
|
104
108
|
|
|
@@ -119,7 +123,7 @@ void RTC::KeyFrameRequestManager::KeyFrameNeeded(uint32_t ssrc)
|
|
|
119
123
|
MS_DEBUG_DEV("creating a delayer for the given ssrc");
|
|
120
124
|
|
|
121
125
|
this->mapSsrcKeyFrameRequestDelayer[ssrc] =
|
|
122
|
-
new KeyFrameRequestDelayer(this, this->shared, ssrc, this->
|
|
126
|
+
new KeyFrameRequestDelayer(this, this->shared, ssrc, this->keyFrameRequestDelayMs);
|
|
123
127
|
}
|
|
124
128
|
}
|
|
125
129
|
|
|
@@ -145,7 +149,7 @@ void RTC::KeyFrameRequestManager::ForceKeyFrameNeeded(uint32_t ssrc)
|
|
|
145
149
|
{
|
|
146
150
|
MS_TRACE();
|
|
147
151
|
|
|
148
|
-
if (this->
|
|
152
|
+
if (this->keyFrameRequestDelayMs > 0)
|
|
149
153
|
{
|
|
150
154
|
// Create/replace a delayer for this ssrc.
|
|
151
155
|
auto it = this->mapSsrcKeyFrameRequestDelayer.find(ssrc);
|
|
@@ -159,7 +163,7 @@ void RTC::KeyFrameRequestManager::ForceKeyFrameNeeded(uint32_t ssrc)
|
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
this->mapSsrcKeyFrameRequestDelayer[ssrc] =
|
|
162
|
-
new KeyFrameRequestDelayer(this, this->shared, ssrc, this->
|
|
166
|
+
new KeyFrameRequestDelayer(this, this->shared, ssrc, this->keyFrameRequestDelayMs);
|
|
163
167
|
}
|
|
164
168
|
|
|
165
169
|
auto it = this->mapSsrcPendingKeyFrameInfo.find(ssrc);
|
|
@@ -8,20 +8,20 @@ namespace RTC
|
|
|
8
8
|
{
|
|
9
9
|
/* Static. */
|
|
10
10
|
|
|
11
|
-
static constexpr size_t MaxPacketAge{
|
|
12
|
-
static constexpr size_t MaxNackPackets{
|
|
13
|
-
static constexpr
|
|
14
|
-
static constexpr uint8_t MaxNackRetries{
|
|
15
|
-
static constexpr
|
|
11
|
+
static constexpr size_t MaxPacketAge{ 10000 };
|
|
12
|
+
static constexpr size_t MaxNackPackets{ 1000 };
|
|
13
|
+
static constexpr int64_t DefaultRttMs{ 100 };
|
|
14
|
+
static constexpr uint8_t MaxNackRetries{ 10 };
|
|
15
|
+
static constexpr int64_t TimerIntervalMs{ 40 };
|
|
16
16
|
|
|
17
17
|
/* Instance methods. */
|
|
18
18
|
|
|
19
|
-
NackGenerator::NackGenerator(Listener* listener, SharedInterface* shared,
|
|
19
|
+
NackGenerator::NackGenerator(Listener* listener, SharedInterface* shared, int64_t sendNackDelayMs)
|
|
20
20
|
: listener(listener),
|
|
21
21
|
shared(shared),
|
|
22
22
|
sendNackDelayMs(sendNackDelayMs),
|
|
23
|
-
timer(shared->CreateTimer(this)),
|
|
24
|
-
|
|
23
|
+
timer(shared->CreateTimer(this, "nack-generator")),
|
|
24
|
+
rttMs(DefaultRttMs)
|
|
25
25
|
{
|
|
26
26
|
MS_TRACE();
|
|
27
27
|
}
|
|
@@ -247,7 +247,7 @@ namespace RTC
|
|
|
247
247
|
{
|
|
248
248
|
MS_TRACE();
|
|
249
249
|
|
|
250
|
-
const
|
|
250
|
+
const int64_t nowMs = this->shared->GetTimeMs();
|
|
251
251
|
std::vector<uint16_t> nackBatch;
|
|
252
252
|
|
|
253
253
|
auto it = this->nackList.begin();
|
|
@@ -266,7 +266,7 @@ namespace RTC
|
|
|
266
266
|
if (
|
|
267
267
|
filter == NackFilter::SEQ && nackInfo.sentAtMs == 0 &&
|
|
268
268
|
(nackInfo.sendAtSeq == this->lastSeq ||
|
|
269
|
-
|
|
269
|
+
SeqManager<uint16_t>::IsSeqHigherThan(this->lastSeq, nackInfo.sendAtSeq)))
|
|
270
270
|
{
|
|
271
271
|
nackBatch.emplace_back(seq);
|
|
272
272
|
nackInfo.retries++;
|
|
@@ -293,7 +293,7 @@ namespace RTC
|
|
|
293
293
|
if (
|
|
294
294
|
filter == NackFilter::TIME &&
|
|
295
295
|
(nackInfo.sentAtMs == 0 ||
|
|
296
|
-
|
|
296
|
+
nowMs - nackInfo.sentAtMs >= (this->rttMs > 0 ? this->rttMs : DefaultRttMs)))
|
|
297
297
|
{
|
|
298
298
|
nackBatch.emplace_back(seq);
|
|
299
299
|
nackInfo.retries++;
|
|
@@ -363,7 +363,7 @@ namespace RTC
|
|
|
363
363
|
}
|
|
364
364
|
else
|
|
365
365
|
{
|
|
366
|
-
this->timer->Start(
|
|
366
|
+
this->timer->Start(TimerIntervalMs);
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
|
|
@@ -73,28 +73,28 @@ namespace RTC
|
|
|
73
73
|
// Do nothing.
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
int64_t PipeProducerStreamManager::IncreaseLayer(
|
|
77
|
+
int64_t /*bitrate*/, bool /*considerLoss*/, float /*lossPercentage*/, int64_t /*nowMs*/)
|
|
78
78
|
{
|
|
79
79
|
MS_TRACE();
|
|
80
80
|
|
|
81
81
|
// Pipe does not play the BWE game.
|
|
82
|
-
return
|
|
82
|
+
return 0;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
void PipeProducerStreamManager::ApplyLayers(
|
|
85
|
+
void PipeProducerStreamManager::ApplyLayers(int64_t /*rtpStreamActiveMs*/)
|
|
86
86
|
{
|
|
87
87
|
MS_TRACE();
|
|
88
88
|
|
|
89
89
|
// Pipe does not play the BWE game.
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
int64_t PipeProducerStreamManager::GetDesiredBitrate(int64_t /*nowMs*/) const
|
|
93
93
|
{
|
|
94
94
|
MS_TRACE();
|
|
95
95
|
|
|
96
96
|
// Pipe does not play the BWE game.
|
|
97
|
-
return
|
|
97
|
+
return 0;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
ProducerStreamManager::RtpPacketProcessResult PipeProducerStreamManager::ProcessRtpPacket(
|
|
@@ -80,6 +80,7 @@ namespace RTC
|
|
|
80
80
|
|
|
81
81
|
this->udpSocket = new RTC::UdpSocket(
|
|
82
82
|
this,
|
|
83
|
+
this->shared,
|
|
83
84
|
this->listenInfo.ip,
|
|
84
85
|
this->listenInfo.portRange.min,
|
|
85
86
|
this->listenInfo.portRange.max,
|
|
@@ -89,7 +90,7 @@ namespace RTC
|
|
|
89
90
|
else if (this->listenInfo.port != 0)
|
|
90
91
|
{
|
|
91
92
|
this->udpSocket = new RTC::UdpSocket(
|
|
92
|
-
this, this->listenInfo.ip, this->listenInfo.port, this->listenInfo.flags);
|
|
93
|
+
this, this->shared, this->listenInfo.ip, this->listenInfo.port, this->listenInfo.flags);
|
|
93
94
|
}
|
|
94
95
|
// NOTE: This is temporal to allow deprecated usage of worker port range.
|
|
95
96
|
// In the future this should throw since |port| or |portRange| will be
|
|
@@ -100,6 +101,7 @@ namespace RTC
|
|
|
100
101
|
|
|
101
102
|
this->udpSocket = new RTC::UdpSocket(
|
|
102
103
|
this,
|
|
104
|
+
this->shared,
|
|
103
105
|
this->listenInfo.ip,
|
|
104
106
|
Settings::configuration.rtcMinPort,
|
|
105
107
|
Settings::configuration.rtcMaxPort,
|
|
@@ -632,7 +634,7 @@ namespace RTC
|
|
|
632
634
|
}
|
|
633
635
|
|
|
634
636
|
inline void PipeTransport::OnPacketReceived(
|
|
635
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen)
|
|
637
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen, int64_t receivedAtUs)
|
|
636
638
|
{
|
|
637
639
|
MS_TRACE();
|
|
638
640
|
|
|
@@ -642,17 +644,17 @@ namespace RTC
|
|
|
642
644
|
// Check if it's RTCP.
|
|
643
645
|
if (RTC::RTCP::Packet::IsRtcp(data, len))
|
|
644
646
|
{
|
|
645
|
-
OnRtcpDataReceived(tuple, data, len);
|
|
647
|
+
OnRtcpDataReceived(tuple, data, len, receivedAtUs);
|
|
646
648
|
}
|
|
647
649
|
// Check if it's RTP.
|
|
648
650
|
else if (RTC::RTP::Packet::IsRtp(data, len))
|
|
649
651
|
{
|
|
650
|
-
OnRtpDataReceived(tuple, data, len, bufferLen);
|
|
652
|
+
OnRtpDataReceived(tuple, data, len, bufferLen, receivedAtUs);
|
|
651
653
|
}
|
|
652
654
|
// Check if it's SCTP.
|
|
653
655
|
else if (RTC::SCTP::Packet::IsSctp(data, len))
|
|
654
656
|
{
|
|
655
|
-
OnSctpDataReceived(tuple, data, len);
|
|
657
|
+
OnSctpDataReceived(tuple, data, len, receivedAtUs);
|
|
656
658
|
}
|
|
657
659
|
else
|
|
658
660
|
{
|
|
@@ -661,7 +663,7 @@ namespace RTC
|
|
|
661
663
|
}
|
|
662
664
|
|
|
663
665
|
inline void PipeTransport::OnRtpDataReceived(
|
|
664
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen)
|
|
666
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen, int64_t receivedAtUs)
|
|
665
667
|
{
|
|
666
668
|
MS_TRACE();
|
|
667
669
|
|
|
@@ -717,11 +719,11 @@ namespace RTC
|
|
|
717
719
|
}
|
|
718
720
|
|
|
719
721
|
// Pass the packet to the parent transport.
|
|
720
|
-
RTC::Transport::ReceiveRtpPacket(packet);
|
|
722
|
+
RTC::Transport::ReceiveRtpPacket(packet, receivedAtUs);
|
|
721
723
|
}
|
|
722
724
|
|
|
723
725
|
inline void PipeTransport::OnRtcpDataReceived(
|
|
724
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len)
|
|
726
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, int64_t receivedAtUs)
|
|
725
727
|
{
|
|
726
728
|
MS_TRACE();
|
|
727
729
|
|
|
@@ -754,11 +756,11 @@ namespace RTC
|
|
|
754
756
|
}
|
|
755
757
|
|
|
756
758
|
// Pass the packet to the parent transport.
|
|
757
|
-
RTC::Transport::ReceiveRtcpPacket(packet);
|
|
759
|
+
RTC::Transport::ReceiveRtcpPacket(packet, receivedAtUs);
|
|
758
760
|
}
|
|
759
761
|
|
|
760
762
|
inline void PipeTransport::OnSctpDataReceived(
|
|
761
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len)
|
|
763
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, int64_t receivedAtUs)
|
|
762
764
|
{
|
|
763
765
|
MS_TRACE();
|
|
764
766
|
|
|
@@ -776,7 +778,7 @@ namespace RTC
|
|
|
776
778
|
}
|
|
777
779
|
|
|
778
780
|
// Pass it to the parent transport.
|
|
779
|
-
RTC::Transport::ReceiveSctpData(data, len);
|
|
781
|
+
RTC::Transport::ReceiveSctpData(data, len, receivedAtUs);
|
|
780
782
|
}
|
|
781
783
|
|
|
782
784
|
inline void PipeTransport::OnUdpSocketPacketReceived(
|
|
@@ -784,12 +786,13 @@ namespace RTC
|
|
|
784
786
|
const uint8_t* data,
|
|
785
787
|
size_t len,
|
|
786
788
|
size_t bufferLen,
|
|
787
|
-
const struct sockaddr* remoteAddr
|
|
789
|
+
const struct sockaddr* remoteAddr,
|
|
790
|
+
int64_t receivedAtUs)
|
|
788
791
|
{
|
|
789
792
|
MS_TRACE();
|
|
790
793
|
|
|
791
794
|
RTC::TransportTuple tuple(socket, remoteAddr);
|
|
792
795
|
|
|
793
|
-
OnPacketReceived(&tuple, data, len, bufferLen);
|
|
796
|
+
OnPacketReceived(&tuple, data, len, bufferLen, receivedAtUs);
|
|
794
797
|
}
|
|
795
798
|
} // namespace RTC
|
|
@@ -22,11 +22,11 @@ namespace RTC
|
|
|
22
22
|
static constexpr size_t SrtpAesGcm256MasterKeyLength{ 32 };
|
|
23
23
|
static constexpr size_t SrtpAesGcm256MasterSaltLength{ 12 };
|
|
24
24
|
static constexpr size_t SrtpAesGcm256MasterLength{ SrtpAesGcm256MasterKeyLength +
|
|
25
|
-
|
|
25
|
+
SrtpAesGcm256MasterSaltLength };
|
|
26
26
|
static constexpr size_t SrtpAesGcm128MasterKeyLength{ 16 };
|
|
27
27
|
static constexpr size_t SrtpAesGcm128MasterSaltLength{ 12 };
|
|
28
28
|
static constexpr size_t SrtpAesGcm128MasterLength{ SrtpAesGcm128MasterKeyLength +
|
|
29
|
-
|
|
29
|
+
SrtpAesGcm128MasterSaltLength };
|
|
30
30
|
|
|
31
31
|
/* Class variables. */
|
|
32
32
|
|
|
@@ -159,6 +159,7 @@ namespace RTC
|
|
|
159
159
|
|
|
160
160
|
this->udpSocket = new RTC::UdpSocket(
|
|
161
161
|
this,
|
|
162
|
+
this->shared,
|
|
162
163
|
this->listenInfo.ip,
|
|
163
164
|
this->listenInfo.portRange.min,
|
|
164
165
|
this->listenInfo.portRange.max,
|
|
@@ -168,7 +169,7 @@ namespace RTC
|
|
|
168
169
|
else if (this->listenInfo.port != 0)
|
|
169
170
|
{
|
|
170
171
|
this->udpSocket = new RTC::UdpSocket(
|
|
171
|
-
this, this->listenInfo.ip, this->listenInfo.port, this->listenInfo.flags);
|
|
172
|
+
this, this->shared, this->listenInfo.ip, this->listenInfo.port, this->listenInfo.flags);
|
|
172
173
|
}
|
|
173
174
|
// NOTE: This is temporal to allow deprecated usage of worker port range.
|
|
174
175
|
// In the future this should throw since |port| or |portRange| will be
|
|
@@ -179,6 +180,7 @@ namespace RTC
|
|
|
179
180
|
|
|
180
181
|
this->udpSocket = new RTC::UdpSocket(
|
|
181
182
|
this,
|
|
183
|
+
this->shared,
|
|
182
184
|
this->listenInfo.ip,
|
|
183
185
|
Settings::configuration.rtcMinPort,
|
|
184
186
|
Settings::configuration.rtcMaxPort,
|
|
@@ -206,6 +208,7 @@ namespace RTC
|
|
|
206
208
|
|
|
207
209
|
this->rtcpUdpSocket = new RTC::UdpSocket(
|
|
208
210
|
this,
|
|
211
|
+
this->shared,
|
|
209
212
|
this->rtcpListenInfo.ip,
|
|
210
213
|
this->rtcpListenInfo.portRange.min,
|
|
211
214
|
this->rtcpListenInfo.portRange.max,
|
|
@@ -215,7 +218,11 @@ namespace RTC
|
|
|
215
218
|
else if (this->rtcpListenInfo.port != 0)
|
|
216
219
|
{
|
|
217
220
|
this->rtcpUdpSocket = new RTC::UdpSocket(
|
|
218
|
-
this,
|
|
221
|
+
this,
|
|
222
|
+
this->shared,
|
|
223
|
+
this->rtcpListenInfo.ip,
|
|
224
|
+
this->rtcpListenInfo.port,
|
|
225
|
+
this->rtcpListenInfo.flags);
|
|
219
226
|
}
|
|
220
227
|
// NOTE: This is temporal to allow deprecated usage of worker port range.
|
|
221
228
|
// In the future this should throw since |port| or |portRange| will be
|
|
@@ -226,6 +233,7 @@ namespace RTC
|
|
|
226
233
|
|
|
227
234
|
this->rtcpUdpSocket = new RTC::UdpSocket(
|
|
228
235
|
this,
|
|
236
|
+
this->shared,
|
|
229
237
|
this->rtcpListenInfo.ip,
|
|
230
238
|
Settings::configuration.rtcMinPort,
|
|
231
239
|
Settings::configuration.rtcMaxPort,
|
|
@@ -956,7 +964,7 @@ namespace RTC
|
|
|
956
964
|
}
|
|
957
965
|
|
|
958
966
|
inline void PlainTransport::OnPacketReceived(
|
|
959
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen)
|
|
967
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen, int64_t receivedAtUs)
|
|
960
968
|
{
|
|
961
969
|
MS_TRACE();
|
|
962
970
|
|
|
@@ -966,17 +974,17 @@ namespace RTC
|
|
|
966
974
|
// Check if it's RTCP.
|
|
967
975
|
if (RTC::RTCP::Packet::IsRtcp(data, len))
|
|
968
976
|
{
|
|
969
|
-
OnRtcpDataReceived(tuple, data, len);
|
|
977
|
+
OnRtcpDataReceived(tuple, data, len, receivedAtUs);
|
|
970
978
|
}
|
|
971
979
|
// Check if it's RTP.
|
|
972
980
|
else if (RTC::RTP::Packet::IsRtp(data, len))
|
|
973
981
|
{
|
|
974
|
-
OnRtpDataReceived(tuple, data, len, bufferLen);
|
|
982
|
+
OnRtpDataReceived(tuple, data, len, bufferLen, receivedAtUs);
|
|
975
983
|
}
|
|
976
984
|
// Check if it's SCTP.
|
|
977
985
|
else if (RTC::SCTP::Packet::IsSctp(data, len))
|
|
978
986
|
{
|
|
979
|
-
OnSctpDataReceived(tuple, data, len);
|
|
987
|
+
OnSctpDataReceived(tuple, data, len, receivedAtUs);
|
|
980
988
|
}
|
|
981
989
|
else
|
|
982
990
|
{
|
|
@@ -985,7 +993,7 @@ namespace RTC
|
|
|
985
993
|
}
|
|
986
994
|
|
|
987
995
|
inline void PlainTransport::OnRtpDataReceived(
|
|
988
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen)
|
|
996
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen, int64_t receivedAtUs)
|
|
989
997
|
{
|
|
990
998
|
MS_TRACE();
|
|
991
999
|
|
|
@@ -1077,11 +1085,11 @@ namespace RTC
|
|
|
1077
1085
|
}
|
|
1078
1086
|
|
|
1079
1087
|
// Pass the packet to the parent transport.
|
|
1080
|
-
RTC::Transport::ReceiveRtpPacket(packet);
|
|
1088
|
+
RTC::Transport::ReceiveRtpPacket(packet, receivedAtUs);
|
|
1081
1089
|
}
|
|
1082
1090
|
|
|
1083
1091
|
inline void PlainTransport::OnRtcpDataReceived(
|
|
1084
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len)
|
|
1092
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, int64_t receivedAtUs)
|
|
1085
1093
|
{
|
|
1086
1094
|
MS_TRACE();
|
|
1087
1095
|
|
|
@@ -1175,11 +1183,11 @@ namespace RTC
|
|
|
1175
1183
|
}
|
|
1176
1184
|
|
|
1177
1185
|
// Pass the packet to the parent transport.
|
|
1178
|
-
RTC::Transport::ReceiveRtcpPacket(packet);
|
|
1186
|
+
RTC::Transport::ReceiveRtcpPacket(packet, receivedAtUs);
|
|
1179
1187
|
}
|
|
1180
1188
|
|
|
1181
1189
|
inline void PlainTransport::OnSctpDataReceived(
|
|
1182
|
-
RTC::TransportTuple* tuple, const uint8_t* data, size_t len)
|
|
1190
|
+
RTC::TransportTuple* tuple, const uint8_t* data, size_t len, int64_t receivedAtUs)
|
|
1183
1191
|
{
|
|
1184
1192
|
MS_TRACE();
|
|
1185
1193
|
|
|
@@ -1223,7 +1231,7 @@ namespace RTC
|
|
|
1223
1231
|
}
|
|
1224
1232
|
|
|
1225
1233
|
// Pass it to the parent transport.
|
|
1226
|
-
RTC::Transport::ReceiveSctpData(data, len);
|
|
1234
|
+
RTC::Transport::ReceiveSctpData(data, len, receivedAtUs);
|
|
1227
1235
|
}
|
|
1228
1236
|
|
|
1229
1237
|
inline void PlainTransport::EmitTuple() const
|
|
@@ -1262,12 +1270,13 @@ namespace RTC
|
|
|
1262
1270
|
const uint8_t* data,
|
|
1263
1271
|
size_t len,
|
|
1264
1272
|
size_t bufferLen,
|
|
1265
|
-
const struct sockaddr* remoteAddr
|
|
1273
|
+
const struct sockaddr* remoteAddr,
|
|
1274
|
+
int64_t receivedAtUs)
|
|
1266
1275
|
{
|
|
1267
1276
|
MS_TRACE();
|
|
1268
1277
|
|
|
1269
1278
|
RTC::TransportTuple tuple(socket, remoteAddr);
|
|
1270
1279
|
|
|
1271
|
-
OnPacketReceived(&tuple, data, len, bufferLen);
|
|
1280
|
+
OnPacketReceived(&tuple, data, len, bufferLen, receivedAtUs);
|
|
1272
1281
|
}
|
|
1273
1282
|
} // namespace RTC
|