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
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "handles/UdpSocketHandle.hpp"
|
|
6
|
+
#include "RTC/PortManager.hpp"
|
|
6
7
|
#include "RTC/Transport.hpp"
|
|
7
8
|
#include <string>
|
|
8
9
|
|
|
@@ -33,7 +34,7 @@ namespace RTC
|
|
|
33
34
|
uint16_t minPort,
|
|
34
35
|
uint16_t maxPort,
|
|
35
36
|
RTC::Transport::SocketFlags& flags,
|
|
36
|
-
|
|
37
|
+
RTC::PortManager::PortRangeKey& portRangeKey);
|
|
37
38
|
~UdpSocket() override;
|
|
38
39
|
|
|
39
40
|
/* Pure virtual methods inherited from ::UdpSocketHandle. */
|
|
@@ -45,7 +46,7 @@ namespace RTC
|
|
|
45
46
|
// Passed by argument.
|
|
46
47
|
Listener* listener{ nullptr };
|
|
47
48
|
bool fixedPort{ false };
|
|
48
|
-
|
|
49
|
+
RTC::PortManager::PortRangeKey portRangeKey{};
|
|
49
50
|
};
|
|
50
51
|
} // namespace RTC
|
|
51
52
|
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
#include "RTC/WebRtcTransport.hpp"
|
|
12
12
|
#include "SharedInterface.hpp"
|
|
13
13
|
#include <flatbuffers/flatbuffers.h>
|
|
14
|
-
#include <
|
|
15
|
-
#include <absl/container/flat_hash_set.h>
|
|
14
|
+
#include <ankerl/unordered_dense.h>
|
|
16
15
|
#include <string>
|
|
17
16
|
#include <vector>
|
|
18
17
|
|
|
@@ -116,11 +115,11 @@ namespace RTC
|
|
|
116
115
|
// Vector of UdpSockets and TcpServers in the user given order.
|
|
117
116
|
std::vector<UdpSocketOrTcpServer> udpSocketOrTcpServers;
|
|
118
117
|
// Set of WebRtcTransports.
|
|
119
|
-
|
|
118
|
+
ankerl::unordered_dense::set<RTC::WebRtcTransport*> webRtcTransports;
|
|
120
119
|
// Map of WebRtcTransports indexed by local ICE usernameFragment.
|
|
121
|
-
|
|
120
|
+
ankerl::unordered_dense::map<std::string, RTC::WebRtcTransport*> mapLocalIceUsernameFragmentWebRtcTransport;
|
|
122
121
|
// Map of WebRtcTransports indexed by TransportTuple.hash.
|
|
123
|
-
|
|
122
|
+
ankerl::unordered_dense::map<uint64_t, RTC::WebRtcTransport*> mapTupleWebRtcTransport;
|
|
124
123
|
// Whether the destructor has been called.
|
|
125
124
|
bool closing{ false };
|
|
126
125
|
};
|
|
@@ -158,8 +158,8 @@ namespace RTC
|
|
|
158
158
|
// Allocated by this.
|
|
159
159
|
RTC::ICE::IceServer* iceServer{ nullptr };
|
|
160
160
|
// Map of UdpSocket/TcpServer and local announced address (if any).
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
ankerl::unordered_dense::map<RTC::UdpSocket*, std::string> udpSockets;
|
|
162
|
+
ankerl::unordered_dense::map<RTC::TcpServer*, std::string> tcpServers;
|
|
163
163
|
RTC::DtlsTransport* dtlsTransport{ nullptr };
|
|
164
164
|
RTC::SrtpSession* srtpRecvSession{ nullptr };
|
|
165
165
|
RTC::SrtpSession* srtpSendSession{ nullptr };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "Channel/ChannelRequest.hpp"
|
|
6
6
|
#include "LogLevel.hpp"
|
|
7
|
-
#include <
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
8
8
|
#include <string>
|
|
9
9
|
#include <vector>
|
|
10
10
|
|
|
@@ -56,8 +56,8 @@ public:
|
|
|
56
56
|
static thread_local struct Configuration configuration;
|
|
57
57
|
|
|
58
58
|
private:
|
|
59
|
-
static const
|
|
60
|
-
static const
|
|
59
|
+
static const ankerl::unordered_dense::map<std::string, LogLevel> String2LogLevel;
|
|
60
|
+
static const ankerl::unordered_dense::map<LogLevel, std::string> LogLevel2String;
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
#endif
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
#include "RTC/WebRtcServer.hpp"
|
|
10
10
|
#include "SharedInterface.hpp"
|
|
11
11
|
#include <flatbuffers/flatbuffer_builder.h>
|
|
12
|
-
#include <
|
|
12
|
+
#include <ankerl/unordered_dense.h>
|
|
13
13
|
#include <string>
|
|
14
14
|
|
|
15
15
|
class Worker : public Channel::ChannelSocket::Listener,
|
|
@@ -54,8 +54,8 @@ private:
|
|
|
54
54
|
// Allocated by this.
|
|
55
55
|
SignalHandle* signalHandle{ nullptr };
|
|
56
56
|
SharedInterface* shared{ nullptr };
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
ankerl::unordered_dense::map<std::string, RTC::WebRtcServer*> mapWebRtcServers;
|
|
58
|
+
ankerl::unordered_dense::map<std::string, RTC::Router*> mapRouters;
|
|
59
59
|
// Others.
|
|
60
60
|
bool closed{ false };
|
|
61
61
|
};
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
#include "common.hpp"
|
|
5
5
|
#include "handles/TcpConnectionHandle.hpp"
|
|
6
6
|
#include <uv.h>
|
|
7
|
-
#include <
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
8
8
|
#include <string>
|
|
9
9
|
|
|
10
10
|
class TcpServerHandle : public TcpConnectionHandle::Listener
|
|
@@ -72,7 +72,7 @@ private:
|
|
|
72
72
|
// Allocated by this (may be passed by argument).
|
|
73
73
|
uv_tcp_t* uvHandle{ nullptr };
|
|
74
74
|
// Others.
|
|
75
|
-
|
|
75
|
+
ankerl::unordered_dense::set<TcpConnectionHandle*> connections;
|
|
76
76
|
bool closed{ false };
|
|
77
77
|
};
|
|
78
78
|
|
package/worker/meson.build
CHANGED
|
@@ -314,6 +314,8 @@ abseil_cpp_proj = subproject(
|
|
|
314
314
|
],
|
|
315
315
|
)
|
|
316
316
|
|
|
317
|
+
ankerl_unordered_dense_dep = dependency('unordered_dense')
|
|
318
|
+
|
|
317
319
|
flatbuffers_proj = subproject(
|
|
318
320
|
'flatbuffers',
|
|
319
321
|
default_options: [
|
|
@@ -326,24 +328,26 @@ subdir('fbs')
|
|
|
326
328
|
|
|
327
329
|
# Add current build directory so libwebrtc has access to FBS folder.
|
|
328
330
|
libwebrtc_include_directories = include_directories('include', 'fbs')
|
|
331
|
+
|
|
329
332
|
subdir('deps/libwebrtc')
|
|
330
333
|
|
|
331
334
|
dependencies = [
|
|
332
|
-
abseil_cpp_proj.get_variable('absl_container_dep'),
|
|
333
|
-
openssl_proj.get_variable('openssl_dep'),
|
|
334
335
|
libuv_proj.get_variable('libuv_dep'),
|
|
336
|
+
openssl_proj.get_variable('openssl_dep'),
|
|
335
337
|
libsrtp3_proj.get_variable('libsrtp3_dep'),
|
|
338
|
+
abseil_cpp_proj.get_variable('absl_container_dep'),
|
|
339
|
+
ankerl_unordered_dense_dep,
|
|
336
340
|
flatbuffers_proj.get_variable('flatbuffers_dep'),
|
|
337
341
|
flatbuffers_generator_dep,
|
|
338
342
|
libwebrtc_dep,
|
|
339
343
|
]
|
|
340
344
|
|
|
341
345
|
link_whole = [
|
|
342
|
-
|
|
346
|
+
libuv_proj.get_variable('libuv'),
|
|
343
347
|
openssl_proj.get_variable('libcrypto_lib'),
|
|
344
348
|
openssl_proj.get_variable('libssl_lib'),
|
|
345
|
-
libuv_proj.get_variable('libuv'),
|
|
346
349
|
libsrtp3_proj.get_variable('libsrtp3'),
|
|
350
|
+
abseil_cpp_proj.get_variable('absl_container_lib'),
|
|
347
351
|
flatbuffers_proj.get_variable('flatbuffers_lib'),
|
|
348
352
|
libwebrtc,
|
|
349
353
|
]
|
|
@@ -447,6 +451,7 @@ test_sources = [
|
|
|
447
451
|
'test/src/testHelpers.cpp',
|
|
448
452
|
'test/src/RTC/TestKeyFrameRequestManager.cpp',
|
|
449
453
|
'test/src/RTC/TestNackGenerator.cpp',
|
|
454
|
+
'test/src/RTC/TestPortManager.cpp',
|
|
450
455
|
'test/src/RTC/TestRateCalculator.cpp',
|
|
451
456
|
'test/src/RTC/TestRtpEncodingParameters.cpp',
|
|
452
457
|
'test/src/RTC/TestSeqManager.cpp',
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
#include "Channel/ChannelMessageRegistratorInterface.hpp"
|
|
5
5
|
// TODO: We should have a ChannelSocketInterface class instead.
|
|
6
6
|
#include "Channel/ChannelSocket.hpp"
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
7
8
|
#include <string>
|
|
8
|
-
#include <unordered_map>
|
|
9
9
|
|
|
10
10
|
namespace mocks
|
|
11
11
|
{
|
|
@@ -35,8 +35,9 @@ namespace mocks
|
|
|
35
35
|
const std::string& id) override;
|
|
36
36
|
|
|
37
37
|
private:
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
ankerl::unordered_dense::map<std::string, ::Channel::ChannelSocket::RequestHandler*>
|
|
39
|
+
mapChannelRequestHandlers;
|
|
40
|
+
ankerl::unordered_dense::map<std::string, ::Channel::ChannelSocket::NotificationHandler*>
|
|
40
41
|
mapChannelNotificationHandlers;
|
|
41
42
|
};
|
|
42
43
|
} // namespace Channel
|
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
#include "Channel/ChannelNotification.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
6
|
#include "MediaSoupErrors.hpp"
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
7
8
|
|
|
8
9
|
namespace Channel
|
|
9
10
|
{
|
|
10
|
-
/*
|
|
11
|
+
/* Static. */
|
|
11
12
|
|
|
12
13
|
// clang-format off
|
|
13
|
-
const
|
|
14
|
+
static const ankerl::unordered_dense::map<FBS::Notification::Event, const char*> Event2String =
|
|
14
15
|
{
|
|
15
16
|
{ FBS::Notification::Event::WORKER_CLOSE, "worker.close" },
|
|
16
17
|
{ FBS::Notification::Event::TRANSPORT_SEND_RTCP, "transport.sendRtcp" },
|
|
@@ -28,9 +29,9 @@ namespace Channel
|
|
|
28
29
|
this->data = notification;
|
|
29
30
|
this->event = notification->event();
|
|
30
31
|
|
|
31
|
-
auto eventCStrIt =
|
|
32
|
+
auto eventCStrIt = Event2String.find(this->event);
|
|
32
33
|
|
|
33
|
-
if (eventCStrIt ==
|
|
34
|
+
if (eventCStrIt == Event2String.end())
|
|
34
35
|
{
|
|
35
36
|
MS_THROW_ERROR("unknown event '%" PRIu8 "'", static_cast<uint8_t>(this->event));
|
|
36
37
|
}
|
|
@@ -4,15 +4,14 @@
|
|
|
4
4
|
#include "Channel/ChannelRequest.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
6
|
#include "MediaSoupErrors.hpp"
|
|
7
|
+
#include <ankerl/unordered_dense.h>
|
|
7
8
|
|
|
8
9
|
namespace Channel
|
|
9
10
|
{
|
|
10
|
-
/*
|
|
11
|
-
|
|
12
|
-
thread_local flatbuffers::FlatBufferBuilder ChannelRequest::bufferBuilder{};
|
|
11
|
+
/* Static. */
|
|
13
12
|
|
|
14
13
|
// clang-format off
|
|
15
|
-
const
|
|
14
|
+
static const ankerl::unordered_dense::map<FBS::Request::Method, const char*> Method2String =
|
|
16
15
|
{
|
|
17
16
|
{ FBS::Request::Method::WORKER_DUMP, "worker.dump" },
|
|
18
17
|
{ FBS::Request::Method::WORKER_GET_RESOURCE_USAGE, "worker.getResourceUsage" },
|
|
@@ -85,6 +84,10 @@ namespace Channel
|
|
|
85
84
|
};
|
|
86
85
|
// clang-format on
|
|
87
86
|
|
|
87
|
+
/* Class variables. */
|
|
88
|
+
|
|
89
|
+
thread_local flatbuffers::FlatBufferBuilder ChannelRequest::bufferBuilder{};
|
|
90
|
+
|
|
88
91
|
/* Instance methods. */
|
|
89
92
|
|
|
90
93
|
/**
|
|
@@ -99,9 +102,9 @@ namespace Channel
|
|
|
99
102
|
this->id = request->id();
|
|
100
103
|
this->method = request->method();
|
|
101
104
|
|
|
102
|
-
const auto methodCStrIt =
|
|
105
|
+
const auto methodCStrIt = Method2String.find(this->method);
|
|
103
106
|
|
|
104
|
-
if (methodCStrIt ==
|
|
107
|
+
if (methodCStrIt == Method2String.end())
|
|
105
108
|
{
|
|
106
109
|
Error("unknown method");
|
|
107
110
|
|
|
@@ -16,7 +16,7 @@ static size_t GlobalInstances = 0;
|
|
|
16
16
|
// https://github.com/cisco/libsrtp/blob/main/include/srtp.h
|
|
17
17
|
//
|
|
18
18
|
// clang-format off
|
|
19
|
-
const
|
|
19
|
+
const ankerl::unordered_dense::map<srtp_err_status_t, std::string> DepLibSRTP::ErrorCode2String =
|
|
20
20
|
{
|
|
21
21
|
{ srtp_err_status_ok, "nothing to report" },
|
|
22
22
|
{ srtp_err_status_fail, "unspecified failure" },
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
#include "Logger.hpp"
|
|
6
6
|
#include "MediaSoupErrors.hpp"
|
|
7
7
|
#include "RTC/RtpDictionaries.hpp"
|
|
8
|
-
#include <absl/container/btree_map.h>
|
|
9
8
|
#include <cmath> // std::lround()
|
|
9
|
+
#include <map> // std::multimap
|
|
10
10
|
|
|
11
11
|
namespace RTC
|
|
12
12
|
{
|
|
@@ -143,7 +143,7 @@ namespace RTC
|
|
|
143
143
|
{
|
|
144
144
|
MS_TRACE();
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
std::multimap<int8_t, RTC::Producer*> mapDBovsProducer;
|
|
147
147
|
|
|
148
148
|
for (auto& kv : this->mapProducerDBovs)
|
|
149
149
|
{
|
|
@@ -277,12 +277,22 @@ namespace RTC
|
|
|
277
277
|
len);
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
+
// NOTE: Capturing `this` and `request` (by reference) is safe here because the
|
|
281
|
+
// callback is always invoked synchronously within this same call stack (never
|
|
282
|
+
// deferred).
|
|
280
283
|
const auto* cb = new onQueuedCallback(
|
|
281
|
-
[&request](bool queued, bool sctpSendBufferFull)
|
|
284
|
+
[this, &request](bool queued, bool sctpSendBufferFull)
|
|
282
285
|
{
|
|
283
286
|
if (queued)
|
|
284
287
|
{
|
|
285
|
-
|
|
288
|
+
uint32_t bufferedAmount{ 0 };
|
|
289
|
+
|
|
290
|
+
this->listener->OnDataConsumerNeedBufferedAmount(this, bufferedAmount);
|
|
291
|
+
|
|
292
|
+
auto responseOffset = FBS::DataConsumer::CreateGetBufferedAmountResponse(
|
|
293
|
+
request->GetBufferBuilder(), bufferedAmount);
|
|
294
|
+
|
|
295
|
+
request->Accept(FBS::Response::Body::DataConsumer_SendResponse, responseOffset);
|
|
286
296
|
}
|
|
287
297
|
else
|
|
288
298
|
{
|
|
@@ -296,7 +306,7 @@ namespace RTC
|
|
|
296
306
|
this->type == DataConsumer::Type::SCTP ? this->sctpStreamParameters.streamId : 0;
|
|
297
307
|
|
|
298
308
|
// NOTE: We are creating a copy of the data here, otherwise we cannot
|
|
299
|
-
// move the
|
|
309
|
+
// move the message and pass its ownership to the SCTP stack.
|
|
300
310
|
RTC::SCTP::Message message(streamId, body->ppid(), std::vector<uint8_t>(data, data + len));
|
|
301
311
|
|
|
302
312
|
SendMessage(std::move(message), emptySubchannels, std::nullopt, cb);
|
|
@@ -233,7 +233,7 @@ namespace RTC
|
|
|
233
233
|
this->type == DataProducer::Type::SCTP ? this->sctpStreamParameters.streamId : 0;
|
|
234
234
|
|
|
235
235
|
// NOTE: We are creating a copy of the data here, otherwise we cannot
|
|
236
|
-
// move the
|
|
236
|
+
// move the message and pass its ownership to the SCTP stack.
|
|
237
237
|
RTC::SCTP::Message message(streamId, body->ppid(), std::vector<uint8_t>(data, data + len));
|
|
238
238
|
|
|
239
239
|
ReceiveMessage(std::move(message), subchannels, requiredSubchannel);
|
|
@@ -124,7 +124,7 @@ namespace RTC
|
|
|
124
124
|
thread_local EVP_PKEY* DtlsTransport::privateKey{ nullptr };
|
|
125
125
|
thread_local SSL_CTX* DtlsTransport::sslCtx{ nullptr };
|
|
126
126
|
thread_local uint8_t DtlsTransport::sslReadBuffer[SslReadBufferSize];
|
|
127
|
-
const
|
|
127
|
+
const ankerl::unordered_dense::map<std::string, DtlsTransport::FingerprintAlgorithm>
|
|
128
128
|
DtlsTransport::String2FingerprintAlgorithm = {
|
|
129
129
|
{ "sha-1", DtlsTransport::FingerprintAlgorithm::SHA1 },
|
|
130
130
|
{ "sha-224", DtlsTransport::FingerprintAlgorithm::SHA224 },
|
|
@@ -132,7 +132,7 @@ namespace RTC
|
|
|
132
132
|
{ "sha-384", DtlsTransport::FingerprintAlgorithm::SHA384 },
|
|
133
133
|
{ "sha-512", DtlsTransport::FingerprintAlgorithm::SHA512 }
|
|
134
134
|
};
|
|
135
|
-
const
|
|
135
|
+
const ankerl::unordered_dense::map<DtlsTransport::FingerprintAlgorithm, std::string>
|
|
136
136
|
DtlsTransport::FingerprintAlgorithm2String = {
|
|
137
137
|
{ DtlsTransport::FingerprintAlgorithm::SHA1, "sha-1" },
|
|
138
138
|
{ DtlsTransport::FingerprintAlgorithm::SHA224, "sha-224" },
|
|
@@ -140,7 +140,7 @@ namespace RTC
|
|
|
140
140
|
{ DtlsTransport::FingerprintAlgorithm::SHA384, "sha-384" },
|
|
141
141
|
{ DtlsTransport::FingerprintAlgorithm::SHA512, "sha-512" }
|
|
142
142
|
};
|
|
143
|
-
const
|
|
143
|
+
const ankerl::unordered_dense::map<std::string, DtlsTransport::Role> DtlsTransport::String2Role = {
|
|
144
144
|
{ "auto", DtlsTransport::Role::AUTO },
|
|
145
145
|
{ "client", DtlsTransport::Role::CLIENT },
|
|
146
146
|
{ "server", DtlsTransport::Role::SERVER }
|
|
@@ -20,7 +20,7 @@ namespace RTC
|
|
|
20
20
|
/* Class variables. */
|
|
21
21
|
|
|
22
22
|
// clang-format off
|
|
23
|
-
|
|
23
|
+
ankerl::unordered_dense::map<IceServer::IceState, std::string> IceServer::iceStateToString =
|
|
24
24
|
{
|
|
25
25
|
{ IceServer::IceState::NEW, "new" },
|
|
26
26
|
{ IceServer::IceState::CONNECTED, "connected" },
|