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
|
@@ -118,7 +118,7 @@ namespace RTC
|
|
|
118
118
|
{
|
|
119
119
|
/**
|
|
120
120
|
* Auto means that One-Byte or Two-Bytes is choosen based on given
|
|
121
|
-
*
|
|
121
|
+
* extensions.
|
|
122
122
|
*/
|
|
123
123
|
Auto = 0,
|
|
124
124
|
OneByte = 1,
|
|
@@ -189,7 +189,7 @@ namespace RTC
|
|
|
189
189
|
static const size_t FixedHeaderMinLength{ 12 };
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* Whether given buffer could be a valid RTP
|
|
192
|
+
* Whether given buffer could be a valid RTP packet.
|
|
193
193
|
*
|
|
194
194
|
* @remarks
|
|
195
195
|
* - Before calling this static method, the caller should verify whether
|
|
@@ -198,10 +198,10 @@ namespace RTC
|
|
|
198
198
|
static bool IsRtp(const uint8_t* buffer, size_t bufferLength);
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
|
-
* Parse a RTP
|
|
201
|
+
* Parse a RTP packet.
|
|
202
202
|
*
|
|
203
203
|
* @remarks
|
|
204
|
-
* - `packetLength` must be the exact length of the
|
|
204
|
+
* - `packetLength` must be the exact length of the packet.
|
|
205
205
|
* - `bufferLength` must be >= `packetLength`.
|
|
206
206
|
*
|
|
207
207
|
* @throw MediaSoupTypeError - If `bufferLength` is lower than
|
|
@@ -210,21 +210,21 @@ namespace RTC
|
|
|
210
210
|
static Packet* Parse(const uint8_t* buffer, size_t packetLength, size_t bufferLength);
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
|
-
* Parse a RTP
|
|
213
|
+
* Parse a RTP packet.
|
|
214
214
|
*
|
|
215
215
|
* @remarks
|
|
216
|
-
* - `bufferLength` must be the exact length of the
|
|
216
|
+
* - `bufferLength` must be the exact length of the packet.
|
|
217
217
|
*/
|
|
218
218
|
static Packet* Parse(const uint8_t* buffer, size_t bufferLength);
|
|
219
219
|
|
|
220
220
|
/**
|
|
221
|
-
* Create a RTP
|
|
221
|
+
* Create a RTP packet.
|
|
222
222
|
*/
|
|
223
223
|
static Packet* Factory(uint8_t* buffer, size_t bufferLength);
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
226
|
* Generate value for "urn:mediasoup:params:rtp-hdrext:packet-id"
|
|
227
|
-
* mediasoup custom
|
|
227
|
+
* mediasoup custom extension.
|
|
228
228
|
*/
|
|
229
229
|
static uint32_t GetNextMediasoupPacketId();
|
|
230
230
|
|
|
@@ -233,7 +233,7 @@ namespace RTC
|
|
|
233
233
|
|
|
234
234
|
private:
|
|
235
235
|
/**
|
|
236
|
-
* Constructor is private because we only want to create
|
|
236
|
+
* Constructor is private because we only want to create packet instances
|
|
237
237
|
* via Parse() and Factory().
|
|
238
238
|
*/
|
|
239
239
|
Packet(uint8_t* buffer, size_t bufferLength);
|
|
@@ -298,11 +298,11 @@ namespace RTC
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
/**
|
|
301
|
-
* Get the
|
|
301
|
+
* Get the extension header id or 0 if there isn't.
|
|
302
302
|
*
|
|
303
303
|
* @remarks
|
|
304
304
|
* - This method doesn't validate whether there is indeed space for the
|
|
305
|
-
* announced
|
|
305
|
+
* announced header extension.
|
|
306
306
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
307
307
|
* was succesfully called.
|
|
308
308
|
*/
|
|
@@ -317,12 +317,12 @@ namespace RTC
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
/**
|
|
320
|
-
* Pointer to the
|
|
321
|
-
*
|
|
320
|
+
* Pointer to the header extension value or `nullptr` if there is no
|
|
321
|
+
* header extension or its has no value.
|
|
322
322
|
*
|
|
323
323
|
* @remarks
|
|
324
324
|
* - This method doesn't validate whether there is indeed space for the
|
|
325
|
-
* announced
|
|
325
|
+
* announced header extension.
|
|
326
326
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
327
327
|
* was succesfully called.
|
|
328
328
|
*/
|
|
@@ -339,7 +339,7 @@ namespace RTC
|
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
/**
|
|
342
|
-
* Length of the
|
|
342
|
+
* Length of the header extension value (excluding the id & length
|
|
343
343
|
* four-octet).
|
|
344
344
|
*/
|
|
345
345
|
size_t GetHeaderExtensionValueLength() const
|
|
@@ -353,12 +353,12 @@ namespace RTC
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
/**
|
|
356
|
-
* Remove the
|
|
356
|
+
* Remove the header extension.
|
|
357
357
|
*/
|
|
358
358
|
void RemoveHeaderExtension();
|
|
359
359
|
|
|
360
360
|
/**
|
|
361
|
-
* Whether the
|
|
361
|
+
* Whether the packet has One-Byte or Two-Bytes extensions.
|
|
362
362
|
*
|
|
363
363
|
* @see RFC 8285.
|
|
364
364
|
*/
|
|
@@ -368,7 +368,7 @@ namespace RTC
|
|
|
368
368
|
}
|
|
369
369
|
|
|
370
370
|
/**
|
|
371
|
-
* Whether the
|
|
371
|
+
* Whether the packet has One-Byte extensions.
|
|
372
372
|
*
|
|
373
373
|
* @see RFC 8285.
|
|
374
374
|
*/
|
|
@@ -378,7 +378,7 @@ namespace RTC
|
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
/**
|
|
381
|
-
* Whether the
|
|
381
|
+
* Whether the packet has Two-Bytes extensions.
|
|
382
382
|
*
|
|
383
383
|
* @see RFC 8285.
|
|
384
384
|
*/
|
|
@@ -388,13 +388,13 @@ namespace RTC
|
|
|
388
388
|
}
|
|
389
389
|
|
|
390
390
|
/**
|
|
391
|
-
* Whether the One-Byte or Two-Bytes
|
|
392
|
-
* the
|
|
391
|
+
* Whether the One-Byte or Two-Bytes extension with given `id` exists in
|
|
392
|
+
* the packet.
|
|
393
393
|
*
|
|
394
394
|
* @see RFC 8285.
|
|
395
395
|
*
|
|
396
396
|
* @remarks
|
|
397
|
-
* - If the length of the
|
|
397
|
+
* - If the length of the extension value is 0 this method returns `true`.
|
|
398
398
|
*/
|
|
399
399
|
bool HasExtension(uint8_t id) const
|
|
400
400
|
{
|
|
@@ -426,7 +426,7 @@ namespace RTC
|
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
/**
|
|
429
|
-
* Get a pointer to the value of the the One-Byte or Two-Bytes
|
|
429
|
+
* Get a pointer to the value of the the One-Byte or Two-Bytes extension
|
|
430
430
|
* with given `id` and set its value length into given `len`.
|
|
431
431
|
*
|
|
432
432
|
* @see RFC 8285.
|
|
@@ -463,7 +463,7 @@ namespace RTC
|
|
|
463
463
|
|
|
464
464
|
auto* extension = reinterpret_cast<OneByteExtension*>(GetHeaderExtensionValue() + offset);
|
|
465
465
|
|
|
466
|
-
// In One-Byte
|
|
466
|
+
// In One-Byte extensions value length 0 means 1.
|
|
467
467
|
len = extension->len + 1;
|
|
468
468
|
|
|
469
469
|
return extension->value;
|
|
@@ -496,17 +496,17 @@ namespace RTC
|
|
|
496
496
|
}
|
|
497
497
|
|
|
498
498
|
/**
|
|
499
|
-
* Add or replace
|
|
499
|
+
* Add or replace extensions.
|
|
500
500
|
*
|
|
501
501
|
* @see RFC 8285.
|
|
502
502
|
*
|
|
503
503
|
* @throw MediaSoupTypeError - If there is no space available for given
|
|
504
|
-
*
|
|
504
|
+
* extensions or if given extensions are invalid/wrong.
|
|
505
505
|
*/
|
|
506
506
|
void SetExtensions(ExtensionsType type, const std::vector<Extension>& extensions);
|
|
507
507
|
|
|
508
508
|
/**
|
|
509
|
-
* Assign
|
|
509
|
+
* Assign extension ids.
|
|
510
510
|
*
|
|
511
511
|
* @see RFC 8285.
|
|
512
512
|
*/
|
|
@@ -521,7 +521,7 @@ namespace RTC
|
|
|
521
521
|
/**
|
|
522
522
|
* @remarks
|
|
523
523
|
* - `absSendTime` is set with the raw 3 bytes unsigned integer stored
|
|
524
|
-
* in the
|
|
524
|
+
* in the extension value.
|
|
525
525
|
*/
|
|
526
526
|
bool ReadAbsSendTime(uint32_t& absSendtime) const;
|
|
527
527
|
|
|
@@ -554,11 +554,11 @@ namespace RTC
|
|
|
554
554
|
bool ReadMediasoupPacketId(uint32_t& mediasoupPacketId) const;
|
|
555
555
|
|
|
556
556
|
/**
|
|
557
|
-
* Whether this
|
|
557
|
+
* Whether this packet has payload.
|
|
558
558
|
*
|
|
559
559
|
* @remarks
|
|
560
560
|
* - This method doesn't validate whether the padding length announced in
|
|
561
|
-
* the last byte of the
|
|
561
|
+
* the last byte of the packet is valid.
|
|
562
562
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
563
563
|
* was succesfully called.
|
|
564
564
|
*/
|
|
@@ -573,11 +573,11 @@ namespace RTC
|
|
|
573
573
|
*
|
|
574
574
|
* @remarks
|
|
575
575
|
* - This method doesn't validate whether the padding length announced in
|
|
576
|
-
* the last byte of the
|
|
576
|
+
* the last byte of the packet is valid.
|
|
577
577
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
578
578
|
* was succesfully called.
|
|
579
579
|
* - This method doens't take into account padding, so in a padding-only
|
|
580
|
-
*
|
|
580
|
+
* packet this method returns `nullptr` with `len` 0.
|
|
581
581
|
*/
|
|
582
582
|
uint8_t* GetPayload(size_t& len) const
|
|
583
583
|
{
|
|
@@ -608,11 +608,11 @@ namespace RTC
|
|
|
608
608
|
*
|
|
609
609
|
* @remarks
|
|
610
610
|
* - This method doesn't validate whether the padding length announced in
|
|
611
|
-
* the last byte of the
|
|
611
|
+
* the last byte of the packet is valid.
|
|
612
612
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
613
613
|
* was succesfully called.
|
|
614
614
|
* - This method doens't take into account padding, so in a padding-only
|
|
615
|
-
*
|
|
615
|
+
* packet this method returns `nullptr`.
|
|
616
616
|
*/
|
|
617
617
|
uint8_t* GetPayload() const
|
|
618
618
|
{
|
|
@@ -626,7 +626,7 @@ namespace RTC
|
|
|
626
626
|
*
|
|
627
627
|
* @remarks
|
|
628
628
|
* - This method doesn't validate whether the padding length announced in
|
|
629
|
-
* the last byte of the
|
|
629
|
+
* the last byte of the packet is valid.
|
|
630
630
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
631
631
|
* was succesfully called.
|
|
632
632
|
*/
|
|
@@ -651,7 +651,7 @@ namespace RTC
|
|
|
651
651
|
}
|
|
652
652
|
|
|
653
653
|
/**
|
|
654
|
-
* Set the payload. It copies the given `payload` into the
|
|
654
|
+
* Set the payload. It copies the given `payload` into the packet.
|
|
655
655
|
*
|
|
656
656
|
* @remarks
|
|
657
657
|
* - This method removes existing padding (if any).
|
|
@@ -696,7 +696,7 @@ namespace RTC
|
|
|
696
696
|
void ShiftPayload(size_t payloadOffset, int32_t delta);
|
|
697
697
|
|
|
698
698
|
/**
|
|
699
|
-
* Whether this
|
|
699
|
+
* Whether this packet has padding.
|
|
700
700
|
*/
|
|
701
701
|
bool HasPadding() const
|
|
702
702
|
{
|
|
@@ -708,7 +708,7 @@ namespace RTC
|
|
|
708
708
|
*
|
|
709
709
|
* @remarks
|
|
710
710
|
* - This method doesn't validate whether the padding length announced in
|
|
711
|
-
* the last byte of the
|
|
711
|
+
* the last byte of the packet is valid.
|
|
712
712
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
713
713
|
* was succesfully called.
|
|
714
714
|
*/
|
|
@@ -734,7 +734,7 @@ namespace RTC
|
|
|
734
734
|
void SetPaddingLength(uint8_t paddingLength);
|
|
735
735
|
|
|
736
736
|
/**
|
|
737
|
-
* Whether
|
|
737
|
+
* Whether packet length is padded to 4 bytes.
|
|
738
738
|
*/
|
|
739
739
|
bool IsPaddedTo4Bytes() const
|
|
740
740
|
{
|
|
@@ -742,7 +742,7 @@ namespace RTC
|
|
|
742
742
|
}
|
|
743
743
|
|
|
744
744
|
/**
|
|
745
|
-
* Pad
|
|
745
|
+
* Pad packet length to 4 bytes by modifying padding bytes.
|
|
746
746
|
*
|
|
747
747
|
* @remarks
|
|
748
748
|
* - This method removes existing padding and adds up to 3 bytes of
|
|
@@ -754,7 +754,7 @@ namespace RTC
|
|
|
754
754
|
void PadTo4Bytes();
|
|
755
755
|
|
|
756
756
|
/**
|
|
757
|
-
* Encode the
|
|
757
|
+
* Encode the packet into a RTX packet.
|
|
758
758
|
*
|
|
759
759
|
* @remarks
|
|
760
760
|
* - This method removes existing padding (if any).
|
|
@@ -765,7 +765,7 @@ namespace RTC
|
|
|
765
765
|
void RtxEncode(uint8_t payloadType, uint32_t ssrc, uint16_t seq);
|
|
766
766
|
|
|
767
767
|
/**
|
|
768
|
-
* Decode the RTX
|
|
768
|
+
* Decode the RTX packet into a regular RTP packet.
|
|
769
769
|
*
|
|
770
770
|
* @return `true` if RTX decoding iwas done.
|
|
771
771
|
*
|
|
@@ -872,7 +872,7 @@ namespace RTC
|
|
|
872
872
|
}
|
|
873
873
|
|
|
874
874
|
/**
|
|
875
|
-
* Pointer to the location where
|
|
875
|
+
* Pointer to the location where extension header is supposed to begin.
|
|
876
876
|
*/
|
|
877
877
|
HeaderExtension* GetHeaderExtensionPointer() const
|
|
878
878
|
{
|
|
@@ -880,11 +880,11 @@ namespace RTC
|
|
|
880
880
|
}
|
|
881
881
|
|
|
882
882
|
/**
|
|
883
|
-
* Length of the
|
|
883
|
+
* Length of the header extension including the id & length four-octet.
|
|
884
884
|
*
|
|
885
885
|
* @remarks
|
|
886
886
|
* - This method doesn't validate whether there is indeed space for the
|
|
887
|
-
* announced
|
|
887
|
+
* announced header extension.
|
|
888
888
|
* - This method is guaranteed to return valid value once @ref Validate()
|
|
889
889
|
* was succesfully called.
|
|
890
890
|
*/
|
|
@@ -907,8 +907,8 @@ namespace RTC
|
|
|
907
907
|
}
|
|
908
908
|
|
|
909
909
|
/**
|
|
910
|
-
* Validates whether the
|
|
911
|
-
* containers holding
|
|
910
|
+
* Validates whether the packet is valid. It also stores internal
|
|
911
|
+
* containers holding extensions if `storeExtensions` is `true`.
|
|
912
912
|
*/
|
|
913
913
|
#ifdef MS_TEST
|
|
914
914
|
public:
|
|
@@ -919,20 +919,20 @@ namespace RTC
|
|
|
919
919
|
#endif
|
|
920
920
|
|
|
921
921
|
/**
|
|
922
|
-
* Parses
|
|
923
|
-
* internal containers holding
|
|
922
|
+
* Parses extensions. Returns `true` if they are valid. It also stores
|
|
923
|
+
* internal containers holding extensions if `storeExtensions` is `true`.
|
|
924
924
|
*
|
|
925
925
|
* @see RFC 8285.
|
|
926
926
|
*/
|
|
927
927
|
bool ParseExtensions(bool storeExtensions);
|
|
928
928
|
|
|
929
929
|
/**
|
|
930
|
-
* Set the value length of the
|
|
930
|
+
* Set the value length of the extension with given `id`.
|
|
931
931
|
*
|
|
932
932
|
* @remarks
|
|
933
933
|
* - The caller is responsible of not setting a length higher than the
|
|
934
934
|
* available one (taking into account existing padding bytes).
|
|
935
|
-
* - If the
|
|
935
|
+
* - If the extension with `id` doesn't exist this methods terminates
|
|
936
936
|
* the process.
|
|
937
937
|
*/
|
|
938
938
|
void SetExtensionLength(uint8_t id, uint8_t len);
|
|
@@ -947,14 +947,14 @@ namespace RTC
|
|
|
947
947
|
#endif
|
|
948
948
|
|
|
949
949
|
private:
|
|
950
|
-
// Array of One Byte Extensions. Index is the id - 1 of the
|
|
951
|
-
// each entry is the offset (in bytes) from the beginning of the
|
|
952
|
-
//
|
|
950
|
+
// Array of One Byte Extensions. Index is the id - 1 of the extension,
|
|
951
|
+
// each entry is the offset (in bytes) from the beginning of the header
|
|
952
|
+
// extension value to the beginning of the extension.
|
|
953
953
|
std::array<ssize_t, 14> oneByteExtensions{ -1, -1, -1, -1, -1, -1, -1,
|
|
954
954
|
-1, -1, -1, -1, -1, -1, -1 };
|
|
955
|
-
// Ordered map of Two Bytes Extensions. Key is the id 1 of the
|
|
956
|
-
// each entry is the offset (in bytes) from the beginning of the
|
|
957
|
-
//
|
|
955
|
+
// Ordered map of Two Bytes Extensions. Key is the id 1 of the extension,
|
|
956
|
+
// each entry is the offset (in bytes) from the beginning of the header
|
|
957
|
+
// extension value to the beginning of the extension.
|
|
958
958
|
std::map<uint8_t, ssize_t> twoBytesExtensions;
|
|
959
959
|
// Extension ids.
|
|
960
960
|
RTP::HeaderExtensionIds headerExtensionIds{};
|
|
@@ -12,7 +12,7 @@ namespace RTC
|
|
|
12
12
|
{
|
|
13
13
|
public:
|
|
14
14
|
/**
|
|
15
|
-
* Maximum length of a probation RTP
|
|
15
|
+
* Maximum length of a probation RTP packet.
|
|
16
16
|
*/
|
|
17
17
|
static const size_t ProbationPacketMaxLength{ 1400 };
|
|
18
18
|
/**
|
|
@@ -40,7 +40,7 @@ namespace RTC
|
|
|
40
40
|
// Allocated by this.
|
|
41
41
|
std::unique_ptr<RTP::Packet> probationPacket;
|
|
42
42
|
// Others.
|
|
43
|
-
// The length of the probation RTP
|
|
43
|
+
// The length of the probation RTP packet without payload or padding.
|
|
44
44
|
size_t probationPacketMinLength{ 0 };
|
|
45
45
|
};
|
|
46
46
|
} // namespace RTP
|
|
@@ -22,7 +22,7 @@ namespace RTC
|
|
|
22
22
|
SharedPacket();
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
* Constructor with RTP
|
|
25
|
+
* Constructor with RTP packet pointer. If a packet is given it's internally
|
|
26
26
|
* cloned.
|
|
27
27
|
*/
|
|
28
28
|
explicit SharedPacket(RTP::Packet* packet);
|
|
@@ -41,7 +41,7 @@ namespace RTC
|
|
|
41
41
|
* @remarks
|
|
42
42
|
* - No need to declare it but let's be explicit.
|
|
43
43
|
*
|
|
44
|
-
* @throws MediasoupError if the
|
|
44
|
+
* @throws MediasoupError if the packet is too big.
|
|
45
45
|
*/
|
|
46
46
|
SharedPacket& operator=(const SharedPacket&) = default;
|
|
47
47
|
|
|
@@ -67,7 +67,7 @@ namespace RTC
|
|
|
67
67
|
* Assign given packet (could be nullptr). If packet is given it's internally
|
|
68
68
|
* cloned.
|
|
69
69
|
*
|
|
70
|
-
* @throws MediasoupError if the
|
|
70
|
+
* @throws MediasoupError if the packet is too big.
|
|
71
71
|
*/
|
|
72
72
|
void Assign(RTP::Packet* packet);
|
|
73
73
|
|
|
@@ -80,7 +80,7 @@ namespace RTC
|
|
|
80
80
|
void Reset();
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
* Assert that RTP
|
|
83
|
+
* Assert that RTP packet contained in this SharedPacket is a clone of the
|
|
84
84
|
* given other packet (or there is no packet inside and no other packet has
|
|
85
85
|
* been given).
|
|
86
86
|
*/
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
#include "RTC/Transport.hpp"
|
|
15
15
|
#include "RTC/WebRtcServer.hpp"
|
|
16
16
|
#include "SharedInterface.hpp"
|
|
17
|
-
#include <
|
|
18
|
-
#include <absl/container/flat_hash_set.h>
|
|
17
|
+
#include <ankerl/unordered_dense.h>
|
|
19
18
|
#include <string>
|
|
20
19
|
#include <vector>
|
|
21
20
|
|
|
@@ -122,17 +121,19 @@ namespace RTC
|
|
|
122
121
|
SharedInterface* shared{ nullptr };
|
|
123
122
|
Listener* listener{ nullptr };
|
|
124
123
|
// Allocated by this.
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
ankerl::unordered_dense::map<std::string, RTC::Transport*> mapTransports;
|
|
125
|
+
ankerl::unordered_dense::map<std::string, RTC::RtpObserver*> mapRtpObservers;
|
|
127
126
|
// Others.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
ankerl::unordered_dense::map<RTC::Producer*, ankerl::unordered_dense::set<RTC::Consumer*>>
|
|
128
|
+
mapProducerConsumers;
|
|
129
|
+
ankerl::unordered_dense::map<RTC::Consumer*, RTC::Producer*> mapConsumerProducer;
|
|
130
|
+
ankerl::unordered_dense::map<RTC::Producer*, ankerl::unordered_dense::set<RTC::RtpObserver*>>
|
|
131
|
+
mapProducerRtpObservers;
|
|
132
|
+
ankerl::unordered_dense::map<std::string, RTC::Producer*> mapProducers;
|
|
133
|
+
ankerl::unordered_dense::map<RTC::DataProducer*, ankerl::unordered_dense::set<RTC::DataConsumer*>>
|
|
133
134
|
mapDataProducerDataConsumers;
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
ankerl::unordered_dense::map<RTC::DataConsumer*, RTC::DataProducer*> mapDataConsumerDataProducer;
|
|
136
|
+
ankerl::unordered_dense::map<std::string, RTC::DataProducer*> mapDataProducers;
|
|
136
137
|
};
|
|
137
138
|
} // namespace RTC
|
|
138
139
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#define MS_RTC_RTC_LOGGER_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include <
|
|
5
|
+
#include <ankerl/unordered_dense.h>
|
|
6
6
|
|
|
7
7
|
namespace RTC
|
|
8
8
|
{
|
|
@@ -30,7 +30,7 @@ namespace RTC
|
|
|
30
30
|
SEND_RTP_STREAM_DISCARDED
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
static const
|
|
33
|
+
static const ankerl::unordered_dense::map<DiscardReason, std::string> DiscardReason2String;
|
|
34
34
|
|
|
35
35
|
RtpPacket() = default;
|
|
36
36
|
~RtpPacket() = default;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "FBS/rtpParameters.h"
|
|
6
6
|
#include "RTC/Parameters.hpp"
|
|
7
|
-
#include <
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
8
8
|
#include <string>
|
|
9
9
|
#include <vector>
|
|
10
10
|
|
|
@@ -60,10 +60,10 @@ namespace RTC
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
public:
|
|
63
|
-
static const
|
|
64
|
-
static const
|
|
65
|
-
static const
|
|
66
|
-
static const
|
|
63
|
+
static const ankerl::unordered_dense::map<std::string, Type> String2Type;
|
|
64
|
+
static const ankerl::unordered_dense::map<Type, std::string> Type2String;
|
|
65
|
+
static const ankerl::unordered_dense::map<std::string, Subtype> String2Subtype;
|
|
66
|
+
static const ankerl::unordered_dense::map<Subtype, std::string> Subtype2String;
|
|
67
67
|
|
|
68
68
|
public:
|
|
69
69
|
RtpCodecMimeType() = default;
|
|
@@ -254,7 +254,7 @@ namespace RTC
|
|
|
254
254
|
static FBS::RtpParameters::Type TypeToFbs(Type type);
|
|
255
255
|
|
|
256
256
|
private:
|
|
257
|
-
static const
|
|
257
|
+
static const ankerl::unordered_dense::map<Type, std::string> Type2String;
|
|
258
258
|
|
|
259
259
|
public:
|
|
260
260
|
RtpParameters() = default;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "RTC/Producer.hpp"
|
|
6
6
|
#include "RTC/RTP/Packet.hpp"
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
7
8
|
#include <string>
|
|
8
|
-
#include <unordered_map>
|
|
9
9
|
|
|
10
10
|
namespace RTC
|
|
11
11
|
{
|
|
@@ -21,11 +21,11 @@ namespace RTC
|
|
|
21
21
|
|
|
22
22
|
public:
|
|
23
23
|
// Table of SSRC / Producer pairs.
|
|
24
|
-
|
|
24
|
+
ankerl::unordered_dense::map<uint32_t, RTC::Producer*> ssrcTable;
|
|
25
25
|
// Table of MID / Producer pairs.
|
|
26
|
-
|
|
26
|
+
ankerl::unordered_dense::map<std::string, RTC::Producer*> midTable;
|
|
27
27
|
// Table of RID / Producer pairs.
|
|
28
|
-
|
|
28
|
+
ankerl::unordered_dense::map<std::string, RTC::Producer*> ridTable;
|
|
29
29
|
};
|
|
30
30
|
} // namespace RTC
|
|
31
31
|
|
|
@@ -58,7 +58,7 @@ namespace RTC
|
|
|
58
58
|
public:
|
|
59
59
|
/**
|
|
60
60
|
* Internal SCTP association state. This is different from the public SCTP
|
|
61
|
-
*
|
|
61
|
+
* association state (`SCTP::Types::AssociationState`).
|
|
62
62
|
*/
|
|
63
63
|
enum class State : uint8_t
|
|
64
64
|
{
|
|
@@ -133,12 +133,12 @@ namespace RTC
|
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
135
|
* Struct holding local verification tag and initial TSN between having
|
|
136
|
-
* sent the INIT
|
|
136
|
+
* sent the INIT chunk until the connection is established (there is no
|
|
137
137
|
* TCB in between).
|
|
138
138
|
*
|
|
139
139
|
* @remarks
|
|
140
140
|
* - This is how dcSCTP does, despite RFC 9260 states that the TCB should
|
|
141
|
-
* also be created when an INIT
|
|
141
|
+
* also be created when an INIT chunk is sent.
|
|
142
142
|
*/
|
|
143
143
|
struct PreTransmissionControlBlock
|
|
144
144
|
{
|
|
@@ -192,7 +192,7 @@ namespace RTC
|
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* Initiate the SCTP association with the remote peer. It sends an INIT
|
|
195
|
-
*
|
|
195
|
+
* chunk.
|
|
196
196
|
*
|
|
197
197
|
* @remarks
|
|
198
198
|
* - The SCTP association must be in New state.
|
|
@@ -202,7 +202,7 @@ namespace RTC
|
|
|
202
202
|
void Connect() override;
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
* Gracefully shutdowns the
|
|
205
|
+
* Gracefully shutdowns the association and sends all outstanding data.
|
|
206
206
|
* This is an asynchronous operation and `OnAssociationClosed()` will be
|
|
207
207
|
* called on success.
|
|
208
208
|
*
|
|
@@ -215,7 +215,7 @@ namespace RTC
|
|
|
215
215
|
void Shutdown() override;
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
|
-
* Closes the
|
|
218
|
+
* Closes the association non-gracefully. Will send ABORT if the connection
|
|
219
219
|
* is not already closed. No callbacks will be made after Close() has
|
|
220
220
|
* returned. However, before Close() returns, it may have called
|
|
221
221
|
* `OnAssociationClosed()` or `OnAssociationAborted()` callbacks.
|
|
@@ -223,7 +223,7 @@ namespace RTC
|
|
|
223
223
|
void Close() override;
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
|
-
* Retrieves the latest metrics. If the
|
|
226
|
+
* Retrieves the latest metrics. If the association is not fully connected,
|
|
227
227
|
* `std::nullopt` will be returned.
|
|
228
228
|
*/
|
|
229
229
|
std::optional<AssociationMetrics> MakeMetrics() const override;
|
|
@@ -319,7 +319,7 @@ namespace RTC
|
|
|
319
319
|
* message will be queued.
|
|
320
320
|
*
|
|
321
321
|
* This has identical semantics to `SendMessage()', except that it may
|
|
322
|
-
* coalesce many messages into a single SCTP
|
|
322
|
+
* coalesce many messages into a single SCTP packet if they would fit.
|
|
323
323
|
*
|
|
324
324
|
* @remarks
|
|
325
325
|
* - Same as in `SendMessage()`.
|
|
@@ -328,7 +328,7 @@ namespace RTC
|
|
|
328
328
|
std::span<Message> messages, const SendMessageOptions& sendMessageOptions) override;
|
|
329
329
|
|
|
330
330
|
/**
|
|
331
|
-
* Receives SCTP data (hopefully an SCTP
|
|
331
|
+
* Receives SCTP data (hopefully an SCTP packet) from the remote peer.
|
|
332
332
|
*/
|
|
333
333
|
void ReceiveSctpData(const uint8_t* data, size_t len) override;
|
|
334
334
|
|
|
@@ -376,13 +376,13 @@ namespace RTC
|
|
|
376
376
|
void SendShutdownAckChunk();
|
|
377
377
|
|
|
378
378
|
/**
|
|
379
|
-
* Sends SHUTDOWN or SHUTDOWN-ACK if the
|
|
379
|
+
* Sends SHUTDOWN or SHUTDOWN-ACK if the association is shutting down and
|
|
380
380
|
* if all outstanding data has been acknowledged.
|
|
381
381
|
*/
|
|
382
382
|
void MaySendShutdownOrShutdownAckChunk();
|
|
383
383
|
|
|
384
384
|
/**
|
|
385
|
-
* If the
|
|
385
|
+
* If the association is shutting down, responds SHUTDOWN to any incoming
|
|
386
386
|
* DATA.
|
|
387
387
|
*/
|
|
388
388
|
void MaySendShutdownOnPacketReceived(const Packet* receivedPacket);
|
|
@@ -508,7 +508,7 @@ namespace RTC
|
|
|
508
508
|
// The actual send queue implementation. As data can be sent before the
|
|
509
509
|
// connection is established, this component is not in the TCB.
|
|
510
510
|
RoundRobinSendQueue sendQueue;
|
|
511
|
-
// To keep settings between sending of INIT
|
|
511
|
+
// To keep settings between sending of INIT chunk and establishment of
|
|
512
512
|
// the connection.
|
|
513
513
|
PreTransmissionControlBlock preTcb;
|
|
514
514
|
// Once the SCTP association is established a Transmission Control Block
|
|
@@ -522,7 +522,7 @@ namespace RTC
|
|
|
522
522
|
const std::unique_ptr<BackoffTimerHandleInterface> t1CookieTimer;
|
|
523
523
|
// T2-shutdown timer.
|
|
524
524
|
const std::unique_ptr<BackoffTimerHandleInterface> t2ShutdownTimer;
|
|
525
|
-
// Max SCTP
|
|
525
|
+
// Max SCTP packet length.
|
|
526
526
|
const size_t maxPacketLength;
|
|
527
527
|
// Whether this is DataChannel based SCTP.
|
|
528
528
|
bool isDataChannel;
|