mediasoup 3.20.0 → 3.20.2
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/node/lib/Consumer.d.ts.map +1 -1
- package/node/lib/Consumer.js +5 -4
- package/node/lib/DataConsumer.d.ts +2 -3
- package/node/lib/DataConsumer.d.ts.map +1 -1
- package/node/lib/DataConsumer.js +10 -7
- package/node/lib/DataConsumerTypes.d.ts +5 -4
- package/node/lib/DataConsumerTypes.d.ts.map +1 -1
- package/node/lib/DataProducer.d.ts.map +1 -1
- package/node/lib/DataProducer.js +2 -1
- package/node/lib/PipeTransport.d.ts.map +1 -1
- package/node/lib/PipeTransport.js +5 -4
- package/node/lib/PlainTransport.d.ts.map +1 -1
- package/node/lib/PlainTransport.js +6 -5
- package/node/lib/Producer.d.ts.map +1 -1
- package/node/lib/Producer.js +4 -3
- package/node/lib/Router.js +1 -1
- package/node/lib/WebRtcTransport.d.ts.map +1 -1
- package/node/lib/WebRtcTransport.js +6 -5
- package/node/lib/fbs/consumer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/consumer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/degrade-request.js +124 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +24 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +102 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts +21 -0
- package/node/lib/fbs/data-consumer/send-response.d.ts.map +1 -0
- package/node/lib/fbs/data-consumer/send-response.js +91 -0
- package/node/lib/fbs/data-consumer.d.ts +1 -0
- package/node/lib/fbs/data-consumer.d.ts.map +1 -1
- package/node/lib/fbs/data-consumer.js +4 -1
- package/node/lib/fbs/producer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/producer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/producer/degrade-request.js +124 -0
- package/node/lib/fbs/response/body.d.ts +7 -5
- package/node/lib/fbs/response/body.d.ts.map +1 -1
- package/node/lib/fbs/response/body.js +7 -3
- package/node/lib/fbs/response/response.d.ts +3 -2
- package/node/lib/fbs/response/response.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +5 -5
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.js +102 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts +24 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-options-notification.js +102 -0
- package/node/lib/fbs/worker/close-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-notification.js +78 -0
- package/node/lib/fbs/worker/close-request.d.ts +18 -0
- package/node/lib/fbs/worker/close-request.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-request.js +78 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts +18 -0
- package/node/lib/fbs/worker/close-worker-notification.d.ts.map +1 -0
- package/node/lib/fbs/worker/close-worker-notification.js +78 -0
- package/node/lib/sctpParametersTypes.d.ts +23 -0
- package/node/lib/sctpParametersTypes.d.ts.map +1 -1
- package/node/lib/test/test-Consumer.js +194 -0
- package/node/lib/test/test-DataConsumer.js +6 -0
- package/node/lib/test/test-Router.js +11 -0
- package/node/lib/test/test-werift-sctp.js +7 -0
- package/npm-scripts.mjs +2 -2
- package/package.json +7 -6
- package/worker/Makefile +5 -1
- package/worker/deps/libwebrtc/meson.build +5 -1
- package/worker/fbs/dataConsumer.fbs +4 -0
- package/worker/fbs/response.fbs +1 -0
- package/worker/fuzzer/src/RTC/RTP/FuzzerPacket.cpp +2 -2
- package/worker/include/Channel/ChannelMessageRegistrator.hpp +4 -3
- package/worker/include/Channel/ChannelNotification.hpp +0 -4
- package/worker/include/Channel/ChannelRequest.hpp +3 -4
- package/worker/include/DepLibSRTP.hpp +2 -2
- package/worker/include/RTC/ActiveSpeakerObserver.hpp +2 -2
- package/worker/include/RTC/AudioLevelObserver.hpp +2 -2
- package/worker/include/RTC/Consumer.hpp +1 -1
- package/worker/include/RTC/DataConsumer.hpp +2 -2
- package/worker/include/RTC/DtlsTransport.hpp +4 -4
- package/worker/include/RTC/ICE/IceServer.hpp +2 -2
- package/worker/include/RTC/ICE/StunPacket.hpp +34 -34
- package/worker/include/RTC/KeyFrameRequestManager.hpp +3 -3
- package/worker/include/RTC/Parameters.hpp +2 -2
- package/worker/include/RTC/PipeConsumer.hpp +6 -5
- package/worker/include/RTC/PlainTransport.hpp +0 -1
- package/worker/include/RTC/PortManager.hpp +92 -12
- package/worker/include/RTC/Producer.hpp +7 -6
- package/worker/include/RTC/RTCP/Feedback.hpp +1 -2
- package/worker/include/RTC/RTCP/FeedbackRtpTransport.hpp +2 -2
- package/worker/include/RTC/RTCP/Packet.hpp +2 -2
- package/worker/include/RTC/RTCP/Sdes.hpp +1 -1
- package/worker/include/RTC/RTP/Codecs/DependencyDescriptor.hpp +2 -1
- package/worker/include/RTC/RTP/Packet.hpp +57 -57
- package/worker/include/RTC/RTP/ProbationGenerator.hpp +2 -2
- package/worker/include/RTC/RTP/SharedPacket.hpp +4 -4
- package/worker/include/RTC/Router.hpp +12 -11
- package/worker/include/RTC/RtcLogger.hpp +2 -2
- package/worker/include/RTC/RtpDictionaries.hpp +6 -6
- package/worker/include/RTC/RtpListener.hpp +4 -4
- package/worker/include/RTC/SCTP/association/Association.hpp +13 -13
- package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +2 -2
- package/worker/include/RTC/SCTP/association/NegotiatedCapabilities.hpp +2 -2
- package/worker/include/RTC/SCTP/association/PacketSender.hpp +3 -3
- package/worker/include/RTC/SCTP/association/StateCookie.hpp +9 -9
- package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +4 -4
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +24 -24
- package/worker/include/RTC/SCTP/association/TransmissionControlBlockContextInterface.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/Chunk.hpp +86 -86
- package/worker/include/RTC/SCTP/packet/ErrorCause.hpp +18 -18
- package/worker/include/RTC/SCTP/packet/Packet.hpp +33 -33
- package/worker/include/RTC/SCTP/packet/Parameter.hpp +24 -24
- package/worker/include/RTC/SCTP/packet/TLV.hpp +13 -13
- package/worker/include/RTC/SCTP/packet/UserData.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/chunks/AbortAssociationChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/AnyDataChunk.hpp +9 -9
- package/worker/include/RTC/SCTP/packet/chunks/AnyForwardTsnChunk.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/chunks/CookieAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/CookieEchoChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +11 -11
- package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatAckChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +8 -8
- package/worker/include/RTC/SCTP/packet/chunks/OperationErrorChunk.hpp +6 -6
- package/worker/include/RTC/SCTP/packet/chunks/ReConfigChunk.hpp +10 -10
- package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownAckChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/chunks/UnknownChunk.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/errorCauses/UnknownErrorCause.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/parameters/IPv4AddressParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/IPv6AddressParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/StateCookieParameter.hpp +5 -5
- package/worker/include/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/UnknownParameter.hpp +2 -2
- package/worker/include/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.hpp +4 -4
- package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationInterface.hpp +7 -7
- package/worker/include/RTC/SCTP/public/AssociationListenerInterface.hpp +26 -26
- package/worker/include/RTC/SCTP/public/AssociationMetrics.hpp +7 -7
- package/worker/include/RTC/SCTP/public/Message.hpp +1 -1
- package/worker/include/RTC/SCTP/public/SctpOptions.hpp +4 -4
- package/worker/include/RTC/SCTP/public/SctpTypes.hpp +10 -10
- package/worker/include/RTC/SCTP/rx/DataTracker.hpp +1 -1
- package/worker/include/RTC/SCTP/rx/ReassemblyStreamsInterface.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +39 -39
- package/worker/include/RTC/SCTP/tx/RetransmissionErrorCounter.hpp +1 -1
- package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +14 -14
- package/worker/include/RTC/SCTP/tx/RoundRobinSendQueue.hpp +1 -1
- package/worker/include/RTC/SctpListener.hpp +2 -2
- package/worker/include/RTC/SimulcastConsumer.hpp +2 -1
- package/worker/include/RTC/TcpServer.hpp +3 -2
- package/worker/include/RTC/Transport.hpp +8 -8
- package/worker/include/RTC/UdpSocket.hpp +3 -2
- package/worker/include/RTC/WebRtcServer.hpp +4 -5
- package/worker/include/RTC/WebRtcTransport.hpp +2 -2
- package/worker/include/Settings.hpp +3 -3
- package/worker/include/Worker.hpp +3 -3
- package/worker/include/handles/TcpServerHandle.hpp +2 -2
- package/worker/meson.build +9 -4
- package/worker/mocks/include/Channel/MockChannelMessageRegistrator.hpp +4 -3
- package/worker/src/Channel/ChannelNotification.cpp +5 -4
- package/worker/src/Channel/ChannelRequest.cpp +9 -6
- package/worker/src/DepLibSRTP.cpp +1 -1
- package/worker/src/RTC/AudioLevelObserver.cpp +2 -2
- package/worker/src/RTC/DataConsumer.cpp +13 -3
- package/worker/src/RTC/DataProducer.cpp +1 -1
- package/worker/src/RTC/DtlsTransport.cpp +3 -3
- package/worker/src/RTC/ICE/IceServer.cpp +1 -1
- package/worker/src/RTC/ICE/StunPacket.cpp +77 -77
- package/worker/src/RTC/PipeTransport.cpp +5 -4
- package/worker/src/RTC/PlainTransport.cpp +9 -8
- package/worker/src/RTC/PortManager.cpp +174 -114
- package/worker/src/RTC/Producer.cpp +0 -1
- package/worker/src/RTC/RTCP/Feedback.cpp +6 -6
- package/worker/src/RTC/RTCP/FeedbackPs.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsAfb.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsPli.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +2 -2
- package/worker/src/RTC/RTCP/FeedbackRtp.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpSrReq.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +2 -2
- package/worker/src/RTC/RTCP/Packet.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 +68 -68
- package/worker/src/RTC/RTP/ProbationGenerator.cpp +3 -3
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +3 -3
- package/worker/src/RTC/RTP/RtxStream.cpp +2 -2
- package/worker/src/RTC/RTP/SharedPacket.cpp +4 -4
- package/worker/src/RTC/Router.cpp +5 -5
- package/worker/src/RTC/RtcLogger.cpp +1 -1
- package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +4 -4
- package/worker/src/RTC/RtpDictionaries/RtpParameters.cpp +2 -3
- package/worker/src/RTC/SCTP/association/Association.cpp +100 -97
- package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +6 -6
- package/worker/src/RTC/SCTP/association/NegotiatedCapabilities.cpp +3 -3
- package/worker/src/RTC/SCTP/association/PacketSender.cpp +1 -1
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +2 -2
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +5 -5
- package/worker/src/RTC/SCTP/packet/Chunk.cpp +52 -52
- package/worker/src/RTC/SCTP/packet/ErrorCause.cpp +14 -14
- package/worker/src/RTC/SCTP/packet/Packet.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/Parameter.cpp +17 -17
- package/worker/src/RTC/SCTP/packet/TLV.cpp +8 -8
- package/worker/src/RTC/SCTP/packet/chunks/AbortAssociationChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/CookieAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/CookieEchoChunk.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/chunks/DataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatAckChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/IDataChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/InitAckChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/InitChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/OperationErrorChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ReConfigChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownAckChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/CookiePreservativeParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/IPv4AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IPv6AddressParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/parameters/StateCookieParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.cpp +3 -3
- package/worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp +1 -0
- package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +8 -8
- package/worker/src/RTC/SCTP/tx/RoundRobinSendQueue.cpp +1 -1
- package/worker/src/RTC/SvcConsumer.cpp +6 -2
- package/worker/src/RTC/TcpServer.cpp +4 -4
- package/worker/src/RTC/Transport.cpp +42 -19
- package/worker/src/RTC/UdpSocket.cpp +4 -4
- package/worker/src/RTC/WebRtcServer.cpp +8 -8
- package/worker/src/RTC/WebRtcTransport.cpp +9 -8
- package/worker/src/Settings.cpp +2 -2
- package/worker/src/lib.cpp +1 -2
- package/worker/subprojects/packagefiles/ankerl-unordered-dense/meson.build +5 -0
- package/worker/subprojects/unordered-dense.wrap +9 -0
- package/worker/tasks.py +293 -196
- package/worker/test/src/RTC/ICE/TestStunPacket.cpp +22 -22
- package/worker/test/src/RTC/ICE/iceCommon.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpEcn.cpp +8 -8
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpNack.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpSrReq.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTllei.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestFeedbackRtpTmmb.cpp +1 -1
- package/worker/test/src/RTC/RTCP/TestSenderReport.cpp +1 -1
- package/worker/test/src/RTC/RTP/TestPacket.cpp +26 -26
- package/worker/test/src/RTC/RTP/TestSharedPacket.cpp +1 -1
- package/worker/test/src/RTC/RTP/rtpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/association/TestNegotiatedCapabilities.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/TestPacket.cpp +14 -14
- package/worker/test/src/RTC/SCTP/packet/chunks/TestAbortAssociationChunk.cpp +4 -4
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieEchoChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatRequestChunk.cpp +9 -9
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIDataChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitAckChunk.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +8 -8
- package/worker/test/src/RTC/SCTP/packet/chunks/TestOperationErrorChunk.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/chunks/TestReConfigChunk.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownCompleteChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestUnknownChunk.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestCookieReceivedWhileShuttingDownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidMandatoryParameterErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidStreamIdentifierErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestMissingMandatoryParameterErrorCause.cpp +11 -11
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestNoUserDataErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestOutOfResourceErrorCause.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestProtocolViolationErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestRestartOfAnAssociationWithNewAddressesErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestStaleCookieErrorCause.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnknownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedChunkTypeErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnresolvableAddressErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUserInitiatedAbortErrorCause.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddIncomingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddOutgoingStreamsRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestCookiePreservativeParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestForwardTsnSupportedParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestHeartbeatInfoParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv4AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +7 -7
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIncomingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestOutgoingSsnResetRequestParameter.cpp +2 -2
- package/worker/test/src/RTC/SCTP/packet/parameters/TestReconfigurationResponseParameter.cpp +5 -5
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSsnTsnResetRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestStateCookieParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedAddressTypesParameter.cpp +6 -6
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedExtensionsParameter.cpp +3 -3
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnknownParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnrecognizedParameterParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestZeroChecksumAcceptableParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/sctpCommon.cpp +1 -1
- package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +3 -3
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionQueue.cpp +1 -1
- package/worker/test/src/RTC/TestNackGenerator.cpp +1 -1
- package/worker/test/src/RTC/TestPortManager.cpp +126 -0
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +2 -2
- package/worker/test/src/RTC/TestTransportTuple.cpp +3 -2
- package/worker/test/src/Utils/TestCrypto.cpp +3 -3
- package/worker/test/src/Utils/TestString.cpp +1 -1
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
if (parameterType != Parameter::ParameterType::COOKIE_PRESERVATIVE)
|
|
29
29
|
{
|
|
30
|
-
MS_WARN_DEV("invalid
|
|
30
|
+
MS_WARN_DEV("invalid parameter type");
|
|
31
31
|
|
|
32
32
|
return nullptr;
|
|
33
33
|
}
|
|
@@ -67,7 +67,7 @@ namespace RTC
|
|
|
67
67
|
{
|
|
68
68
|
MS_WARN_TAG(
|
|
69
69
|
sctp,
|
|
70
|
-
"CookiePreservativeParameter
|
|
70
|
+
"CookiePreservativeParameter length field must be %zu",
|
|
71
71
|
CookiePreservativeParameter::CookiePreservativeParameterHeaderLength);
|
|
72
72
|
|
|
73
73
|
return nullptr;
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
if (parameterType != Parameter::ParameterType::FORWARD_TSN_SUPPORTED)
|
|
29
29
|
{
|
|
30
|
-
MS_WARN_DEV("invalid
|
|
30
|
+
MS_WARN_DEV("invalid parameter type");
|
|
31
31
|
|
|
32
32
|
return nullptr;
|
|
33
33
|
}
|
|
@@ -64,7 +64,7 @@ namespace RTC
|
|
|
64
64
|
{
|
|
65
65
|
MS_WARN_TAG(
|
|
66
66
|
sctp,
|
|
67
|
-
"ForwardTsnSupportedParameter
|
|
67
|
+
"ForwardTsnSupportedParameter length field must be %zu",
|
|
68
68
|
Parameter::ParameterHeaderLength);
|
|
69
69
|
|
|
70
70
|
return nullptr;
|
|
@@ -28,7 +28,7 @@ namespace RTC
|
|
|
28
28
|
|
|
29
29
|
if (parameterType != Parameter::ParameterType::IPV4_ADDRESS)
|
|
30
30
|
{
|
|
31
|
-
MS_WARN_DEV("invalid
|
|
31
|
+
MS_WARN_DEV("invalid parameter type");
|
|
32
32
|
|
|
33
33
|
return nullptr;
|
|
34
34
|
}
|
|
@@ -68,7 +68,7 @@ namespace RTC
|
|
|
68
68
|
{
|
|
69
69
|
MS_WARN_TAG(
|
|
70
70
|
sctp,
|
|
71
|
-
"IPv4AddressParameter
|
|
71
|
+
"IPv4AddressParameter length field must be %zu",
|
|
72
72
|
IPv4AddressParameter::IPv4AddressParameterHeaderLength);
|
|
73
73
|
|
|
74
74
|
return nullptr;
|
|
@@ -28,7 +28,7 @@ namespace RTC
|
|
|
28
28
|
|
|
29
29
|
if (parameterType != Parameter::ParameterType::IPV6_ADDRESS)
|
|
30
30
|
{
|
|
31
|
-
MS_WARN_DEV("invalid
|
|
31
|
+
MS_WARN_DEV("invalid parameter type");
|
|
32
32
|
|
|
33
33
|
return nullptr;
|
|
34
34
|
}
|
|
@@ -68,7 +68,7 @@ namespace RTC
|
|
|
68
68
|
{
|
|
69
69
|
MS_WARN_TAG(
|
|
70
70
|
sctp,
|
|
71
|
-
"IPv6AddressParameter
|
|
71
|
+
"IPv6AddressParameter length field must be %zu",
|
|
72
72
|
IPv6AddressParameter::IPv6AddressParameterHeaderLength);
|
|
73
73
|
|
|
74
74
|
return nullptr;
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
if (parameterType != Parameter::ParameterType::INCOMING_SSN_RESET_REQUEST)
|
|
29
29
|
{
|
|
30
|
-
MS_WARN_DEV("invalid
|
|
30
|
+
MS_WARN_DEV("invalid parameter type");
|
|
31
31
|
|
|
32
32
|
return nullptr;
|
|
33
33
|
}
|
|
@@ -69,7 +69,7 @@ namespace RTC
|
|
|
69
69
|
{
|
|
70
70
|
MS_WARN_TAG(
|
|
71
71
|
sctp,
|
|
72
|
-
"IncomingSsnResetRequestParameter
|
|
72
|
+
"IncomingSsnResetRequestParameter length field must be equal or greater than %zu",
|
|
73
73
|
IncomingSsnResetRequestParameter::IncomingSsnResetRequestParameterHeaderLength);
|
|
74
74
|
|
|
75
75
|
return nullptr;
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
if (parameterType != Parameter::ParameterType::OUTGOING_SSN_RESET_REQUEST)
|
|
29
29
|
{
|
|
30
|
-
MS_WARN_DEV("invalid
|
|
30
|
+
MS_WARN_DEV("invalid parameter type");
|
|
31
31
|
|
|
32
32
|
return nullptr;
|
|
33
33
|
}
|
|
@@ -71,7 +71,7 @@ namespace RTC
|
|
|
71
71
|
{
|
|
72
72
|
MS_WARN_TAG(
|
|
73
73
|
sctp,
|
|
74
|
-
"OutgoingSsnResetRequestParameter
|
|
74
|
+
"OutgoingSsnResetRequestParameter length field must be equal or greater than %zu",
|
|
75
75
|
OutgoingSsnResetRequestParameter::OutgoingSsnResetRequestParameterHeaderLength);
|
|
76
76
|
|
|
77
77
|
return nullptr;
|
|
@@ -12,7 +12,7 @@ namespace RTC
|
|
|
12
12
|
/* Class variables. */
|
|
13
13
|
|
|
14
14
|
// clang-format off
|
|
15
|
-
const
|
|
15
|
+
const ankerl::unordered_dense::map<ReconfigurationResponseParameter::Result, std::string> ReconfigurationResponseParameter::Result2String =
|
|
16
16
|
{
|
|
17
17
|
{ ReconfigurationResponseParameter::Result::SUCCESS_NOTHING_TO_DO, "SUCCESS_NOTHING_TO_DO" },
|
|
18
18
|
{ ReconfigurationResponseParameter::Result::SUCCESS_PERFORMED, "SUCCESS_PERFORMED" },
|
|
@@ -42,7 +42,7 @@ namespace RTC
|
|
|
42
42
|
|
|
43
43
|
if (parameterType != Parameter::ParameterType::RECONFIGURATION_RESPONSE)
|
|
44
44
|
{
|
|
45
|
-
MS_WARN_DEV("invalid
|
|
45
|
+
MS_WARN_DEV("invalid parameter type");
|
|
46
46
|
|
|
47
47
|
return nullptr;
|
|
48
48
|
}
|
|
@@ -106,7 +106,7 @@ namespace RTC
|
|
|
106
106
|
{
|
|
107
107
|
MS_WARN_TAG(
|
|
108
108
|
sctp,
|
|
109
|
-
"ReconfigurationResponseParameter
|
|
109
|
+
"ReconfigurationResponseParameter length field must be %zu or %zu",
|
|
110
110
|
ReconfigurationResponseParameter::ReconfigurationResponseParameterHeaderLength,
|
|
111
111
|
ReconfigurationResponseParameter::ReconfigurationResponseParameterHeaderLengthWithOptionalFields);
|
|
112
112
|
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
if (parameterType != Parameter::ParameterType::SSN_TSN_RESET_REQUEST)
|
|
29
29
|
{
|
|
30
|
-
MS_WARN_DEV("invalid
|
|
30
|
+
MS_WARN_DEV("invalid parameter type");
|
|
31
31
|
|
|
32
32
|
return nullptr;
|
|
33
33
|
}
|
|
@@ -67,7 +67,7 @@ namespace RTC
|
|
|
67
67
|
{
|
|
68
68
|
MS_WARN_TAG(
|
|
69
69
|
sctp,
|
|
70
|
-
"SsnTsnResetRequestParameter
|
|
70
|
+
"SsnTsnResetRequestParameter length field must be %zu",
|
|
71
71
|
SsnTsnResetRequestParameter::SsnTsnResetRequestParameterHeaderLength);
|
|
72
72
|
|
|
73
73
|
return nullptr;
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
if (parameterType != Parameter::ParameterType::STATE_COOKIE)
|
|
29
29
|
{
|
|
30
|
-
MS_WARN_DEV("invalid
|
|
30
|
+
MS_WARN_DEV("invalid parameter type");
|
|
31
31
|
|
|
32
32
|
return nullptr;
|
|
33
33
|
}
|
|
@@ -127,11 +127,11 @@ namespace RTC
|
|
|
127
127
|
MS_TRACE();
|
|
128
128
|
|
|
129
129
|
// The buffer in which the StateCookie will be written starts at the
|
|
130
|
-
// position of the
|
|
130
|
+
// position of the cookie field in the StateCookieParameter.
|
|
131
131
|
auto* buffer = GetVariableLengthValuePointer();
|
|
132
132
|
// The available buffer length is the total buffer length of the
|
|
133
133
|
// StateCookieParameter minus its fixed header length (no matter there
|
|
134
|
-
// was a
|
|
134
|
+
// was a cookie already in the parameter since we are overriding it
|
|
135
135
|
// anyway).
|
|
136
136
|
const size_t bufferLength = GetBufferLength() - Parameter::ParameterHeaderLength;
|
|
137
137
|
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
|
|
28
28
|
if (parameterType != Parameter::ParameterType::SUPPORTED_ADDRESS_TYPES)
|
|
29
29
|
{
|
|
30
|
-
MS_WARN_DEV("invalid
|
|
30
|
+
MS_WARN_DEV("invalid parameter type");
|
|
31
31
|
|
|
32
32
|
return nullptr;
|
|
33
33
|
}
|
|
@@ -64,10 +64,10 @@ namespace RTC
|
|
|
64
64
|
auto* parameter =
|
|
65
65
|
new SupportedAddressTypesParameter(const_cast<uint8_t*>(buffer), bufferLength);
|
|
66
66
|
|
|
67
|
-
// Here we must validate that
|
|
67
|
+
// Here we must validate that length field is even.
|
|
68
68
|
if (parameter->GetLengthField() % 2 != 0)
|
|
69
69
|
{
|
|
70
|
-
MS_WARN_TAG(sctp, "wrong
|
|
70
|
+
MS_WARN_TAG(sctp, "wrong length value (not even)");
|
|
71
71
|
|
|
72
72
|
delete parameter;
|
|
73
73
|
return nullptr;
|
|
@@ -12,7 +12,7 @@ namespace RTC
|
|
|
12
12
|
/* Class variables. */
|
|
13
13
|
|
|
14
14
|
// clang-format off
|
|
15
|
-
const
|
|
15
|
+
const ankerl::unordered_dense::map<ZeroChecksumAcceptableParameter::AlternateErrorDetectionMethod, std::string> ZeroChecksumAcceptableParameter::AlternateErrorDetectionMethod2String =
|
|
16
16
|
{
|
|
17
17
|
{ ZeroChecksumAcceptableParameter::AlternateErrorDetectionMethod::NONE, "NONE" },
|
|
18
18
|
{ ZeroChecksumAcceptableParameter::AlternateErrorDetectionMethod::SCTP_OVER_DTLS, "SCTP_OVER_DTLS" },
|
|
@@ -37,7 +37,7 @@ namespace RTC
|
|
|
37
37
|
|
|
38
38
|
if (parameterType != Parameter::ParameterType::ZERO_CHECKSUM_ACCEPTABLE)
|
|
39
39
|
{
|
|
40
|
-
MS_WARN_DEV("invalid
|
|
40
|
+
MS_WARN_DEV("invalid parameter type");
|
|
41
41
|
|
|
42
42
|
return nullptr;
|
|
43
43
|
}
|
|
@@ -79,7 +79,7 @@ namespace RTC
|
|
|
79
79
|
{
|
|
80
80
|
MS_WARN_TAG(
|
|
81
81
|
sctp,
|
|
82
|
-
"ZeroChecksumAcceptableParameter
|
|
82
|
+
"ZeroChecksumAcceptableParameter length field must be %zu",
|
|
83
83
|
ZeroChecksumAcceptableParameter::ZeroChecksumAcceptableParameterHeaderLength);
|
|
84
84
|
|
|
85
85
|
return nullptr;
|
|
@@ -125,7 +125,7 @@ namespace RTC
|
|
|
125
125
|
// ACK packets reported in the gap ack blocks.
|
|
126
126
|
AckGapBlocks(cumulativeTsnAck, gapAckBlocks, ackInfo);
|
|
127
127
|
|
|
128
|
-
// NACK and possibly mark for retransmit
|
|
128
|
+
// NACK and possibly mark for retransmit chunks that weren't acked.
|
|
129
129
|
NackBetweenAckBlocks(
|
|
130
130
|
cumulativeTsnAck, gapAckBlocks, isInFastRecovery, cumulativeTsnAckAdvanced, ackInfo);
|
|
131
131
|
|
|
@@ -185,7 +185,7 @@ namespace RTC
|
|
|
185
185
|
tsn.Increment();
|
|
186
186
|
|
|
187
187
|
// Chunks that are nacked can be expired. Care should be taken not to
|
|
188
|
-
// expire unacked (in-flight)
|
|
188
|
+
// expire unacked (in-flight) chunks as they might have been received,
|
|
189
189
|
// but the SACK is either delayed or in-flight and may be received
|
|
190
190
|
// later.
|
|
191
191
|
if (item.IsAbandoned())
|
|
@@ -198,7 +198,7 @@ namespace RTC
|
|
|
198
198
|
}
|
|
199
199
|
else
|
|
200
200
|
{
|
|
201
|
-
// A non-expired
|
|
201
|
+
// A non-expired chunk. No need to iterate any further.
|
|
202
202
|
break;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
@@ -212,7 +212,7 @@ namespace RTC
|
|
|
212
212
|
|
|
213
213
|
MS_WARN_TAG(
|
|
214
214
|
sctp,
|
|
215
|
-
"marking nacked
|
|
215
|
+
"marking nacked chunk %" PRIu32 " and message %" PRIu32 " as expired",
|
|
216
216
|
tsnToExpire.Wrap(),
|
|
217
217
|
item.GetData().GetMessageId());
|
|
218
218
|
|
|
@@ -239,7 +239,7 @@ namespace RTC
|
|
|
239
239
|
{
|
|
240
240
|
MS_TRACE();
|
|
241
241
|
|
|
242
|
-
// All
|
|
242
|
+
// All chunks are always padded to be even divisible by 4.
|
|
243
243
|
const size_t chunkLength = GetSerializedChunkLength(data);
|
|
244
244
|
|
|
245
245
|
this->unackedPayloadBytes += data.GetPayloadLength();
|
|
@@ -255,7 +255,7 @@ namespace RTC
|
|
|
255
255
|
// No need to send it, it was expired when it was in the send queue.
|
|
256
256
|
MS_WARN_TAG(
|
|
257
257
|
sctp,
|
|
258
|
-
"marking freshly produced
|
|
258
|
+
"marking freshly produced chunk %" PRIu32 " and message %" PRIu32 " as expired",
|
|
259
259
|
tsn.Wrap(),
|
|
260
260
|
item.GetData().GetMessageId());
|
|
261
261
|
|
|
@@ -777,7 +777,7 @@ namespace RTC
|
|
|
777
777
|
/*expiresAtMs*/ Types::ExpiresAtMsInfinite,
|
|
778
778
|
/*lifecycleId*/ std::nullopt);
|
|
779
779
|
|
|
780
|
-
// The added
|
|
780
|
+
// The added chunk shouldn't be included in `this->unackedPacketBytes`,
|
|
781
781
|
// so set it as acked.
|
|
782
782
|
addedItem.Ack();
|
|
783
783
|
|
|
@@ -794,7 +794,7 @@ namespace RTC
|
|
|
794
794
|
!other.IsAbandoned() && other.GetData().GetStreamId() == item.GetData().GetStreamId() &&
|
|
795
795
|
other.GetOutgoingMessageId() == item.GetOutgoingMessageId())
|
|
796
796
|
{
|
|
797
|
-
MS_WARN_TAG(sctp, "marking
|
|
797
|
+
MS_WARN_TAG(sctp, "marking chunk %" PRIu32 " as abandoned", tsn.Wrap());
|
|
798
798
|
|
|
799
799
|
if (other.ShouldBeRetransmitted())
|
|
800
800
|
{
|
|
@@ -423,7 +423,7 @@ namespace RTC
|
|
|
423
423
|
Item& item = this->items.front();
|
|
424
424
|
Message& message = item.message;
|
|
425
425
|
|
|
426
|
-
// Allocate
|
|
426
|
+
// Allocate message ID and SSN when the first fragment is sent.
|
|
427
427
|
if (!item.mid.has_value())
|
|
428
428
|
{
|
|
429
429
|
// This entire message has already expired. Try the next one.
|
|
@@ -48,15 +48,19 @@ namespace RTC
|
|
|
48
48
|
// Set preferredLayers (if given).
|
|
49
49
|
if (flatbuffers::IsFieldPresent(data, FBS::Transport::ConsumeRequest::VT_PREFERREDLAYERS))
|
|
50
50
|
{
|
|
51
|
-
|
|
51
|
+
const auto* preferredLayers = data->preferredLayers();
|
|
52
|
+
|
|
53
|
+
this->preferredLayers.spatial = preferredLayers->spatialLayer();
|
|
52
54
|
|
|
53
55
|
if (this->preferredLayers.spatial > encoding.spatialLayers - 1)
|
|
54
56
|
{
|
|
55
57
|
this->preferredLayers.spatial = static_cast<int16_t>(encoding.spatialLayers - 1);
|
|
56
58
|
}
|
|
57
59
|
|
|
58
|
-
if (
|
|
60
|
+
if (auto preferredTemporalLayer = preferredLayers->temporalLayer(); preferredTemporalLayer.has_value())
|
|
59
61
|
{
|
|
62
|
+
this->preferredLayers.temporal = preferredTemporalLayer.value();
|
|
63
|
+
|
|
60
64
|
if (this->preferredLayers.temporal > encoding.temporalLayers - 1)
|
|
61
65
|
{
|
|
62
66
|
this->preferredLayers.temporal = static_cast<int16_t>(encoding.temporalLayers - 1);
|
|
@@ -36,16 +36,16 @@ namespace RTC
|
|
|
36
36
|
uint16_t minPort,
|
|
37
37
|
uint16_t maxPort,
|
|
38
38
|
RTC::Transport::SocketFlags& flags,
|
|
39
|
-
|
|
39
|
+
RTC::PortManager::PortRangeKey& portRangeKey)
|
|
40
40
|
: // This may throw.
|
|
41
41
|
::TcpServerHandle::TcpServerHandle(
|
|
42
|
-
RTC::PortManager::BindTcp(ip, minPort, maxPort, flags,
|
|
42
|
+
RTC::PortManager::BindTcp(ip, minPort, maxPort, flags, portRangeKey)),
|
|
43
43
|
listener(listener),
|
|
44
44
|
connListener(connListener)
|
|
45
45
|
{
|
|
46
46
|
MS_TRACE();
|
|
47
47
|
|
|
48
|
-
this->
|
|
48
|
+
this->portRangeKey = portRangeKey;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
TcpServer::~TcpServer()
|
|
@@ -54,7 +54,7 @@ namespace RTC
|
|
|
54
54
|
|
|
55
55
|
if (!this->fixedPort)
|
|
56
56
|
{
|
|
57
|
-
RTC::PortManager::Unbind(this->
|
|
57
|
+
RTC::PortManager::Unbind(this->portRangeKey, this->localPort);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -145,7 +145,7 @@ namespace RTC
|
|
|
145
145
|
|
|
146
146
|
// NOTE: We don't close `this->sctpAssociation` here since the
|
|
147
147
|
// `SetDestroying()` method has already been called by the Transport
|
|
148
|
-
// subclass and it closed the SCTP
|
|
148
|
+
// subclass and it closed the SCTP association.
|
|
149
149
|
//
|
|
150
150
|
// NOTE: We cannot do it here in the destructor because here we are no longer
|
|
151
151
|
// the Transport subclass but Transport parent (this is how the destruction
|
|
@@ -1483,7 +1483,7 @@ namespace RTC
|
|
|
1483
1483
|
|
|
1484
1484
|
if (this->sctpAssociation)
|
|
1485
1485
|
{
|
|
1486
|
-
// NOTE: We don't invoke `Shutdown()` but `Close()` in the SCTP
|
|
1486
|
+
// NOTE: We don't invoke `Shutdown()` but `Close()` in the SCTP association
|
|
1487
1487
|
// because at this point we are closing everything and we won't have any
|
|
1488
1488
|
// chance to complete the SCTP SHUTDOWN + SHUTDOWN_ACK + SHUTDOWN_COMPLETE
|
|
1489
1489
|
// dance, so we invoke `Close()` which just sends a SCTP ABORT.
|
|
@@ -1999,7 +1999,7 @@ namespace RTC
|
|
|
1999
1999
|
{
|
|
2000
2000
|
MS_DEBUG_TAG(
|
|
2001
2001
|
rtcp,
|
|
2002
|
-
"no Consumer found for received PLI
|
|
2002
|
+
"no Consumer found for received PLI feedback packet "
|
|
2003
2003
|
"[sender ssrc:%" PRIu32 ", media ssrc:%" PRIu32 "]",
|
|
2004
2004
|
feedback->GetSenderSsrc(),
|
|
2005
2005
|
feedback->GetMediaSsrc());
|
|
@@ -2038,7 +2038,7 @@ namespace RTC
|
|
|
2038
2038
|
{
|
|
2039
2039
|
MS_DEBUG_TAG(
|
|
2040
2040
|
rtcp,
|
|
2041
|
-
"no Consumer found for received FIR
|
|
2041
|
+
"no Consumer found for received FIR feedback packet "
|
|
2042
2042
|
"[sender ssrc:%" PRIu32 ", media ssrc:%" PRIu32 ", item ssrc:%" PRIu32 "]",
|
|
2043
2043
|
feedback->GetSenderSsrc(),
|
|
2044
2044
|
feedback->GetMediaSsrc(),
|
|
@@ -2082,7 +2082,7 @@ namespace RTC
|
|
|
2082
2082
|
{
|
|
2083
2083
|
MS_DEBUG_TAG(
|
|
2084
2084
|
rtcp,
|
|
2085
|
-
"ignoring unsupported %s
|
|
2085
|
+
"ignoring unsupported %s feedback PS AFB packet "
|
|
2086
2086
|
"[sender ssrc:%" PRIu32 ", media ssrc:%" PRIu32 "]",
|
|
2087
2087
|
RTC::RTCP::FeedbackPsPacket::MessageTypeToString(feedback->GetMessageType()).c_str(),
|
|
2088
2088
|
feedback->GetSenderSsrc(),
|
|
@@ -2096,7 +2096,7 @@ namespace RTC
|
|
|
2096
2096
|
{
|
|
2097
2097
|
MS_DEBUG_TAG(
|
|
2098
2098
|
rtcp,
|
|
2099
|
-
"ignoring unsupported %s
|
|
2099
|
+
"ignoring unsupported %s feedback packet "
|
|
2100
2100
|
"[sender ssrc:%" PRIu32 ", media ssrc:%" PRIu32 "]",
|
|
2101
2101
|
RTC::RTCP::FeedbackPsPacket::MessageTypeToString(feedback->GetMessageType()).c_str(),
|
|
2102
2102
|
feedback->GetSenderSsrc(),
|
|
@@ -2121,7 +2121,7 @@ namespace RTC
|
|
|
2121
2121
|
{
|
|
2122
2122
|
MS_DEBUG_TAG(
|
|
2123
2123
|
rtcp,
|
|
2124
|
-
"no Consumer found for received
|
|
2124
|
+
"no Consumer found for received feedback packet "
|
|
2125
2125
|
"[sender ssrc:%" PRIu32 ", media ssrc:%" PRIu32 "]",
|
|
2126
2126
|
feedback->GetSenderSsrc(),
|
|
2127
2127
|
feedback->GetMediaSsrc());
|
|
@@ -2137,7 +2137,7 @@ namespace RTC
|
|
|
2137
2137
|
{
|
|
2138
2138
|
MS_DEBUG_TAG(
|
|
2139
2139
|
rtcp,
|
|
2140
|
-
"no Consumer found for received NACK
|
|
2140
|
+
"no Consumer found for received NACK feedback packet "
|
|
2141
2141
|
"[sender ssrc:%" PRIu32 ", media ssrc:%" PRIu32 "]",
|
|
2142
2142
|
feedback->GetSenderSsrc(),
|
|
2143
2143
|
feedback->GetMediaSsrc());
|
|
@@ -2176,7 +2176,7 @@ namespace RTC
|
|
|
2176
2176
|
{
|
|
2177
2177
|
MS_DEBUG_TAG(
|
|
2178
2178
|
rtcp,
|
|
2179
|
-
"ignoring unsupported %s
|
|
2179
|
+
"ignoring unsupported %s feedback packet "
|
|
2180
2180
|
"[sender ssrc:%" PRIu32 ", media ssrc:%" PRIu32 "]",
|
|
2181
2181
|
RTC::RTCP::FeedbackRtpPacket::MessageTypeToString(feedback->GetMessageType()).c_str(),
|
|
2182
2182
|
feedback->GetSenderSsrc(),
|
|
@@ -3058,13 +3058,26 @@ namespace RTC
|
|
|
3058
3058
|
|
|
3059
3059
|
const auto errorKindStringView = RTC::SCTP::Types::ErrorKindToString(errorKind);
|
|
3060
3060
|
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3061
|
+
if (errorKind == RTC::SCTP::Types::ErrorKind::SUCCESS || errorKind == RTC::SCTP::Types::ErrorKind::PEER_REPORTED)
|
|
3062
|
+
{
|
|
3063
|
+
MS_DEBUG_TAG(
|
|
3064
|
+
sctp,
|
|
3065
|
+
"SCTP association failed [errorKind:%.*s, message:%.*s]",
|
|
3066
|
+
static_cast<int>(errorKindStringView.size()),
|
|
3067
|
+
errorKindStringView.data(),
|
|
3068
|
+
static_cast<int>(errorMessage.size()),
|
|
3069
|
+
errorMessage.data());
|
|
3070
|
+
}
|
|
3071
|
+
else
|
|
3072
|
+
{
|
|
3073
|
+
MS_WARN_TAG(
|
|
3074
|
+
sctp,
|
|
3075
|
+
"SCTP association failed [errorKind:%.*s, message:%.*s]",
|
|
3076
|
+
static_cast<int>(errorKindStringView.size()),
|
|
3077
|
+
errorKindStringView.data(),
|
|
3078
|
+
static_cast<int>(errorMessage.size()),
|
|
3079
|
+
errorMessage.data());
|
|
3080
|
+
}
|
|
3068
3081
|
|
|
3069
3082
|
// Tell all DataConsumers.
|
|
3070
3083
|
for (auto& kv : this->mapDataConsumers)
|
|
@@ -3093,10 +3106,20 @@ namespace RTC
|
|
|
3093
3106
|
{
|
|
3094
3107
|
MS_TRACE();
|
|
3095
3108
|
|
|
3096
|
-
|
|
3097
|
-
{
|
|
3098
|
-
const auto errorKindStringView = RTC::SCTP::Types::ErrorKindToString(errorKind);
|
|
3109
|
+
const auto errorKindStringView = RTC::SCTP::Types::ErrorKindToString(errorKind);
|
|
3099
3110
|
|
|
3111
|
+
if (errorKind == RTC::SCTP::Types::ErrorKind::SUCCESS || errorKind == RTC::SCTP::Types::ErrorKind::PEER_REPORTED)
|
|
3112
|
+
{
|
|
3113
|
+
MS_DEBUG_TAG(
|
|
3114
|
+
sctp,
|
|
3115
|
+
"SCTP association closed [errorKind:%.*s, message:%.*s]",
|
|
3116
|
+
static_cast<int>(errorKindStringView.size()),
|
|
3117
|
+
errorKindStringView.data(),
|
|
3118
|
+
static_cast<int>(errorMessage.size()),
|
|
3119
|
+
errorMessage.data());
|
|
3120
|
+
}
|
|
3121
|
+
else
|
|
3122
|
+
{
|
|
3100
3123
|
MS_WARN_TAG(
|
|
3101
3124
|
sctp,
|
|
3102
3125
|
"SCTP association closed [errorKind:%.*s, message:%.*s]",
|
|
@@ -26,15 +26,15 @@ namespace RTC
|
|
|
26
26
|
uint16_t minPort,
|
|
27
27
|
uint16_t maxPort,
|
|
28
28
|
RTC::Transport::SocketFlags& flags,
|
|
29
|
-
|
|
29
|
+
RTC::PortManager::PortRangeKey& portRangeKey)
|
|
30
30
|
: // This may throw.
|
|
31
31
|
::UdpSocketHandle::UdpSocketHandle(
|
|
32
|
-
RTC::PortManager::BindUdp(ip, minPort, maxPort, flags,
|
|
32
|
+
RTC::PortManager::BindUdp(ip, minPort, maxPort, flags, portRangeKey)),
|
|
33
33
|
listener(listener)
|
|
34
34
|
{
|
|
35
35
|
MS_TRACE();
|
|
36
36
|
|
|
37
|
-
this->
|
|
37
|
+
this->portRangeKey = portRangeKey;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
UdpSocket::~UdpSocket()
|
|
@@ -43,7 +43,7 @@ namespace RTC
|
|
|
43
43
|
|
|
44
44
|
if (!this->fixedPort)
|
|
45
45
|
{
|
|
46
|
-
RTC::PortManager::Unbind(this->
|
|
46
|
+
RTC::PortManager::Unbind(this->portRangeKey, this->localPort);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -96,7 +96,7 @@ namespace RTC
|
|
|
96
96
|
|
|
97
97
|
if (listenInfo->portRange()->min() != 0 && listenInfo->portRange()->max() != 0)
|
|
98
98
|
{
|
|
99
|
-
|
|
99
|
+
RTC::PortManager::PortRangeKey portRangeKey{};
|
|
100
100
|
|
|
101
101
|
udpSocket = new RTC::UdpSocket(
|
|
102
102
|
this,
|
|
@@ -104,7 +104,7 @@ namespace RTC
|
|
|
104
104
|
listenInfo->portRange()->min(),
|
|
105
105
|
listenInfo->portRange()->max(),
|
|
106
106
|
flags,
|
|
107
|
-
|
|
107
|
+
portRangeKey);
|
|
108
108
|
}
|
|
109
109
|
else if (listenInfo->port() != 0)
|
|
110
110
|
{
|
|
@@ -115,7 +115,7 @@ namespace RTC
|
|
|
115
115
|
// required.
|
|
116
116
|
else
|
|
117
117
|
{
|
|
118
|
-
|
|
118
|
+
RTC::PortManager::PortRangeKey portRangeKey{};
|
|
119
119
|
|
|
120
120
|
udpSocket = new RTC::UdpSocket(
|
|
121
121
|
this,
|
|
@@ -123,7 +123,7 @@ namespace RTC
|
|
|
123
123
|
Settings::configuration.rtcMinPort,
|
|
124
124
|
Settings::configuration.rtcMaxPort,
|
|
125
125
|
flags,
|
|
126
|
-
|
|
126
|
+
portRangeKey);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
this->udpSocketOrTcpServers.emplace_back(
|
|
@@ -152,7 +152,7 @@ namespace RTC
|
|
|
152
152
|
|
|
153
153
|
if (listenInfo->portRange()->min() != 0 && listenInfo->portRange()->max() != 0)
|
|
154
154
|
{
|
|
155
|
-
|
|
155
|
+
RTC::PortManager::PortRangeKey portRangeKey{};
|
|
156
156
|
|
|
157
157
|
tcpServer = new RTC::TcpServer(
|
|
158
158
|
this,
|
|
@@ -161,7 +161,7 @@ namespace RTC
|
|
|
161
161
|
listenInfo->portRange()->min(),
|
|
162
162
|
listenInfo->portRange()->max(),
|
|
163
163
|
flags,
|
|
164
|
-
|
|
164
|
+
portRangeKey);
|
|
165
165
|
}
|
|
166
166
|
else if (listenInfo->port() != 0)
|
|
167
167
|
{
|
|
@@ -172,7 +172,7 @@ namespace RTC
|
|
|
172
172
|
// required.
|
|
173
173
|
else
|
|
174
174
|
{
|
|
175
|
-
|
|
175
|
+
RTC::PortManager::PortRangeKey portRangeKey{};
|
|
176
176
|
|
|
177
177
|
tcpServer = new RTC::TcpServer(
|
|
178
178
|
this,
|
|
@@ -181,7 +181,7 @@ namespace RTC
|
|
|
181
181
|
Settings::configuration.rtcMinPort,
|
|
182
182
|
Settings::configuration.rtcMaxPort,
|
|
183
183
|
flags,
|
|
184
|
-
|
|
184
|
+
portRangeKey);
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
this->udpSocketOrTcpServers.emplace_back(
|