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
|
@@ -241,6 +241,111 @@ const ctx = {
|
|
|
241
241
|
},
|
|
242
242
|
],
|
|
243
243
|
}),
|
|
244
|
+
vpxMediaCodecs: utils.deepFreeze([
|
|
245
|
+
{
|
|
246
|
+
kind: 'video',
|
|
247
|
+
mimeType: 'video/VP8',
|
|
248
|
+
clockRate: 90000,
|
|
249
|
+
rtcpFeedback: [
|
|
250
|
+
{ type: 'nack', parameter: '' },
|
|
251
|
+
{ type: 'nack', parameter: 'pli' },
|
|
252
|
+
{ type: 'ccm', parameter: 'fir' },
|
|
253
|
+
{ type: 'goog-remb', parameter: '' },
|
|
254
|
+
],
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
kind: 'video',
|
|
258
|
+
mimeType: 'video/VP9',
|
|
259
|
+
clockRate: 90000,
|
|
260
|
+
rtcpFeedback: [
|
|
261
|
+
{ type: 'nack', parameter: '' },
|
|
262
|
+
{ type: 'nack', parameter: 'pli' },
|
|
263
|
+
{ type: 'ccm', parameter: 'fir' },
|
|
264
|
+
{ type: 'goog-remb', parameter: '' },
|
|
265
|
+
],
|
|
266
|
+
},
|
|
267
|
+
]),
|
|
268
|
+
vp9SvcProducerOptions: utils.deepFreeze({
|
|
269
|
+
kind: 'video',
|
|
270
|
+
rtpParameters: {
|
|
271
|
+
mid: 'VIDEOSVC',
|
|
272
|
+
codecs: [
|
|
273
|
+
{
|
|
274
|
+
mimeType: 'video/VP9',
|
|
275
|
+
payloadType: 96,
|
|
276
|
+
clockRate: 90000,
|
|
277
|
+
parameters: {},
|
|
278
|
+
rtcpFeedback: [
|
|
279
|
+
{ type: 'nack', parameter: '' },
|
|
280
|
+
{ type: 'nack', parameter: 'pli' },
|
|
281
|
+
{ type: 'ccm', parameter: 'fir' },
|
|
282
|
+
{ type: 'goog-remb', parameter: '' },
|
|
283
|
+
],
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
headerExtensions: [],
|
|
287
|
+
encodings: [{ ssrc: 33333333, scalabilityMode: 'L3T3' }],
|
|
288
|
+
rtcp: { cname: 'FOOBAR' },
|
|
289
|
+
},
|
|
290
|
+
appData: { foo: 1, bar: '2' },
|
|
291
|
+
}),
|
|
292
|
+
vp8SimulcastProducerOptions: utils.deepFreeze({
|
|
293
|
+
kind: 'video',
|
|
294
|
+
rtpParameters: {
|
|
295
|
+
mid: 'VIDEOVP8',
|
|
296
|
+
codecs: [
|
|
297
|
+
{
|
|
298
|
+
mimeType: 'video/VP8',
|
|
299
|
+
payloadType: 96,
|
|
300
|
+
clockRate: 90000,
|
|
301
|
+
parameters: {},
|
|
302
|
+
rtcpFeedback: [
|
|
303
|
+
{ type: 'nack', parameter: '' },
|
|
304
|
+
{ type: 'nack', parameter: 'pli' },
|
|
305
|
+
{ type: 'ccm', parameter: 'fir' },
|
|
306
|
+
{ type: 'goog-remb', parameter: '' },
|
|
307
|
+
],
|
|
308
|
+
},
|
|
309
|
+
],
|
|
310
|
+
headerExtensions: [],
|
|
311
|
+
encodings: [
|
|
312
|
+
{ ssrc: 44444441, scalabilityMode: 'L1T5' },
|
|
313
|
+
{ ssrc: 44444442, scalabilityMode: 'L1T5' },
|
|
314
|
+
{ ssrc: 44444443, scalabilityMode: 'L1T5' },
|
|
315
|
+
],
|
|
316
|
+
rtcp: { cname: 'FOOBAR' },
|
|
317
|
+
},
|
|
318
|
+
appData: { foo: 1, bar: '2' },
|
|
319
|
+
}),
|
|
320
|
+
vpxConsumerDeviceCapabilities: utils.deepFreeze({
|
|
321
|
+
codecs: [
|
|
322
|
+
{
|
|
323
|
+
kind: 'video',
|
|
324
|
+
mimeType: 'video/VP8',
|
|
325
|
+
preferredPayloadType: 101,
|
|
326
|
+
clockRate: 90000,
|
|
327
|
+
rtcpFeedback: [
|
|
328
|
+
{ type: 'nack', parameter: '' },
|
|
329
|
+
{ type: 'nack', parameter: 'pli' },
|
|
330
|
+
{ type: 'ccm', parameter: 'fir' },
|
|
331
|
+
{ type: 'goog-remb', parameter: '' },
|
|
332
|
+
],
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
kind: 'video',
|
|
336
|
+
mimeType: 'video/VP9',
|
|
337
|
+
preferredPayloadType: 102,
|
|
338
|
+
clockRate: 90000,
|
|
339
|
+
rtcpFeedback: [
|
|
340
|
+
{ type: 'nack', parameter: '' },
|
|
341
|
+
{ type: 'nack', parameter: 'pli' },
|
|
342
|
+
{ type: 'ccm', parameter: 'fir' },
|
|
343
|
+
{ type: 'goog-remb', parameter: '' },
|
|
344
|
+
],
|
|
345
|
+
},
|
|
346
|
+
],
|
|
347
|
+
headerExtensions: [],
|
|
348
|
+
}),
|
|
244
349
|
};
|
|
245
350
|
beforeEach(async () => {
|
|
246
351
|
ctx.worker = await mediasoup.createWorker();
|
|
@@ -822,6 +927,95 @@ test('consumer.setPreferredLayers() with wrong arguments rejects with TypeError'
|
|
|
822
927
|
// @ts-expect-error --- Testing purposes.
|
|
823
928
|
videoConsumer.setPreferredLayers({ temporalLayer: 2 })).rejects.toThrow(TypeError);
|
|
824
929
|
}, 2000);
|
|
930
|
+
test('transport.consume() for an SVC producer honors preferredLayers', async () => {
|
|
931
|
+
const router = await ctx.worker.createRouter({
|
|
932
|
+
mediaCodecs: ctx.vpxMediaCodecs,
|
|
933
|
+
});
|
|
934
|
+
const transport1 = await router.createWebRtcTransport({
|
|
935
|
+
listenIps: ['127.0.0.1'],
|
|
936
|
+
});
|
|
937
|
+
const transport2 = await router.createWebRtcTransport({
|
|
938
|
+
listenIps: ['127.0.0.1'],
|
|
939
|
+
});
|
|
940
|
+
const deviceCapabilities = ctx.vpxConsumerDeviceCapabilities;
|
|
941
|
+
const svcProducer = await transport1.produce(ctx.vp9SvcProducerOptions);
|
|
942
|
+
expect(router.canConsume({
|
|
943
|
+
producerId: svcProducer.id,
|
|
944
|
+
rtpCapabilities: deviceCapabilities,
|
|
945
|
+
})).toBe(true);
|
|
946
|
+
const svcConsumer = await transport2.consume({
|
|
947
|
+
producerId: svcProducer.id,
|
|
948
|
+
rtpCapabilities: deviceCapabilities,
|
|
949
|
+
paused: true,
|
|
950
|
+
preferredLayers: { spatialLayer: 1, temporalLayer: 0 },
|
|
951
|
+
});
|
|
952
|
+
expect(svcConsumer.type).toBe('svc');
|
|
953
|
+
expect(svcConsumer.preferredLayers).toEqual({
|
|
954
|
+
spatialLayer: 1,
|
|
955
|
+
temporalLayer: 0,
|
|
956
|
+
});
|
|
957
|
+
// Out-of-range spatial and temporal layers are clamped to the max.
|
|
958
|
+
const svcConsumerClamped = await transport2.consume({
|
|
959
|
+
producerId: svcProducer.id,
|
|
960
|
+
rtpCapabilities: deviceCapabilities,
|
|
961
|
+
paused: true,
|
|
962
|
+
preferredLayers: { spatialLayer: 9, temporalLayer: 9 },
|
|
963
|
+
});
|
|
964
|
+
expect(svcConsumerClamped.preferredLayers).toEqual({
|
|
965
|
+
spatialLayer: 2,
|
|
966
|
+
temporalLayer: 2,
|
|
967
|
+
});
|
|
968
|
+
// When no temporal layer is given it defaults to the max temporal layer.
|
|
969
|
+
const svcConsumerNoTemporal = await transport2.consume({
|
|
970
|
+
producerId: svcProducer.id,
|
|
971
|
+
rtpCapabilities: deviceCapabilities,
|
|
972
|
+
paused: true,
|
|
973
|
+
preferredLayers: { spatialLayer: 1 },
|
|
974
|
+
});
|
|
975
|
+
expect(svcConsumerNoTemporal.preferredLayers).toEqual({
|
|
976
|
+
spatialLayer: 1,
|
|
977
|
+
temporalLayer: 2,
|
|
978
|
+
});
|
|
979
|
+
}, 2000);
|
|
980
|
+
test('transport.consume() for a simulcast producer honors preferredLayers', async () => {
|
|
981
|
+
const router = await ctx.worker.createRouter({
|
|
982
|
+
mediaCodecs: ctx.vpxMediaCodecs,
|
|
983
|
+
});
|
|
984
|
+
const transport1 = await router.createWebRtcTransport({
|
|
985
|
+
listenIps: ['127.0.0.1'],
|
|
986
|
+
});
|
|
987
|
+
const transport2 = await router.createWebRtcTransport({
|
|
988
|
+
listenIps: ['127.0.0.1'],
|
|
989
|
+
});
|
|
990
|
+
const deviceCapabilities = ctx.vpxConsumerDeviceCapabilities;
|
|
991
|
+
const simulcastProducer = await transport1.produce(ctx.vp8SimulcastProducerOptions);
|
|
992
|
+
expect(router.canConsume({
|
|
993
|
+
producerId: simulcastProducer.id,
|
|
994
|
+
rtpCapabilities: deviceCapabilities,
|
|
995
|
+
})).toBe(true);
|
|
996
|
+
const simulcastConsumer = await transport2.consume({
|
|
997
|
+
producerId: simulcastProducer.id,
|
|
998
|
+
rtpCapabilities: deviceCapabilities,
|
|
999
|
+
paused: true,
|
|
1000
|
+
preferredLayers: { spatialLayer: 1, temporalLayer: 0 },
|
|
1001
|
+
});
|
|
1002
|
+
expect(simulcastConsumer.type).toBe('simulcast');
|
|
1003
|
+
expect(simulcastConsumer.preferredLayers).toEqual({
|
|
1004
|
+
spatialLayer: 1,
|
|
1005
|
+
temporalLayer: 0,
|
|
1006
|
+
});
|
|
1007
|
+
// Out-of-range spatial layer is clamped to the max (2 = number of encodings - 1).
|
|
1008
|
+
const simulcastConsumerClamped = await transport2.consume({
|
|
1009
|
+
producerId: simulcastProducer.id,
|
|
1010
|
+
rtpCapabilities: deviceCapabilities,
|
|
1011
|
+
paused: true,
|
|
1012
|
+
preferredLayers: { spatialLayer: 9, temporalLayer: 9 },
|
|
1013
|
+
});
|
|
1014
|
+
expect(simulcastConsumerClamped.preferredLayers).toEqual({
|
|
1015
|
+
spatialLayer: 2,
|
|
1016
|
+
temporalLayer: 4,
|
|
1017
|
+
});
|
|
1018
|
+
}, 2000);
|
|
825
1019
|
test('consumer.setPriority() succeed', async () => {
|
|
826
1020
|
const videoConsumer = await ctx.webRtcTransport2.consume({
|
|
827
1021
|
producerId: ctx.videoProducer.id,
|
|
@@ -283,6 +283,12 @@ test('dataConsumer.getStats() on a DirectTransport succeeds', async () => {
|
|
|
283
283
|
},
|
|
284
284
|
]);
|
|
285
285
|
}, 2000);
|
|
286
|
+
test('dataConsumer.send() on a DirectTransport rejects with TypeError', async () => {
|
|
287
|
+
const dataConsumer = await ctx.directTransport.consumeData({
|
|
288
|
+
dataProducerId: ctx.sctpDataProducer.id,
|
|
289
|
+
});
|
|
290
|
+
await expect(dataConsumer.send('foo')).rejects.toThrow(TypeError);
|
|
291
|
+
}, 2000);
|
|
286
292
|
test('dataConsumer.pause() and resume() succeed', async () => {
|
|
287
293
|
const onObserverPause = jest.fn();
|
|
288
294
|
const onObserverResume = jest.fn();
|
|
@@ -147,6 +147,17 @@ test('worker.createRouter() rejects with InvalidStateError if Worker is closed',
|
|
|
147
147
|
ctx.worker.close();
|
|
148
148
|
await expect(ctx.worker.createRouter({ mediaCodecs: ctx.mediaCodecs })).rejects.toThrow(errors_1.InvalidStateError);
|
|
149
149
|
}, 2000);
|
|
150
|
+
test('router.rtpCapabilities getter returns cloned RTP capabilities', async () => {
|
|
151
|
+
const router = await ctx.worker.createRouter({
|
|
152
|
+
mediaCodecs: ctx.mediaCodecs,
|
|
153
|
+
});
|
|
154
|
+
const originalRouterRtpCapabilities = router.rtpCapabilities;
|
|
155
|
+
const clonedOriginalRouterRtpCapabilities = utils.deepFreeze(originalRouterRtpCapabilities);
|
|
156
|
+
// Application attempts to modify router RTP capabilities, but it's modifying
|
|
157
|
+
// a returned clone of them.
|
|
158
|
+
router.rtpCapabilities.headerExtensions = [];
|
|
159
|
+
expect(router.rtpCapabilities).toEqual(clonedOriginalRouterRtpCapabilities);
|
|
160
|
+
}, 2000);
|
|
150
161
|
test('router.updateMediaCodecs() succeeds', async () => {
|
|
151
162
|
const router = await ctx.worker.createRouter({
|
|
152
163
|
mediaCodecs: ctx.mediaCodecs,
|
|
@@ -190,4 +190,11 @@ test('ordered DataProducer delivers all SCTP messages to the DataConsumer', asyn
|
|
|
190
190
|
bytesSent: recvMessageBytes,
|
|
191
191
|
},
|
|
192
192
|
]);
|
|
193
|
+
expect(await ctx.dataConsumer.getBufferedAmount()).toBe(0);
|
|
193
194
|
}, 10000);
|
|
195
|
+
test('can send messages from the SCTP DataConsumer', async () => {
|
|
196
|
+
expect(await ctx.dataConsumer.getBufferedAmount()).toBe(0);
|
|
197
|
+
// We can send messages directly from the DataConsumer and it should return
|
|
198
|
+
// current buffered amount, so 0 bytes.
|
|
199
|
+
await expect(ctx.dataConsumer.send('foo')).resolves.toBe(0);
|
|
200
|
+
}, 2000);
|
package/npm-scripts.mjs
CHANGED
|
@@ -539,8 +539,8 @@ async function release() {
|
|
|
539
539
|
exitWithError();
|
|
540
540
|
}
|
|
541
541
|
|
|
542
|
-
|
|
543
|
-
|
|
542
|
+
await checkRelease();
|
|
543
|
+
executeCmd(`git commit -am '${pkg.version}'`);
|
|
544
544
|
executeCmd(`git tag -a ${pkg.version} -m '${pkg.version}'`);
|
|
545
545
|
executeCmd(`git push origin v${MAYOR_VERSION}`);
|
|
546
546
|
executeCmd(`git push origin '${pkg.version}'`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup",
|
|
3
|
-
"version": "3.20.
|
|
3
|
+
"version": "3.20.2",
|
|
4
4
|
"description": "Cutting Edge WebRTC Video Conferencing",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"worker/scripts/*.py",
|
|
57
57
|
"worker/scripts/*.sh",
|
|
58
58
|
"worker/subprojects/*.wrap",
|
|
59
|
+
"worker/subprojects/packagefiles",
|
|
59
60
|
"worker/test/include",
|
|
60
61
|
"worker/test/src",
|
|
61
62
|
"worker/meson.build",
|
|
@@ -104,7 +105,7 @@
|
|
|
104
105
|
"h264-profile-level-id": "^2.3.2",
|
|
105
106
|
"node-fetch": "^3.3.2",
|
|
106
107
|
"supports-color": "^10.2.2",
|
|
107
|
-
"tar": "^7.5.
|
|
108
|
+
"tar": "^7.5.16"
|
|
108
109
|
},
|
|
109
110
|
"devDependencies": {
|
|
110
111
|
"@eslint/js": "^10.0.1",
|
|
@@ -113,21 +114,21 @@
|
|
|
113
114
|
"@types/ini": "^4.1.1",
|
|
114
115
|
"@types/jest": "^30.0.0",
|
|
115
116
|
"@types/node": "^25.6.2",
|
|
116
|
-
"eslint": "^10.4.
|
|
117
|
+
"eslint": "^10.4.1",
|
|
117
118
|
"eslint-config-prettier": "^10.1.8",
|
|
118
119
|
"eslint-plugin-jest": "^29.15.2",
|
|
119
|
-
"eslint-plugin-prettier": "^5.5.
|
|
120
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
120
121
|
"globals": "^17.6.0",
|
|
121
122
|
"ini": "^6.0.0",
|
|
122
123
|
"jest": "^30.4.2",
|
|
123
|
-
"knip": "^6.
|
|
124
|
+
"knip": "^6.15.0",
|
|
124
125
|
"marked": "^18.0.4",
|
|
125
126
|
"open-cli": "^9.0.0",
|
|
126
127
|
"pick-port": "^2.2.0",
|
|
127
128
|
"prettier": "^3.8.3",
|
|
128
129
|
"ts-jest": "^29.4.11",
|
|
129
130
|
"typescript": "^6.0.3",
|
|
130
|
-
"typescript-eslint": "^8.60.
|
|
131
|
+
"typescript-eslint": "^8.60.1",
|
|
131
132
|
"werift-sctp": "^0.0.11"
|
|
132
133
|
}
|
|
133
134
|
}
|
package/worker/Makefile
CHANGED
|
@@ -24,6 +24,7 @@ endif
|
|
|
24
24
|
clean-pip \
|
|
25
25
|
clean-subprojects \
|
|
26
26
|
clean-all \
|
|
27
|
+
check-wrap-status \
|
|
27
28
|
update-wrap-file \
|
|
28
29
|
mediasoup-worker \
|
|
29
30
|
libmediasoup-worker \
|
|
@@ -75,9 +76,12 @@ clean-subprojects: invoke
|
|
|
75
76
|
clean-all: invoke
|
|
76
77
|
"$(PYTHON)" -m invoke clean-all
|
|
77
78
|
|
|
79
|
+
check-wrap-status: invoke
|
|
80
|
+
"$(PYTHON)" -m invoke check-wrap-status
|
|
81
|
+
|
|
78
82
|
# It requires the SUBPROJECT environment variable.
|
|
79
83
|
update-wrap-file: invoke
|
|
80
|
-
"$(PYTHON)" -m invoke
|
|
84
|
+
"$(PYTHON)" -m invoke update-wrap-file $(SUBPROJECT)
|
|
81
85
|
|
|
82
86
|
mediasoup-worker: invoke
|
|
83
87
|
"$(PYTHON)" -m invoke mediasoup-worker
|
|
@@ -49,8 +49,10 @@ abseil_cpp_proj = subproject(
|
|
|
49
49
|
'abseil-cpp',
|
|
50
50
|
default_options: [
|
|
51
51
|
'warning_level=0',
|
|
52
|
+
'cpp_std=c++17',
|
|
52
53
|
],
|
|
53
54
|
)
|
|
55
|
+
|
|
54
56
|
local_include_directories = declare_dependency(
|
|
55
57
|
include_directories: include_directories('libwebrtc')
|
|
56
58
|
)
|
|
@@ -60,11 +62,12 @@ libwebrtc = library(
|
|
|
60
62
|
libwebrtc_sources,
|
|
61
63
|
dependencies: [
|
|
62
64
|
local_include_directories,
|
|
65
|
+
libuv_proj.get_variable('libuv_dep'),
|
|
63
66
|
openssl_proj.get_variable('openssl_dep'),
|
|
64
67
|
abseil_cpp_proj.get_variable('absl_strings_dep'),
|
|
65
68
|
abseil_cpp_proj.get_variable('absl_types_dep'),
|
|
69
|
+
ankerl_unordered_dense_dep,
|
|
66
70
|
flatbuffers_proj.get_variable('flatbuffers_dep'),
|
|
67
|
-
libuv_proj.get_variable('libuv_dep'),
|
|
68
71
|
],
|
|
69
72
|
include_directories: libwebrtc_include_directories,
|
|
70
73
|
cpp_args: cpp_args,
|
|
@@ -75,6 +78,7 @@ libwebrtc_dep = declare_dependency(
|
|
|
75
78
|
local_include_directories,
|
|
76
79
|
abseil_cpp_proj.get_variable('absl_strings_dep'),
|
|
77
80
|
abseil_cpp_proj.get_variable('absl_types_dep'),
|
|
81
|
+
ankerl_unordered_dense_dep,
|
|
78
82
|
],
|
|
79
83
|
include_directories: include_directories('.'),
|
|
80
84
|
link_with: libwebrtc,
|
package/worker/fbs/response.fbs
CHANGED
|
@@ -39,6 +39,7 @@ union Body {
|
|
|
39
39
|
DataConsumer_GetBufferedAmountResponse: FBS.DataConsumer.GetBufferedAmountResponse,
|
|
40
40
|
DataConsumer_DumpResponse: FBS.DataConsumer.DumpResponse,
|
|
41
41
|
DataConsumer_GetStatsResponse: FBS.DataConsumer.GetStatsResponse,
|
|
42
|
+
DataConsumer_SendResponse: FBS.DataConsumer.SendResponse,
|
|
42
43
|
DataConsumer_SetSubchannelsResponse: FBS.DataConsumer.SetSubchannelsResponse,
|
|
43
44
|
DataConsumer_AddSubchannelResponse: FBS.DataConsumer.AddSubchannelResponse,
|
|
44
45
|
DataConsumer_RemoveSubchannelResponse: FBS.DataConsumer.RemoveSubchannelResponse
|
|
@@ -19,7 +19,7 @@ void FuzzerRtcRtcPacket::Fuzz(const uint8_t* data, size_t len)
|
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
// We need to serialize the
|
|
22
|
+
// We need to serialize the packet into a separate buffer because setters
|
|
23
23
|
// below will try to write into packet memory.
|
|
24
24
|
//
|
|
25
25
|
// NOTE: Let's make the buffer bigger to test API that increases packet size.
|
|
@@ -180,7 +180,7 @@ void FuzzerRtcRtcPacket::Fuzz(const uint8_t* data, size_t len)
|
|
|
180
180
|
value3 // value
|
|
181
181
|
);
|
|
182
182
|
|
|
183
|
-
// NOTE: Cannot use One-Byte
|
|
183
|
+
// NOTE: Cannot use One-Byte extensions because we are using big ids and
|
|
184
184
|
// lengths.
|
|
185
185
|
// packet->SetExtensions(RTC::RTP::Packet::ExtensionsType::OneByte, extensions);
|
|
186
186
|
packet->SetExtensions(RTC::RTP::Packet::ExtensionsType::TwoBytes, extensions);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
#include "Channel/ChannelMessageRegistratorInterface.hpp"
|
|
5
5
|
#include "Channel/ChannelSocket.hpp"
|
|
6
|
+
#include <ankerl/unordered_dense.h>
|
|
6
7
|
#include <string>
|
|
7
|
-
#include <unordered_map>
|
|
8
8
|
|
|
9
9
|
namespace Channel
|
|
10
10
|
{
|
|
@@ -31,8 +31,9 @@ namespace Channel
|
|
|
31
31
|
ChannelSocket::NotificationHandler* GetChannelNotificationHandler(const std::string& id) override;
|
|
32
32
|
|
|
33
33
|
private:
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
ankerl::unordered_dense::map<std::string, ChannelSocket::RequestHandler*> mapChannelRequestHandlers;
|
|
35
|
+
ankerl::unordered_dense::map<std::string, ChannelSocket::NotificationHandler*>
|
|
36
|
+
mapChannelNotificationHandlers;
|
|
36
37
|
};
|
|
37
38
|
} // namespace Channel
|
|
38
39
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
#define MS_CHANNEL_NOTIFICATION_HPP
|
|
3
3
|
|
|
4
4
|
#include "FBS/notification.h"
|
|
5
|
-
#include <absl/container/flat_hash_map.h>
|
|
6
5
|
#include <string>
|
|
7
6
|
|
|
8
7
|
namespace Channel
|
|
@@ -12,9 +11,6 @@ namespace Channel
|
|
|
12
11
|
public:
|
|
13
12
|
using Event = FBS::Notification::Event;
|
|
14
13
|
|
|
15
|
-
private:
|
|
16
|
-
static const absl::flat_hash_map<FBS::Notification::Event, const char*> Event2String;
|
|
17
|
-
|
|
18
14
|
public:
|
|
19
15
|
explicit ChannelNotification(const FBS::Notification::Notification* notification);
|
|
20
16
|
~ChannelNotification() = default;
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
#include "FBS/message.h"
|
|
6
6
|
#include "FBS/request.h"
|
|
7
7
|
#include "FBS/response.h"
|
|
8
|
-
#include <flatbuffers/minireflect.h>
|
|
9
|
-
#include <absl/container/flat_hash_map.h>
|
|
10
8
|
#include <string>
|
|
11
9
|
|
|
12
10
|
namespace Channel
|
|
@@ -22,7 +20,6 @@ namespace Channel
|
|
|
22
20
|
|
|
23
21
|
public:
|
|
24
22
|
static thread_local flatbuffers::FlatBufferBuilder bufferBuilder;
|
|
25
|
-
static const absl::flat_hash_map<FBS::Request::Method, const char*> Method2String;
|
|
26
23
|
|
|
27
24
|
public:
|
|
28
25
|
ChannelRequest(Channel::ChannelSocket* channel, const FBS::Request::Request* request);
|
|
@@ -49,7 +46,9 @@ namespace Channel
|
|
|
49
46
|
FBS::Message::CreateMessage(builder, FBS::Message::Body::Response, response.Union());
|
|
50
47
|
|
|
51
48
|
builder.FinishSizePrefixed(message);
|
|
52
|
-
|
|
49
|
+
|
|
50
|
+
Send(builder.GetBufferPointer(), builder.GetSize());
|
|
51
|
+
|
|
53
52
|
builder.Clear();
|
|
54
53
|
}
|
|
55
54
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
#define MS_DEP_LIBSRTP_HPP
|
|
3
3
|
|
|
4
4
|
#include <srtp.h>
|
|
5
|
+
#include <ankerl/unordered_dense.h>
|
|
5
6
|
#include <string>
|
|
6
|
-
#include <unordered_map>
|
|
7
7
|
|
|
8
8
|
class DepLibSRTP
|
|
9
9
|
{
|
|
@@ -20,7 +20,7 @@ public:
|
|
|
20
20
|
static const std::string& GetErrorString(srtp_err_status_t code);
|
|
21
21
|
|
|
22
22
|
private:
|
|
23
|
-
static const
|
|
23
|
+
static const ankerl::unordered_dense::map<srtp_err_status_t, std::string> ErrorCode2String;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
#endif
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#include "handles/TimerHandleInterface.hpp"
|
|
5
5
|
#include "RTC/RtpObserver.hpp"
|
|
6
6
|
#include "SharedInterface.hpp"
|
|
7
|
-
#include <
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
8
8
|
#include <vector>
|
|
9
9
|
|
|
10
10
|
// Implementation of Dominant Speaker Identification for Multipoint
|
|
@@ -101,7 +101,7 @@ namespace RTC
|
|
|
101
101
|
TimerHandleInterface* periodicTimer{ nullptr };
|
|
102
102
|
uint16_t interval{ 300u };
|
|
103
103
|
// Map of ProducerSpeakers indexed by Producer id.
|
|
104
|
-
|
|
104
|
+
ankerl::unordered_dense::map<std::string, ProducerSpeaker*> mapProducerSpeakers;
|
|
105
105
|
uint64_t lastLevelIdleTime{ 0u };
|
|
106
106
|
};
|
|
107
107
|
} // namespace RTC
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#include "handles/TimerHandleInterface.hpp"
|
|
5
5
|
#include "RTC/RtpObserver.hpp"
|
|
6
6
|
#include "SharedInterface.hpp"
|
|
7
|
-
#include <
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
8
8
|
|
|
9
9
|
namespace RTC
|
|
10
10
|
{
|
|
@@ -50,7 +50,7 @@ namespace RTC
|
|
|
50
50
|
// Allocated by this.
|
|
51
51
|
TimerHandleInterface* periodicTimer{ nullptr };
|
|
52
52
|
// Others.
|
|
53
|
-
|
|
53
|
+
ankerl::unordered_dense::map<RTC::Producer*, DBovs> mapProducerDBovs;
|
|
54
54
|
bool silence{ true };
|
|
55
55
|
};
|
|
56
56
|
} // namespace RTC
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
#include "RTC/SCTP/public/Message.hpp"
|
|
8
8
|
#include "RTC/SctpDictionaries.hpp"
|
|
9
9
|
#include "SharedInterface.hpp"
|
|
10
|
-
#include <
|
|
10
|
+
#include <ankerl/unordered_dense.h>
|
|
11
11
|
#include <string>
|
|
12
12
|
|
|
13
13
|
namespace RTC
|
|
@@ -121,7 +121,7 @@ namespace RTC
|
|
|
121
121
|
RTC::SctpStreamParameters sctpStreamParameters;
|
|
122
122
|
std::string label;
|
|
123
123
|
std::string protocol;
|
|
124
|
-
|
|
124
|
+
ankerl::unordered_dense::set<uint16_t> subchannels;
|
|
125
125
|
bool transportConnected{ false };
|
|
126
126
|
bool sctpAssociationConnected{ false };
|
|
127
127
|
bool paused{ false };
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
#include <openssl/bio.h>
|
|
10
10
|
#include <openssl/ssl.h>
|
|
11
11
|
#include <openssl/x509.h>
|
|
12
|
-
#include <
|
|
12
|
+
#include <ankerl/unordered_dense.h>
|
|
13
13
|
#include <string>
|
|
14
14
|
#include <vector>
|
|
15
15
|
|
|
@@ -129,9 +129,9 @@ namespace RTC
|
|
|
129
129
|
static thread_local EVP_PKEY* privateKey;
|
|
130
130
|
static thread_local SSL_CTX* sslCtx;
|
|
131
131
|
static thread_local uint8_t sslReadBuffer[];
|
|
132
|
-
static const
|
|
133
|
-
static const
|
|
134
|
-
static const
|
|
132
|
+
static const ankerl::unordered_dense::map<std::string, Role> String2Role;
|
|
133
|
+
static const ankerl::unordered_dense::map<std::string, FingerprintAlgorithm> String2FingerprintAlgorithm;
|
|
134
|
+
static const ankerl::unordered_dense::map<FingerprintAlgorithm, std::string> FingerprintAlgorithm2String;
|
|
135
135
|
static thread_local std::vector<Fingerprint> localFingerprints;
|
|
136
136
|
static const std::vector<SrtpCryptoSuiteMapEntry> SrtpCryptoSuites;
|
|
137
137
|
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
#include "RTC/ICE/StunPacket.hpp"
|
|
8
8
|
#include "RTC/TransportTuple.hpp"
|
|
9
9
|
#include "SharedInterface.hpp"
|
|
10
|
+
#include <ankerl/unordered_dense.h>
|
|
10
11
|
#include <list>
|
|
11
12
|
#include <string>
|
|
12
|
-
#include <unordered_map>
|
|
13
13
|
|
|
14
14
|
namespace RTC
|
|
15
15
|
{
|
|
@@ -61,7 +61,7 @@ namespace RTC
|
|
|
61
61
|
static FBS::WebRtcTransport::IceState IceStateToFbs(IceState state);
|
|
62
62
|
|
|
63
63
|
private:
|
|
64
|
-
static
|
|
64
|
+
static ankerl::unordered_dense::map<IceState, std::string> iceStateToString;
|
|
65
65
|
|
|
66
66
|
public:
|
|
67
67
|
IceServer(
|