mediasoup 3.19.21 → 3.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node/lib/ActiveSpeakerObserver.js +34 -1
- package/node/lib/AudioLevelObserver.js +35 -2
- package/node/lib/Channel.d.ts.map +1 -1
- package/node/lib/Channel.js +37 -5
- package/node/lib/Consumer.js +39 -6
- package/node/lib/DataConsumer.d.ts.map +1 -1
- package/node/lib/DataConsumer.js +39 -5
- package/node/lib/DataConsumerTypes.d.ts +1 -0
- package/node/lib/DataConsumerTypes.d.ts.map +1 -1
- package/node/lib/DataProducer.js +37 -4
- package/node/lib/DirectTransport.js +37 -4
- package/node/lib/DirectTransportTypes.d.ts +7 -2
- package/node/lib/DirectTransportTypes.d.ts.map +1 -1
- package/node/lib/Logger.js +4 -1
- package/node/lib/PipeTransport.d.ts +3 -1
- package/node/lib/PipeTransport.d.ts.map +1 -1
- package/node/lib/PipeTransport.js +56 -5
- package/node/lib/PipeTransportTypes.d.ts +28 -8
- package/node/lib/PipeTransportTypes.d.ts.map +1 -1
- package/node/lib/PlainTransport.d.ts +3 -1
- package/node/lib/PlainTransport.d.ts.map +1 -1
- package/node/lib/PlainTransport.js +54 -3
- package/node/lib/PlainTransportTypes.d.ts +27 -7
- package/node/lib/PlainTransportTypes.d.ts.map +1 -1
- package/node/lib/Producer.js +40 -7
- package/node/lib/Router.d.ts +5 -5
- package/node/lib/Router.d.ts.map +1 -1
- package/node/lib/Router.js +81 -36
- package/node/lib/RouterTypes.d.ts +25 -3
- package/node/lib/RouterTypes.d.ts.map +1 -1
- package/node/lib/RtpObserver.js +36 -3
- package/node/lib/Transport.d.ts +3 -1
- package/node/lib/Transport.d.ts.map +1 -1
- package/node/lib/Transport.js +74 -22
- package/node/lib/TransportTypes.d.ts +2 -1
- package/node/lib/TransportTypes.d.ts.map +1 -1
- package/node/lib/WebRtcServer.js +36 -3
- package/node/lib/WebRtcTransport.d.ts +3 -1
- package/node/lib/WebRtcTransport.d.ts.map +1 -1
- package/node/lib/WebRtcTransport.js +55 -4
- package/node/lib/WebRtcTransportTypes.d.ts +27 -7
- package/node/lib/WebRtcTransportTypes.d.ts.map +1 -1
- package/node/lib/Worker.d.ts +2 -1
- package/node/lib/Worker.d.ts.map +1 -1
- package/node/lib/Worker.js +71 -25
- package/node/lib/WorkerTypes.d.ts +0 -4
- package/node/lib/WorkerTypes.d.ts.map +1 -1
- package/node/lib/enhancedEvents.d.ts +2 -2
- package/node/lib/enhancedEvents.d.ts.map +1 -1
- package/node/lib/enhancedEvents.js +0 -2
- package/node/lib/fbs/active-speaker-observer/active-speaker-observer-options.js +34 -1
- package/node/lib/fbs/active-speaker-observer/dominant-speaker-notification.js +34 -1
- package/node/lib/fbs/audio-level-observer/audio-level-observer-options.js +34 -1
- package/node/lib/fbs/audio-level-observer/volume.js +34 -1
- package/node/lib/fbs/audio-level-observer/volumes-notification.js +34 -1
- package/node/lib/fbs/common/string-string-array.js +34 -1
- package/node/lib/fbs/common/string-string.js +34 -1
- package/node/lib/fbs/common/string-uint8.js +34 -1
- package/node/lib/fbs/common/uint16-string.js +34 -1
- package/node/lib/fbs/common/uint32-string.js +34 -1
- package/node/lib/fbs/consumer/base-consumer-dump.js +34 -1
- package/node/lib/fbs/consumer/consumer-dump.js +34 -1
- package/node/lib/fbs/consumer/consumer-layers.js +34 -1
- package/node/lib/fbs/consumer/consumer-score.js +34 -1
- package/node/lib/fbs/consumer/dump-response.js +34 -1
- package/node/lib/fbs/consumer/enable-trace-event-request.js +34 -1
- package/node/lib/fbs/consumer/fir-trace-info.js +34 -1
- package/node/lib/fbs/consumer/get-stats-response.js +34 -1
- package/node/lib/fbs/consumer/key-frame-trace-info.js +34 -1
- package/node/lib/fbs/consumer/layers-change-notification.js +34 -1
- package/node/lib/fbs/consumer/pli-trace-info.js +34 -1
- package/node/lib/fbs/consumer/rtp-notification.js +34 -1
- package/node/lib/fbs/consumer/rtp-trace-info.js +34 -1
- package/node/lib/fbs/consumer/score-notification.js +34 -1
- package/node/lib/fbs/consumer/set-preferred-layers-request.js +34 -1
- package/node/lib/fbs/consumer/set-preferred-layers-response.js +34 -1
- package/node/lib/fbs/consumer/set-priority-request.js +34 -1
- package/node/lib/fbs/consumer/set-priority-response.js +34 -1
- package/node/lib/fbs/consumer/trace-notification.js +34 -1
- package/node/lib/fbs/data-consumer/add-subchannel-request.js +34 -1
- package/node/lib/fbs/data-consumer/add-subchannel-response.js +34 -1
- package/node/lib/fbs/data-consumer/buffered-amount-low-notification.js +34 -1
- package/node/lib/fbs/data-consumer/dump-response.d.ts +5 -2
- package/node/lib/fbs/data-consumer/dump-response.d.ts.map +1 -1
- package/node/lib/fbs/data-consumer/dump-response.js +60 -16
- package/node/lib/fbs/data-consumer/get-buffered-amount-response.js +34 -1
- package/node/lib/fbs/data-consumer/get-stats-response.js +34 -1
- package/node/lib/fbs/data-consumer/message-notification.js +34 -1
- package/node/lib/fbs/data-consumer/remove-subchannel-request.js +34 -1
- package/node/lib/fbs/data-consumer/remove-subchannel-response.js +34 -1
- package/node/lib/fbs/data-consumer/send-request.js +34 -1
- package/node/lib/fbs/data-consumer/set-buffered-amount-low-threshold-request.js +34 -1
- package/node/lib/fbs/data-consumer/set-subchannels-request.js +34 -1
- package/node/lib/fbs/data-consumer/set-subchannels-response.js +34 -1
- package/node/lib/fbs/data-consumer/type.d.ts +5 -0
- package/node/lib/fbs/data-consumer/type.d.ts.map +1 -0
- package/node/lib/fbs/data-consumer/type.js +10 -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 +3 -1
- package/node/lib/fbs/data-producer/dump-response.js +34 -1
- package/node/lib/fbs/data-producer/get-stats-response.js +34 -1
- package/node/lib/fbs/data-producer/send-notification.js +34 -1
- package/node/lib/fbs/direct-transport/direct-transport-options.js +34 -1
- package/node/lib/fbs/direct-transport/dump-response.js +34 -1
- package/node/lib/fbs/direct-transport/get-stats-response.js +34 -1
- package/node/lib/fbs/direct-transport/rtcp-notification.js +34 -1
- package/node/lib/fbs/lib-uring/dump.js +34 -1
- package/node/lib/fbs/log/log.js +34 -1
- package/node/lib/fbs/message/message.js +34 -1
- package/node/lib/fbs/notification/body.d.ts +24 -22
- package/node/lib/fbs/notification/body.d.ts.map +1 -1
- package/node/lib/fbs/notification/body.js +24 -20
- package/node/lib/fbs/notification/event.d.ts +27 -26
- package/node/lib/fbs/notification/event.d.ts.map +1 -1
- package/node/lib/fbs/notification/event.js +27 -26
- package/node/lib/fbs/notification/notification.d.ts +3 -2
- package/node/lib/fbs/notification/notification.d.ts.map +1 -1
- package/node/lib/fbs/notification/notification.js +34 -1
- package/node/lib/fbs/pipe-transport/connect-request.js +34 -1
- package/node/lib/fbs/pipe-transport/connect-response.js +34 -1
- package/node/lib/fbs/pipe-transport/dump-response.js +34 -1
- package/node/lib/fbs/pipe-transport/get-stats-response.js +34 -1
- package/node/lib/fbs/pipe-transport/pipe-transport-options.js +34 -1
- package/node/lib/fbs/plain-transport/connect-request.js +34 -1
- package/node/lib/fbs/plain-transport/connect-response.js +34 -1
- package/node/lib/fbs/plain-transport/dump-response.js +34 -1
- package/node/lib/fbs/plain-transport/get-stats-response.js +34 -1
- package/node/lib/fbs/plain-transport/plain-transport-options.js +34 -1
- package/node/lib/fbs/plain-transport/rtcp-tuple-notification.js +34 -1
- package/node/lib/fbs/plain-transport/tuple-notification.js +34 -1
- package/node/lib/fbs/producer/dump-response.js +34 -1
- package/node/lib/fbs/producer/enable-trace-event-request.js +34 -1
- package/node/lib/fbs/producer/fir-trace-info.js +34 -1
- package/node/lib/fbs/producer/get-stats-response.js +34 -1
- package/node/lib/fbs/producer/key-frame-trace-info.js +34 -1
- package/node/lib/fbs/producer/pli-trace-info.js +34 -1
- package/node/lib/fbs/producer/rtp-trace-info.js +34 -1
- package/node/lib/fbs/producer/score-notification.js +34 -1
- package/node/lib/fbs/producer/score.js +34 -1
- package/node/lib/fbs/producer/send-notification.js +34 -1
- package/node/lib/fbs/producer/sr-trace-info.js +34 -1
- package/node/lib/fbs/producer/trace-notification.js +34 -1
- package/node/lib/fbs/producer/video-orientation-change-notification.js +34 -1
- package/node/lib/fbs/request/request.js +34 -1
- package/node/lib/fbs/response/response.js +34 -1
- package/node/lib/fbs/router/close-rtp-observer-request.js +34 -1
- package/node/lib/fbs/router/close-transport-request.js +34 -1
- package/node/lib/fbs/router/create-active-speaker-observer-request.js +34 -1
- package/node/lib/fbs/router/create-audio-level-observer-request.js +34 -1
- package/node/lib/fbs/router/create-direct-transport-request.js +34 -1
- package/node/lib/fbs/router/create-pipe-transport-request.js +34 -1
- package/node/lib/fbs/router/create-plain-transport-request.js +34 -1
- package/node/lib/fbs/router/create-web-rtc-transport-request.js +34 -1
- package/node/lib/fbs/router/dump-response.js +34 -1
- package/node/lib/fbs/rtp-observer/add-producer-request.js +34 -1
- package/node/lib/fbs/rtp-observer/remove-producer-request.js +34 -1
- package/node/lib/fbs/rtp-packet/dump.js +34 -1
- package/node/lib/fbs/rtp-parameters/boolean.js +34 -1
- package/node/lib/fbs/rtp-parameters/codec-mapping.js +34 -1
- package/node/lib/fbs/rtp-parameters/double.js +34 -1
- package/node/lib/fbs/rtp-parameters/encoding-mapping.js +34 -1
- package/node/lib/fbs/rtp-parameters/integer32-array.js +34 -1
- package/node/lib/fbs/rtp-parameters/integer32.js +34 -1
- package/node/lib/fbs/rtp-parameters/parameter.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtcp-feedback.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtcp-parameters.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtp-codec-parameters.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtp-encoding-parameters.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtp-header-extension-parameters.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtp-mapping.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtp-parameters.js +34 -1
- package/node/lib/fbs/rtp-parameters/rtx.js +34 -1
- package/node/lib/fbs/rtp-parameters/string.js +34 -1
- package/node/lib/fbs/rtp-stream/base-stats.js +34 -1
- package/node/lib/fbs/rtp-stream/bitrate-by-layer.js +34 -1
- package/node/lib/fbs/rtp-stream/dump.js +34 -1
- package/node/lib/fbs/rtp-stream/params.js +34 -1
- package/node/lib/fbs/rtp-stream/recv-stats.js +34 -1
- package/node/lib/fbs/rtp-stream/send-stats.js +34 -1
- package/node/lib/fbs/rtp-stream/stats.js +34 -1
- package/node/lib/fbs/rtx-stream/params.js +34 -1
- package/node/lib/fbs/rtx-stream/rtx-dump.js +34 -1
- package/node/lib/fbs/sctp-association/sctp-negotiated-capabilities.d.ts +24 -0
- package/node/lib/fbs/sctp-association/sctp-negotiated-capabilities.d.ts.map +1 -0
- package/node/lib/fbs/sctp-association/sctp-negotiated-capabilities.js +102 -0
- package/node/lib/fbs/sctp-association.d.ts +1 -0
- package/node/lib/fbs/sctp-association.d.ts.map +1 -1
- package/node/lib/fbs/sctp-association.js +4 -1
- package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +34 -1
- package/node/lib/fbs/sctp-parameters/sctp-parameters.d.ts +14 -14
- package/node/lib/fbs/sctp-parameters/sctp-parameters.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters/sctp-parameters.js +73 -40
- package/node/lib/fbs/sctp-parameters/sctp-stream-parameters.js +34 -1
- package/node/lib/fbs/sctp-parameters.d.ts +0 -1
- package/node/lib/fbs/sctp-parameters.d.ts.map +1 -1
- package/node/lib/fbs/sctp-parameters.js +1 -4
- package/node/lib/fbs/srtp-parameters/srtp-parameters.js +34 -1
- package/node/lib/fbs/transport/bwe-trace-info.js +34 -1
- package/node/lib/fbs/transport/close-consumer-request.js +34 -1
- package/node/lib/fbs/transport/close-data-consumer-request.js +34 -1
- package/node/lib/fbs/transport/close-data-producer-request.js +34 -1
- package/node/lib/fbs/transport/close-producer-request.js +34 -1
- package/node/lib/fbs/transport/consume-data-request.d.ts +1 -1
- package/node/lib/fbs/transport/consume-data-request.js +35 -2
- package/node/lib/fbs/transport/consume-request.js +34 -1
- package/node/lib/fbs/transport/consume-response.js +34 -1
- package/node/lib/fbs/transport/dump.d.ts +7 -4
- package/node/lib/fbs/transport/dump.d.ts.map +1 -1
- package/node/lib/fbs/transport/dump.js +66 -22
- package/node/lib/fbs/transport/enable-trace-event-request.js +34 -1
- package/node/lib/fbs/transport/listen-info.js +34 -1
- package/node/lib/fbs/transport/options.d.ts +14 -14
- package/node/lib/fbs/transport/options.d.ts.map +1 -1
- package/node/lib/fbs/transport/options.js +92 -51
- package/node/lib/fbs/transport/port-range.js +34 -1
- package/node/lib/fbs/transport/produce-data-request.js +34 -1
- package/node/lib/fbs/transport/produce-request.js +34 -1
- package/node/lib/fbs/transport/produce-response.js +34 -1
- package/node/lib/fbs/transport/recv-rtp-header-extensions.js +34 -1
- package/node/lib/fbs/transport/restart-ice-response.js +34 -1
- package/node/lib/fbs/transport/rtp-listener.js +34 -1
- package/node/lib/fbs/transport/sctp-listener.js +34 -1
- package/node/lib/fbs/transport/sctp-negotiated-capabilities-notification.d.ts +22 -0
- package/node/lib/fbs/transport/sctp-negotiated-capabilities-notification.d.ts.map +1 -0
- package/node/lib/fbs/transport/sctp-negotiated-capabilities-notification.js +93 -0
- package/node/lib/fbs/transport/sctp-state-change-notification.js +34 -1
- package/node/lib/fbs/transport/send-rtcp-notification.js +34 -1
- package/node/lib/fbs/transport/set-max-incoming-bitrate-request.js +34 -1
- package/node/lib/fbs/transport/set-max-outgoing-bitrate-request.js +34 -1
- package/node/lib/fbs/transport/set-min-outgoing-bitrate-request.js +34 -1
- package/node/lib/fbs/transport/socket-flags.js +34 -1
- package/node/lib/fbs/transport/stats.js +34 -1
- package/node/lib/fbs/transport/trace-notification.js +34 -1
- package/node/lib/fbs/transport/tuple.js +34 -1
- package/node/lib/fbs/transport.d.ts +1 -0
- package/node/lib/fbs/transport.d.ts.map +1 -1
- package/node/lib/fbs/transport.js +5 -2
- package/node/lib/fbs/web-rtc-server/dump-response.js +34 -1
- package/node/lib/fbs/web-rtc-server/ice-user-name-fragment.js +34 -1
- package/node/lib/fbs/web-rtc-server/ip-port.js +34 -1
- package/node/lib/fbs/web-rtc-server/tuple-hash.js +34 -1
- package/node/lib/fbs/web-rtc-transport/connect-request.js +34 -1
- package/node/lib/fbs/web-rtc-transport/connect-response.js +34 -1
- package/node/lib/fbs/web-rtc-transport/dtls-parameters.js +34 -1
- package/node/lib/fbs/web-rtc-transport/dtls-state-change-notification.js +34 -1
- package/node/lib/fbs/web-rtc-transport/dump-response.js +34 -1
- package/node/lib/fbs/web-rtc-transport/fingerprint.js +34 -1
- package/node/lib/fbs/web-rtc-transport/get-stats-response.js +34 -1
- package/node/lib/fbs/web-rtc-transport/ice-candidate.js +34 -1
- package/node/lib/fbs/web-rtc-transport/ice-parameters.js +34 -1
- package/node/lib/fbs/web-rtc-transport/ice-selected-tuple-change-notification.js +34 -1
- package/node/lib/fbs/web-rtc-transport/ice-state-change-notification.js +34 -1
- package/node/lib/fbs/web-rtc-transport/listen-individual.js +34 -1
- package/node/lib/fbs/web-rtc-transport/listen-server.js +34 -1
- package/node/lib/fbs/web-rtc-transport/web-rtc-transport-options.js +34 -1
- package/node/lib/fbs/worker/channel-message-handlers.js +34 -1
- package/node/lib/fbs/worker/close-router-request.js +34 -1
- package/node/lib/fbs/worker/close-web-rtc-server-request.js +34 -1
- package/node/lib/fbs/worker/create-router-request.js +34 -1
- package/node/lib/fbs/worker/create-web-rtc-server-request.js +34 -1
- package/node/lib/fbs/worker/dump-response.js +34 -1
- package/node/lib/fbs/worker/resource-usage-response.js +34 -1
- package/node/lib/fbs/worker/update-settings-request.js +34 -1
- package/node/lib/index.d.ts +1 -1
- package/node/lib/index.d.ts.map +1 -1
- package/node/lib/index.js +37 -5
- package/node/lib/ortc.js +36 -3
- package/node/lib/rtpParametersFbsUtils.js +34 -1
- package/node/lib/rtpStreamStatsFbsUtils.js +35 -2
- package/node/lib/sctpParametersFbsUtils.d.ts +2 -2
- package/node/lib/sctpParametersFbsUtils.d.ts.map +1 -1
- package/node/lib/sctpParametersFbsUtils.js +44 -7
- package/node/lib/sctpParametersTypes.d.ts +10 -46
- package/node/lib/sctpParametersTypes.d.ts.map +1 -1
- package/node/lib/srtpParametersFbsUtils.js +34 -1
- package/node/lib/test/test-ActiveSpeakerObserver.js +35 -2
- package/node/lib/test/test-AudioLevelObserver.js +35 -2
- package/node/lib/test/test-Consumer.js +37 -4
- package/node/lib/test/test-DataConsumer.js +35 -2
- package/node/lib/test/test-DataProducer.js +35 -2
- package/node/lib/test/test-DirectTransport.js +36 -8
- package/node/lib/test/test-PipeTransport.js +35 -2
- package/node/lib/test/test-PlainTransport.js +45 -12
- package/node/lib/test/test-Producer.js +37 -4
- package/node/lib/test/test-Router.js +35 -2
- package/node/lib/test/test-WebRtcServer.js +34 -1
- package/node/lib/test/test-WebRtcTransport.js +51 -22
- package/node/lib/test/test-Worker.js +37 -4
- package/node/lib/test/test-mediasoup.js +36 -3
- package/node/lib/test/test-multiopus.js +35 -2
- package/node/lib/test/test-ortc.js +34 -1
- package/node/lib/test/test-werift-sctp.js +39 -5
- package/npm-scripts.mjs +2 -2
- package/package.json +13 -11
- package/worker/deps/libwebrtc/LICENSE +5 -0
- package/worker/deps/libwebrtc/README.md +3 -3
- package/worker/deps/libwebrtc/libwebrtc/mediasoup_helpers.h +13 -10
- package/worker/fbs/dataConsumer.fbs +7 -2
- package/worker/fbs/dataProducer.fbs +1 -0
- package/worker/fbs/notification.fbs +2 -0
- package/worker/fbs/sctpAssociation.fbs +4 -0
- package/worker/fbs/sctpParameters.fbs +5 -12
- package/worker/fbs/transport.fbs +12 -8
- package/worker/fuzzer/src/RTC/FuzzerDtlsTransport.cpp +13 -3
- package/worker/fuzzer/src/RTC/FuzzerRateCalculator.cpp +2 -2
- package/worker/fuzzer/src/RTC/FuzzerSeqManager.cpp +1 -1
- package/worker/fuzzer/src/RTC/FuzzerTrendCalculator.cpp +5 -5
- package/worker/fuzzer/src/RTC/ICE/FuzzerStunPacket.cpp +9 -6
- package/worker/fuzzer/src/RTC/RTP/FuzzerRetransmissionBuffer.cpp +1 -1
- package/worker/fuzzer/src/RTC/RTP/FuzzerRtpStreamSend.cpp +14 -2
- package/worker/fuzzer/src/RTC/SCTP/association/FuzzerStateCookie.cpp +1 -1
- package/worker/fuzzer/src/RTC/SCTP/packet/FuzzerPacket.cpp +5 -2
- package/worker/fuzzer/src/fuzzer.cpp +3 -10
- package/worker/include/Channel/ChannelMessageRegistrator.hpp +39 -0
- package/worker/include/Channel/ChannelMessageRegistratorInterface.hpp +32 -0
- package/worker/include/Channel/ChannelRequest.hpp +1 -1
- package/worker/include/Channel/ChannelSocket.hpp +1 -1
- package/worker/include/DepLibUV.hpp +1 -1
- package/worker/include/DepLibUring.hpp +3 -3
- package/worker/include/Logger.hpp +4 -4
- package/worker/include/MediaSoupErrors.hpp +1 -1
- package/worker/include/RTC/ActiveSpeakerObserver.hpp +11 -9
- package/worker/include/RTC/AudioLevelObserver.hpp +7 -7
- package/worker/include/RTC/Consumer.hpp +3 -3
- package/worker/include/RTC/DataConsumer.hpp +13 -17
- package/worker/include/RTC/DataProducer.hpp +6 -9
- package/worker/include/RTC/DirectTransport.hpp +4 -6
- package/worker/include/RTC/DtlsTransport.hpp +13 -11
- package/worker/include/RTC/ICE/IceServer.hpp +8 -5
- package/worker/include/RTC/ICE/StunPacket.hpp +1 -1
- package/worker/include/RTC/KeyFrameRequestManager.hpp +15 -12
- package/worker/include/RTC/NackGenerator.hpp +8 -6
- package/worker/include/RTC/PipeConsumer.hpp +1 -2
- package/worker/include/RTC/PipeTransport.hpp +4 -6
- package/worker/include/RTC/PlainTransport.hpp +4 -6
- package/worker/include/RTC/PortManager.hpp +1 -1
- package/worker/include/RTC/Producer.hpp +3 -3
- package/worker/include/RTC/RTCP/FeedbackPs.hpp +1 -1
- package/worker/include/RTC/RTCP/FeedbackRtp.hpp +1 -1
- package/worker/include/RTC/RTCP/FeedbackRtpNack.hpp +1 -1
- package/worker/include/RTC/RTCP/ReceiverReport.hpp +1 -1
- package/worker/include/RTC/RTP/Packet.hpp +2 -2
- package/worker/include/RTC/RTP/RtpStream.hpp +17 -12
- package/worker/include/RTC/RTP/RtpStreamRecv.hpp +8 -6
- package/worker/include/RTC/RTP/RtpStreamSend.hpp +4 -1
- package/worker/include/RTC/RTP/RtxStream.hpp +3 -1
- package/worker/include/RTC/RTP/SharedPacket.hpp +1 -1
- package/worker/include/RTC/RateCalculator.hpp +5 -2
- package/worker/include/RTC/Router.hpp +7 -8
- package/worker/include/RTC/RtpObserver.hpp +3 -3
- package/worker/include/RTC/SCTP/association/Association.hpp +53 -19
- package/worker/include/RTC/SCTP/association/AssociationListenerDeferrer.hpp +14 -6
- package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +18 -14
- package/worker/include/RTC/SCTP/association/PacketSender.hpp +3 -3
- package/worker/include/RTC/SCTP/association/StateCookie.hpp +1 -1
- package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +49 -35
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +114 -31
- package/worker/include/RTC/SCTP/association/{TCBContext.hpp → TransmissionControlBlockContextInterface.hpp} +14 -8
- package/worker/include/RTC/SCTP/packet/Chunk.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/TLV.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/UserData.hpp +61 -17
- package/worker/include/RTC/SCTP/packet/chunks/AnyDataChunk.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/chunks/AnyForwardTsnChunk.hpp +9 -9
- package/worker/include/RTC/SCTP/packet/chunks/AnyInitChunk.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +4 -2
- package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +4 -2
- package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +3 -3
- package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +10 -3
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +1 -1
- package/worker/include/RTC/SCTP/public/AssociationInterface.hpp +22 -2
- package/worker/include/RTC/SCTP/public/{AssociationListener.hpp → AssociationListenerInterface.hpp} +5 -5
- package/worker/include/RTC/SCTP/public/Message.hpp +26 -10
- package/worker/include/RTC/SCTP/public/SctpOptions.hpp +28 -19
- package/worker/include/RTC/SCTP/public/SctpTypes.hpp +21 -0
- package/worker/include/RTC/SCTP/rx/DataTracker.hpp +277 -0
- package/worker/include/RTC/SCTP/rx/InterleavedReassemblyStreams.hpp +116 -0
- package/worker/include/RTC/SCTP/rx/ReassemblyQueue.hpp +202 -0
- package/worker/include/RTC/SCTP/rx/ReassemblyStreamsInterface.hpp +83 -0
- package/worker/include/RTC/SCTP/rx/TraditionalReassemblyStreams.hpp +183 -0
- package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +595 -0
- package/worker/include/RTC/SCTP/tx/RetransmissionErrorCounter.hpp +3 -3
- package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +329 -0
- package/worker/include/RTC/SCTP/tx/RetransmissionTimeout.hpp +11 -10
- package/worker/include/RTC/SCTP/tx/RoundRobinSendQueue.hpp +356 -0
- package/worker/include/RTC/SCTP/tx/SendQueueInterface.hpp +180 -0
- package/worker/include/RTC/SCTP/tx/StreamScheduler.hpp +235 -0
- package/worker/include/RTC/SenderBandwidthEstimator.hpp +5 -1
- package/worker/include/RTC/Serializable.hpp +11 -3
- package/worker/include/RTC/SimpleConsumer.hpp +1 -2
- package/worker/include/RTC/SimulcastConsumer.hpp +1 -2
- package/worker/include/RTC/SvcConsumer.hpp +1 -2
- package/worker/include/RTC/TcpServer.hpp +2 -2
- package/worker/include/RTC/Transport.hpp +65 -86
- package/worker/include/RTC/TransportCongestionControlClient.hpp +8 -5
- package/worker/include/RTC/TransportCongestionControlServer.hpp +8 -5
- package/worker/include/RTC/TransportTuple.hpp +1 -1
- package/worker/include/RTC/UdpSocket.hpp +1 -1
- package/worker/include/RTC/WebRtcServer.hpp +3 -3
- package/worker/include/RTC/WebRtcTransport.hpp +5 -7
- package/worker/include/Settings.hpp +2 -3
- package/worker/include/Shared.hpp +64 -0
- package/worker/include/SharedInterface.hpp +77 -0
- package/worker/include/Utils/UnwrappedSequenceNumber.hpp +270 -0
- package/worker/include/Utils.hpp +10 -4
- package/worker/include/Worker.hpp +6 -6
- package/worker/include/common.hpp +12 -12
- package/worker/include/handles/BackoffTimerHandle.hpp +28 -67
- package/worker/include/handles/BackoffTimerHandleInterface.hpp +123 -0
- package/worker/include/handles/TimerHandle.hpp +29 -20
- package/worker/include/handles/TimerHandleInterface.hpp +43 -0
- package/worker/meson.build +45 -29
- package/worker/meson_options.txt +2 -1
- package/worker/mocks/include/Channel/MockChannelMessageRegistrator.hpp +45 -0
- package/worker/mocks/include/MockShared.hpp +90 -0
- package/worker/mocks/include/RTC/SCTP/association/MockAssociationListener.hpp +308 -0
- package/worker/mocks/include/RTC/SCTP/association/MockTransmissionControlBlockContext.hpp +183 -0
- package/worker/mocks/include/RTC/SCTP/tx/MockSendQueue.hpp +262 -0
- package/worker/mocks/include/handles/MockBackoffTimerHandle.hpp +153 -0
- package/worker/mocks/include/handles/MockTimerHandle.hpp +74 -0
- package/worker/mocks/include/mockTypes.hpp +15 -0
- package/worker/mocks/src/Channel/MockChannelMessageRegistrator.cpp +128 -0
- package/worker/mocks/src/MockShared.cpp +46 -0
- package/worker/mocks/src/RTC/SCTP/association/MockTransmissionControlBlockContext.cpp +39 -0
- package/worker/mocks/src/handles/MockBackoffTimerHandle.cpp +127 -0
- package/worker/scripts/clang-scripts.mjs +5 -1
- package/worker/scripts/package-lock.json +6 -7
- package/worker/src/Channel/ChannelMessageRegistrator.cpp +125 -0
- package/worker/src/Channel/ChannelSocket.cpp +3 -4
- package/worker/src/DepLibUV.cpp +1 -1
- package/worker/src/DepLibUring.cpp +3 -1
- package/worker/src/Logger.cpp +1 -1
- package/worker/src/MediaSoupErrors.cpp +2 -0
- package/worker/src/RTC/ActiveSpeakerObserver.cpp +14 -14
- package/worker/src/RTC/AudioLevelObserver.cpp +12 -10
- package/worker/src/RTC/Consumer.cpp +28 -26
- package/worker/src/RTC/DataConsumer.cpp +61 -71
- package/worker/src/RTC/DataProducer.cpp +16 -11
- package/worker/src/RTC/DirectTransport.cpp +21 -20
- package/worker/src/RTC/DtlsTransport.cpp +4 -4
- package/worker/src/RTC/ICE/IceServer.cpp +6 -5
- package/worker/src/RTC/ICE/StunPacket.cpp +1 -1
- package/worker/src/RTC/KeyFrameRequestManager.cpp +15 -15
- package/worker/src/RTC/NackGenerator.cpp +6 -6
- package/worker/src/RTC/PipeConsumer.cpp +6 -5
- package/worker/src/RTC/PipeTransport.cpp +9 -22
- package/worker/src/RTC/PlainTransport.cpp +16 -28
- package/worker/src/RTC/Producer.cpp +40 -39
- package/worker/src/RTC/RTCP/FeedbackPsAfb.cpp +1 -1
- package/worker/src/RTC/RTCP/FeedbackPsRpsi.cpp +1 -2
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +1 -1
- package/worker/src/RTC/RTCP/XR.cpp +1 -1
- package/worker/src/RTC/RTP/Packet.cpp +3 -1
- package/worker/src/RTC/RTP/ProbationGenerator.cpp +4 -4
- package/worker/src/RTC/RTP/RetransmissionBuffer.cpp +1 -1
- package/worker/src/RTC/RTP/RtpStream.cpp +17 -10
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +16 -14
- package/worker/src/RTC/RTP/RtpStreamSend.cpp +12 -9
- package/worker/src/RTC/RTP/RtxStream.cpp +7 -7
- package/worker/src/RTC/RTP/SharedPacket.cpp +3 -3
- package/worker/src/RTC/RateCalculator.cpp +1 -2
- package/worker/src/RTC/Router.cpp +61 -38
- package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +1 -1
- package/worker/src/RTC/RtpObserver.cpp +2 -1
- package/worker/src/RTC/SCTP/LICENSE +44 -0
- package/worker/src/RTC/SCTP/association/Association.cpp +417 -411
- package/worker/src/RTC/SCTP/association/AssociationListenerDeferrer.cpp +46 -13
- package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +47 -43
- package/worker/src/RTC/SCTP/association/PacketSender.cpp +8 -8
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +113 -101
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +291 -62
- package/worker/src/RTC/SCTP/packet/Chunk.cpp +5 -1
- package/worker/src/RTC/SCTP/packet/Packet.cpp +8 -1
- package/worker/src/RTC/SCTP/packet/chunks/DataChunk.cpp +17 -0
- package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +4 -4
- package/worker/src/RTC/SCTP/packet/chunks/IDataChunk.cpp +25 -0
- package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +10 -7
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +21 -4
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.cpp +2 -2
- package/worker/src/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.cpp +1 -1
- package/worker/src/RTC/SCTP/public/Message.cpp +8 -0
- package/worker/src/RTC/SCTP/public/SctpOptions.cpp +90 -0
- package/worker/src/RTC/SCTP/rx/DataTracker.cpp +471 -0
- package/worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp +327 -0
- package/worker/src/RTC/SCTP/rx/ReassemblyQueue.cpp +288 -0
- package/worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp +453 -0
- package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +912 -0
- package/worker/src/RTC/SCTP/tx/RetransmissionQueue.cpp +786 -0
- package/worker/src/RTC/SCTP/tx/RetransmissionTimeout.cpp +2 -2
- package/worker/src/RTC/SCTP/tx/RoundRobinSendQueue.cpp +752 -0
- package/worker/src/RTC/SCTP/tx/StreamScheduler.cpp +257 -0
- package/worker/src/RTC/SenderBandwidthEstimator.cpp +7 -5
- package/worker/src/RTC/SimpleConsumer.cpp +11 -11
- package/worker/src/RTC/SimulcastConsumer.cpp +16 -16
- package/worker/src/RTC/SrtpSession.cpp +1 -1
- package/worker/src/RTC/SvcConsumer.cpp +16 -16
- package/worker/src/RTC/TcpConnection.cpp +1 -1
- package/worker/src/RTC/Transport.cpp +497 -563
- package/worker/src/RTC/TransportCongestionControlClient.cpp +9 -8
- package/worker/src/RTC/TransportCongestionControlServer.cpp +5 -5
- package/worker/src/RTC/WebRtcServer.cpp +5 -4
- package/worker/src/RTC/WebRtcTransport.cpp +44 -39
- package/worker/src/Settings.cpp +9 -28
- package/worker/src/Shared.cpp +35 -0
- package/worker/src/Utils/Crypto.cpp +1 -1
- package/worker/src/Utils/String.cpp +1 -1
- package/worker/src/Worker.cpp +19 -48
- package/worker/src/handles/BackoffTimerHandle.cpp +34 -21
- package/worker/src/handles/TimerHandle.cpp +5 -4
- package/worker/src/handles/UdpSocketHandle.cpp +1 -1
- package/worker/src/lib.cpp +17 -16
- package/worker/subprojects/catch2.wrap +6 -6
- package/worker/tasks.py +1 -1
- package/worker/test/include/RTC/ICE/iceCommon.hpp +8 -7
- package/worker/test/include/RTC/RTP/rtpCommon.hpp +7 -6
- package/worker/test/include/RTC/SCTP/sctpCommon.hpp +16 -10
- package/worker/test/include/catch2Macros.hpp +31 -0
- package/worker/test/src/RTC/ICE/TestStunPacket.cpp +3 -3
- package/worker/test/src/RTC/ICE/iceCommon.cpp +2 -2
- package/worker/test/src/RTC/RTP/Codecs/TestVP8.cpp +1 -1
- package/worker/test/src/RTC/RTP/Codecs/TestVP9.cpp +1 -1
- package/worker/test/src/RTC/RTP/TestPacket.cpp +3 -3
- package/worker/test/src/RTC/RTP/TestRtpStreamRecv.cpp +16 -9
- package/worker/test/src/RTC/RTP/TestRtpStreamSend.cpp +38 -23
- package/worker/test/src/RTC/RTP/TestSharedPacket.cpp +1 -1
- package/worker/test/src/RTC/RTP/rtpCommon.cpp +2 -2
- package/worker/test/src/RTC/SCTP/association/TestHeartbeatHandler.cpp +292 -0
- package/worker/test/src/RTC/SCTP/association/TestNegotiatedCapabilities.cpp +1 -1
- package/worker/test/src/RTC/SCTP/association/TestStateCookie.cpp +1 -1
- package/worker/test/src/RTC/SCTP/association/TestTransmissionControlBlock.cpp +99 -0
- package/worker/test/src/RTC/SCTP/packet/TestChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/TestPacket.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestAbortAssociationChunk.cpp +1 -1
- 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/TestDataChunk.cpp +77 -7
- package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +35 -26
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatRequestChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIDataChunk.cpp +77 -7
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +59 -27
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestOperationErrorChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestReConfigChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +73 -35
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownAckChunk.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownChunk.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 +1 -1
- 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 +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestMissingMandatoryParameterErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestNoUserDataErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestOutOfResourceErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestProtocolViolationErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestRestartOfAnAssociationWithNewAddressesErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestStaleCookieErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnknownErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedChunkTypeErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedParametersErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnresolvableAddressErrorCause.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUserInitiatedAbortErrorCause.cpp +1 -1
- 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 +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestForwardTsnSupportedParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestHeartbeatInfoParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv4AddressParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIncomingSsnResetRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestOutgoingSsnResetRequestParameter.cpp +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestReconfigurationResponseParameter.cpp +1 -1
- 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 +1 -1
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedExtensionsParameter.cpp +1 -1
- 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/rx/TestDataTracker.cpp +1117 -0
- package/worker/test/src/RTC/SCTP/rx/TestInterleavedReassemblyStreams.cpp +565 -0
- package/worker/test/src/RTC/SCTP/rx/TestReassemblyQueue.cpp +557 -0
- package/worker/test/src/RTC/SCTP/rx/TestTraditionalReassemblyStreams.cpp +555 -0
- package/worker/test/src/RTC/SCTP/sctpCommon.cpp +2 -2
- package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +1248 -0
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionErrorCounter.cpp +4 -0
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionQueue.cpp +2218 -0
- package/worker/test/src/RTC/SCTP/tx/TestRetransmissionTimeout.cpp +33 -33
- package/worker/test/src/RTC/SCTP/tx/TestRoundRobinSendQueue.cpp +1130 -0
- package/worker/test/src/RTC/SCTP/tx/TestStreamScheduler.cpp +721 -0
- package/worker/test/src/RTC/TestKeyFrameRequestManager.cpp +20 -30
- package/worker/test/src/RTC/TestNackGenerator.cpp +11 -8
- package/worker/test/src/RTC/TestRateCalculator.cpp +6 -7
- package/worker/test/src/RTC/TestSimpleConsumer.cpp +11 -11
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +15 -3
- package/worker/test/src/Utils/TestByte.cpp +98 -0
- package/worker/test/src/{RTC/SCTP/common → Utils}/TestUnwrappedSequenceNumber.cpp +2 -2
- package/worker/test/src/testHelpers.cpp +1 -1
- package/worker/test/src/tests.cpp +0 -12
- package/node/lib/fbs/consumer/degrade-request.d.ts +0 -30
- package/node/lib/fbs/consumer/degrade-request.d.ts.map +0 -1
- package/node/lib/fbs/consumer/degrade-request.js +0 -91
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +0 -24
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +0 -1
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +0 -69
- package/node/lib/fbs/producer/degrade-request.d.ts +0 -30
- package/node/lib/fbs/producer/degrade-request.d.ts.map +0 -1
- package/node/lib/fbs/producer/degrade-request.js +0 -91
- package/node/lib/fbs/worker/close-notification.d.ts +0 -18
- package/node/lib/fbs/worker/close-notification.d.ts.map +0 -1
- package/node/lib/fbs/worker/close-notification.js +0 -45
- package/node/lib/fbs/worker/close-request.d.ts +0 -18
- package/node/lib/fbs/worker/close-request.d.ts.map +0 -1
- package/node/lib/fbs/worker/close-request.js +0 -45
- package/node/lib/fbs/worker/close-worker-notification.d.ts +0 -18
- package/node/lib/fbs/worker/close-worker-notification.d.ts.map +0 -1
- package/node/lib/fbs/worker/close-worker-notification.js +0 -45
- package/worker/include/ChannelMessageRegistrator.hpp +0 -30
- package/worker/include/DepUsrSCTP.hpp +0 -48
- package/worker/include/RTC/SCTP/TODO_SCTP.md +0 -43
- package/worker/include/RTC/SCTP/common/UnwrappedSequenceNumber.hpp +0 -274
- package/worker/include/RTC/SctpAssociation.hpp +0 -147
- package/worker/include/RTC/Shared.hpp +0 -23
- package/worker/src/ChannelMessageRegistrator.cpp +0 -119
- package/worker/src/DepUsrSCTP.cpp +0 -277
- package/worker/src/RTC/SctpAssociation.cpp +0 -1175
- package/worker/src/RTC/Shared.cpp +0 -23
- package/worker/subprojects/usrsctp.wrap +0 -8
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
#define USE_TREND_CALCULATOR
|
|
4
4
|
|
|
5
5
|
#include "RTC/TransportCongestionControlClient.hpp"
|
|
6
|
-
#include "DepLibUV.hpp"
|
|
7
6
|
#include "Logger.hpp"
|
|
8
7
|
#include <libwebrtc/api/transport/network_types.h> // webrtc::TargetRateConstraints
|
|
9
8
|
#include <limits> // std::numeric_limits
|
|
@@ -24,11 +23,13 @@ namespace RTC
|
|
|
24
23
|
|
|
25
24
|
TransportCongestionControlClient::TransportCongestionControlClient(
|
|
26
25
|
RTC::TransportCongestionControlClient::Listener* listener,
|
|
26
|
+
SharedInterface* shared,
|
|
27
27
|
RTC::BweType bweType,
|
|
28
28
|
uint32_t initialAvailableBitrate,
|
|
29
29
|
uint32_t maxOutgoingBitrate,
|
|
30
30
|
uint32_t minOutgoingBitrate)
|
|
31
31
|
: listener(listener),
|
|
32
|
+
shared(shared),
|
|
32
33
|
bweType(bweType),
|
|
33
34
|
initialAvailableBitrate(
|
|
34
35
|
std::max<uint32_t>(
|
|
@@ -75,7 +76,7 @@ namespace RTC
|
|
|
75
76
|
// videos are muted or using screensharing with still images)
|
|
76
77
|
this->rtpTransportControllerSend->EnablePeriodicAlrProbing(true);
|
|
77
78
|
|
|
78
|
-
this->processTimer =
|
|
79
|
+
this->processTimer = this->shared->CreateTimer(this);
|
|
79
80
|
|
|
80
81
|
this->processTimer->Start(
|
|
81
82
|
std::min(
|
|
@@ -114,7 +115,7 @@ namespace RTC
|
|
|
114
115
|
MS_TRACE();
|
|
115
116
|
|
|
116
117
|
#ifdef USE_TREND_CALCULATOR
|
|
117
|
-
auto nowMs =
|
|
118
|
+
const auto nowMs = this->shared->GetTimeMsInt64();
|
|
118
119
|
#endif
|
|
119
120
|
|
|
120
121
|
this->bitrates.desiredBitrate = 0u;
|
|
@@ -307,7 +308,7 @@ namespace RTC
|
|
|
307
308
|
MS_TRACE();
|
|
308
309
|
|
|
309
310
|
#ifdef USE_TREND_CALCULATOR
|
|
310
|
-
auto nowMs =
|
|
311
|
+
const auto nowMs = this->shared->GetTimeMsInt64();
|
|
311
312
|
#endif
|
|
312
313
|
|
|
313
314
|
// Manage it via trending and increase it a bit to avoid immediate oscillations.
|
|
@@ -409,7 +410,7 @@ namespace RTC
|
|
|
409
410
|
|
|
410
411
|
webrtc::TargetRateConstraints constraints;
|
|
411
412
|
|
|
412
|
-
constraints.at_time = webrtc::Timestamp::ms(
|
|
413
|
+
constraints.at_time = webrtc::Timestamp::ms(this->shared->GetTimeMs());
|
|
413
414
|
constraints.min_data_rate = webrtc::DataRate::bps(this->bitrates.minBitrate);
|
|
414
415
|
constraints.max_data_rate = webrtc::DataRate::bps(this->bitrates.maxBitrate);
|
|
415
416
|
constraints.starting_rate = webrtc::DataRate::bps(this->bitrates.startBitrate);
|
|
@@ -435,14 +436,14 @@ namespace RTC
|
|
|
435
436
|
{
|
|
436
437
|
MS_TRACE();
|
|
437
438
|
|
|
438
|
-
this->lastAvailableBitrateEventAtMs =
|
|
439
|
+
this->lastAvailableBitrateEventAtMs = this->shared->GetTimeMs();
|
|
439
440
|
}
|
|
440
441
|
|
|
441
442
|
void TransportCongestionControlClient::MayEmitAvailableBitrateEvent(uint32_t previousAvailableBitrate)
|
|
442
443
|
{
|
|
443
444
|
MS_TRACE();
|
|
444
445
|
|
|
445
|
-
const uint64_t nowMs =
|
|
446
|
+
const uint64_t nowMs = this->shared->GetTimeMsInt64();
|
|
446
447
|
bool notify{ false };
|
|
447
448
|
|
|
448
449
|
// Ignore if first event.
|
|
@@ -552,7 +553,7 @@ namespace RTC
|
|
|
552
553
|
return this->probationGenerator->GetNextPacket(size);
|
|
553
554
|
}
|
|
554
555
|
|
|
555
|
-
void TransportCongestionControlClient::OnTimer(
|
|
556
|
+
void TransportCongestionControlClient::OnTimer(TimerHandleInterface* timer)
|
|
556
557
|
{
|
|
557
558
|
MS_TRACE();
|
|
558
559
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// #define MS_LOG_DEV_LEVEL 3
|
|
3
3
|
|
|
4
4
|
#include "RTC/TransportCongestionControlServer.hpp"
|
|
5
|
-
#include "DepLibUV.hpp"
|
|
6
5
|
#include "Logger.hpp"
|
|
7
6
|
#include "RTC/RTCP/FeedbackPsRemb.hpp"
|
|
8
7
|
|
|
@@ -20,9 +19,10 @@ namespace RTC
|
|
|
20
19
|
|
|
21
20
|
TransportCongestionControlServer::TransportCongestionControlServer(
|
|
22
21
|
RTC::TransportCongestionControlServer::Listener* listener,
|
|
22
|
+
SharedInterface* shared,
|
|
23
23
|
RTC::BweType bweType,
|
|
24
24
|
size_t maxRtcpPacketLen)
|
|
25
|
-
: listener(listener), bweType(bweType), maxRtcpPacketLen(maxRtcpPacketLen)
|
|
25
|
+
: listener(listener), shared(shared), bweType(bweType), maxRtcpPacketLen(maxRtcpPacketLen)
|
|
26
26
|
{
|
|
27
27
|
MS_TRACE();
|
|
28
28
|
|
|
@@ -34,7 +34,7 @@ namespace RTC
|
|
|
34
34
|
ResetTransportCcFeedback(0u);
|
|
35
35
|
|
|
36
36
|
// Create the feedback send periodic timer.
|
|
37
|
-
this->transportCcFeedbackSendPeriodicTimer =
|
|
37
|
+
this->transportCcFeedbackSendPeriodicTimer = this->shared->CreateTimer(this);
|
|
38
38
|
|
|
39
39
|
break;
|
|
40
40
|
}
|
|
@@ -286,7 +286,7 @@ namespace RTC
|
|
|
286
286
|
// This is to ensure that we send N REMB packets with bitrate 0 (unlimited).
|
|
287
287
|
this->unlimitedRembCounter = UnlimitedRembNumPackets;
|
|
288
288
|
|
|
289
|
-
auto nowMs =
|
|
289
|
+
auto nowMs = this->shared->GetTimeMs();
|
|
290
290
|
|
|
291
291
|
MaySendLimitationRembFeedback(nowMs);
|
|
292
292
|
}
|
|
@@ -468,7 +468,7 @@ namespace RTC
|
|
|
468
468
|
this->listener->OnTransportCongestionControlServerSendRtcpPacket(this, &packet);
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
-
void TransportCongestionControlServer::OnTimer(
|
|
471
|
+
void TransportCongestionControlServer::OnTimer(TimerHandleInterface* timer)
|
|
472
472
|
{
|
|
473
473
|
MS_TRACE();
|
|
474
474
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
#include "SharedInterface.hpp"
|
|
1
2
|
#define MS_CLASS "RTC::WebRtcServer"
|
|
2
3
|
// #define MS_LOG_DEV_LEVEL 3
|
|
3
4
|
|
|
4
|
-
#include "RTC/WebRtcServer.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
6
|
#include "MediaSoupErrors.hpp"
|
|
7
|
+
#include "RTC/WebRtcServer.hpp"
|
|
7
8
|
#include "Settings.hpp"
|
|
8
9
|
#include "Utils.hpp"
|
|
9
10
|
#include <cmath> // std::pow()
|
|
@@ -53,7 +54,7 @@ namespace RTC
|
|
|
53
54
|
/* Instance methods. */
|
|
54
55
|
|
|
55
56
|
WebRtcServer::WebRtcServer(
|
|
56
|
-
|
|
57
|
+
SharedInterface* shared,
|
|
57
58
|
const std::string& id,
|
|
58
59
|
const flatbuffers::Vector<flatbuffers::Offset<FBS::Transport::ListenInfo>>* listenInfos)
|
|
59
60
|
: id(id), shared(shared)
|
|
@@ -205,7 +206,7 @@ namespace RTC
|
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
// NOTE: This may throw.
|
|
208
|
-
this->shared->
|
|
209
|
+
this->shared->GetChannelMessageRegistrator()->RegisterHandler(
|
|
209
210
|
this->id,
|
|
210
211
|
/*channelRequestHandler*/ this,
|
|
211
212
|
/*channelNotificationHandler*/ nullptr);
|
|
@@ -234,7 +235,7 @@ namespace RTC
|
|
|
234
235
|
|
|
235
236
|
this->closing = true;
|
|
236
237
|
|
|
237
|
-
this->shared->
|
|
238
|
+
this->shared->GetChannelMessageRegistrator()->UnregisterHandler(this->id);
|
|
238
239
|
|
|
239
240
|
// NOTE: We need to close WebRtcTransports first since they may need to
|
|
240
241
|
// send DTLS Close Alert so UDP sockets and TCP connections must remain
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// #define MS_LOG_DEV_LEVEL 3
|
|
3
3
|
|
|
4
4
|
#include "RTC/WebRtcTransport.hpp"
|
|
5
|
+
#include "FBS/webRtcTransport.h"
|
|
5
6
|
#include "Logger.hpp"
|
|
6
7
|
#include "MediaSoupErrors.hpp"
|
|
7
8
|
#include "Settings.hpp"
|
|
8
9
|
#include "Utils.hpp"
|
|
9
|
-
#include "FBS/webRtcTransport.h"
|
|
10
10
|
#include <cmath> // std::pow()
|
|
11
11
|
|
|
12
12
|
namespace RTC
|
|
@@ -33,7 +33,7 @@ namespace RTC
|
|
|
33
33
|
* This constructor is used when the WebRtcTransport doesn't use a WebRtcServer.
|
|
34
34
|
*/
|
|
35
35
|
WebRtcTransport::WebRtcTransport(
|
|
36
|
-
|
|
36
|
+
SharedInterface* shared,
|
|
37
37
|
const std::string& id,
|
|
38
38
|
RTC::Transport::Listener* listener,
|
|
39
39
|
const FBS::WebRtcTransport::WebRtcTransportOptions* options)
|
|
@@ -226,13 +226,17 @@ namespace RTC
|
|
|
226
226
|
|
|
227
227
|
// Create a ICE server.
|
|
228
228
|
this->iceServer = new RTC::ICE::IceServer(
|
|
229
|
-
this,
|
|
229
|
+
this,
|
|
230
|
+
this->shared,
|
|
231
|
+
Utils::Crypto::GetRandomString(32),
|
|
232
|
+
Utils::Crypto::GetRandomString(32),
|
|
233
|
+
iceConsentTimeout);
|
|
230
234
|
|
|
231
235
|
// Create a DTLS transport.
|
|
232
|
-
this->dtlsTransport = new RTC::DtlsTransport(this);
|
|
236
|
+
this->dtlsTransport = new RTC::DtlsTransport(this, this->shared);
|
|
233
237
|
|
|
234
238
|
// NOTE: This may throw.
|
|
235
|
-
this->shared->
|
|
239
|
+
this->shared->GetChannelMessageRegistrator()->RegisterHandler(
|
|
236
240
|
this->id,
|
|
237
241
|
/*channelRequestHandler*/ this,
|
|
238
242
|
/*channelNotificationHandler*/ this);
|
|
@@ -273,7 +277,7 @@ namespace RTC
|
|
|
273
277
|
* This constructor is used when the WebRtcTransport uses a WebRtcServer.
|
|
274
278
|
*/
|
|
275
279
|
WebRtcTransport::WebRtcTransport(
|
|
276
|
-
|
|
280
|
+
SharedInterface* shared,
|
|
277
281
|
const std::string& id,
|
|
278
282
|
RTC::Transport::Listener* listener,
|
|
279
283
|
WebRtcTransportListener* webRtcTransportListener,
|
|
@@ -296,16 +300,20 @@ namespace RTC
|
|
|
296
300
|
|
|
297
301
|
// Create a ICE server.
|
|
298
302
|
this->iceServer = new RTC::ICE::IceServer(
|
|
299
|
-
this,
|
|
303
|
+
this,
|
|
304
|
+
this->shared,
|
|
305
|
+
Utils::Crypto::GetRandomString(32),
|
|
306
|
+
Utils::Crypto::GetRandomString(32),
|
|
307
|
+
iceConsentTimeout);
|
|
300
308
|
|
|
301
309
|
// Create a DTLS transport.
|
|
302
|
-
this->dtlsTransport = new RTC::DtlsTransport(this);
|
|
310
|
+
this->dtlsTransport = new RTC::DtlsTransport(this, this->shared);
|
|
303
311
|
|
|
304
312
|
// Notify the webRtcTransportListener.
|
|
305
313
|
this->webRtcTransportListener->OnWebRtcTransportCreated(this);
|
|
306
314
|
|
|
307
315
|
// NOTE: This may throw.
|
|
308
|
-
this->shared->
|
|
316
|
+
this->shared->GetChannelMessageRegistrator()->RegisterHandler(
|
|
309
317
|
this->id,
|
|
310
318
|
/*channelRequestHandler*/ this,
|
|
311
319
|
/*channelNotificationHandler*/ this);
|
|
@@ -331,9 +339,9 @@ namespace RTC
|
|
|
331
339
|
// We need to tell the Transport parent class that we are about to destroy
|
|
332
340
|
// the class instance. This is because child's destructor runs before
|
|
333
341
|
// parent's destructor. See comment in Transport::OnSctpAssociationSendData().
|
|
334
|
-
|
|
342
|
+
SetDestroying();
|
|
335
343
|
|
|
336
|
-
this->shared->
|
|
344
|
+
this->shared->GetChannelMessageRegistrator()->UnregisterHandler(this->id);
|
|
337
345
|
|
|
338
346
|
// Must delete the DTLS transport first since it will generate a DTLS alert
|
|
339
347
|
// to be sent.
|
|
@@ -852,22 +860,14 @@ namespace RTC
|
|
|
852
860
|
}
|
|
853
861
|
|
|
854
862
|
void WebRtcTransport::SendMessage(
|
|
855
|
-
RTC::DataConsumer* dataConsumer,
|
|
863
|
+
RTC::DataConsumer* dataConsumer, RTC::SCTP::Message message, onQueuedCallback* cb)
|
|
856
864
|
{
|
|
857
865
|
MS_TRACE();
|
|
858
866
|
|
|
859
|
-
|
|
860
|
-
{
|
|
861
|
-
// TODO: SCTP
|
|
862
|
-
}
|
|
863
|
-
// TODO: Remove once we only use built-in SCTP stack.
|
|
864
|
-
else
|
|
865
|
-
{
|
|
866
|
-
this->oldSctpAssociation->SendSctpMessage(dataConsumer, msg, len, ppid, cb);
|
|
867
|
-
}
|
|
867
|
+
SendSctpMessage(dataConsumer, std::move(message), cb);
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
-
bool WebRtcTransport::
|
|
870
|
+
bool WebRtcTransport::SendData(const uint8_t* data, size_t len)
|
|
871
871
|
{
|
|
872
872
|
MS_TRACE();
|
|
873
873
|
|
|
@@ -1221,12 +1221,12 @@ namespace RTC
|
|
|
1221
1221
|
|
|
1222
1222
|
// Notify the Node WebRtcTransport.
|
|
1223
1223
|
auto tuple = this->iceServer->GetSelectedTuple()->FillBuffer(
|
|
1224
|
-
this->shared->
|
|
1224
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder());
|
|
1225
1225
|
|
|
1226
1226
|
auto notification = FBS::WebRtcTransport::CreateIceSelectedTupleChangeNotification(
|
|
1227
|
-
this->shared->
|
|
1227
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(), tuple);
|
|
1228
1228
|
|
|
1229
|
-
this->shared->
|
|
1229
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1230
1230
|
this->id,
|
|
1231
1231
|
FBS::Notification::Event::WEBRTCTRANSPORT_ICE_SELECTED_TUPLE_CHANGE,
|
|
1232
1232
|
FBS::Notification::Body::WebRtcTransport_IceSelectedTupleChangeNotification,
|
|
@@ -1241,9 +1241,10 @@ namespace RTC
|
|
|
1241
1241
|
|
|
1242
1242
|
// Notify the Node WebRtcTransport.
|
|
1243
1243
|
auto iceStateChangeOffset = FBS::WebRtcTransport::CreateIceStateChangeNotification(
|
|
1244
|
-
this->shared->
|
|
1244
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1245
|
+
FBS::WebRtcTransport::IceState::CONNECTED);
|
|
1245
1246
|
|
|
1246
|
-
this->shared->
|
|
1247
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1247
1248
|
this->id,
|
|
1248
1249
|
FBS::Notification::Event::WEBRTCTRANSPORT_ICE_STATE_CHANGE,
|
|
1249
1250
|
FBS::Notification::Body::WebRtcTransport_IceStateChangeNotification,
|
|
@@ -1267,9 +1268,10 @@ namespace RTC
|
|
|
1267
1268
|
|
|
1268
1269
|
// Notify the Node WebRtcTransport.
|
|
1269
1270
|
auto iceStateChangeOffset = FBS::WebRtcTransport::CreateIceStateChangeNotification(
|
|
1270
|
-
this->shared->
|
|
1271
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1272
|
+
FBS::WebRtcTransport::IceState::COMPLETED);
|
|
1271
1273
|
|
|
1272
|
-
this->shared->
|
|
1274
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1273
1275
|
this->id,
|
|
1274
1276
|
FBS::Notification::Event::WEBRTCTRANSPORT_ICE_STATE_CHANGE,
|
|
1275
1277
|
FBS::Notification::Body::WebRtcTransport_IceStateChangeNotification,
|
|
@@ -1293,10 +1295,10 @@ namespace RTC
|
|
|
1293
1295
|
|
|
1294
1296
|
// Notify the Node WebRtcTransport.
|
|
1295
1297
|
auto iceStateChangeOffset = FBS::WebRtcTransport::CreateIceStateChangeNotification(
|
|
1296
|
-
this->shared->
|
|
1298
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1297
1299
|
FBS::WebRtcTransport::IceState::DISCONNECTED);
|
|
1298
1300
|
|
|
1299
|
-
this->shared->
|
|
1301
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1300
1302
|
this->id,
|
|
1301
1303
|
FBS::Notification::Event::WEBRTCTRANSPORT_ICE_STATE_CHANGE,
|
|
1302
1304
|
FBS::Notification::Body::WebRtcTransport_IceStateChangeNotification,
|
|
@@ -1317,9 +1319,10 @@ namespace RTC
|
|
|
1317
1319
|
|
|
1318
1320
|
// Notify the Node WebRtcTransport.
|
|
1319
1321
|
auto dtlsStateChangeOffset = FBS::WebRtcTransport::CreateDtlsStateChangeNotification(
|
|
1320
|
-
this->shared->
|
|
1322
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1323
|
+
FBS::WebRtcTransport::DtlsState::CONNECTING);
|
|
1321
1324
|
|
|
1322
|
-
this->shared->
|
|
1325
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1323
1326
|
this->id,
|
|
1324
1327
|
FBS::Notification::Event::WEBRTCTRANSPORT_DTLS_STATE_CHANGE,
|
|
1325
1328
|
FBS::Notification::Body::WebRtcTransport_DtlsStateChangeNotification,
|
|
@@ -1363,11 +1366,11 @@ namespace RTC
|
|
|
1363
1366
|
|
|
1364
1367
|
// Notify the Node WebRtcTransport.
|
|
1365
1368
|
auto dtlsStateChangeOffset = FBS::WebRtcTransport::CreateDtlsStateChangeNotificationDirect(
|
|
1366
|
-
this->shared->
|
|
1369
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1367
1370
|
FBS::WebRtcTransport::DtlsState::CONNECTED,
|
|
1368
1371
|
remoteCert.c_str());
|
|
1369
1372
|
|
|
1370
|
-
this->shared->
|
|
1373
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1371
1374
|
this->id,
|
|
1372
1375
|
FBS::Notification::Event::WEBRTCTRANSPORT_DTLS_STATE_CHANGE,
|
|
1373
1376
|
FBS::Notification::Body::WebRtcTransport_DtlsStateChangeNotification,
|
|
@@ -1393,9 +1396,10 @@ namespace RTC
|
|
|
1393
1396
|
|
|
1394
1397
|
// Notify the Node WebRtcTransport.
|
|
1395
1398
|
auto dtlsStateChangeOffset = FBS::WebRtcTransport::CreateDtlsStateChangeNotification(
|
|
1396
|
-
this->shared->
|
|
1399
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1400
|
+
FBS::WebRtcTransport::DtlsState::FAILED);
|
|
1397
1401
|
|
|
1398
|
-
this->shared->
|
|
1402
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1399
1403
|
this->id,
|
|
1400
1404
|
FBS::Notification::Event::WEBRTCTRANSPORT_DTLS_STATE_CHANGE,
|
|
1401
1405
|
FBS::Notification::Body::WebRtcTransport_DtlsStateChangeNotification,
|
|
@@ -1410,9 +1414,10 @@ namespace RTC
|
|
|
1410
1414
|
|
|
1411
1415
|
// Notify the Node WebRtcTransport.
|
|
1412
1416
|
auto dtlsStateChangeOffset = FBS::WebRtcTransport::CreateDtlsStateChangeNotification(
|
|
1413
|
-
this->shared->
|
|
1417
|
+
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1418
|
+
FBS::WebRtcTransport::DtlsState::CLOSED);
|
|
1414
1419
|
|
|
1415
|
-
this->shared->
|
|
1420
|
+
this->shared->GetChannelNotifier()->Emit(
|
|
1416
1421
|
this->id,
|
|
1417
1422
|
FBS::Notification::Event::WEBRTCTRANSPORT_DTLS_STATE_CHANGE,
|
|
1418
1423
|
FBS::Notification::Body::WebRtcTransport_DtlsStateChangeNotification,
|
package/worker/src/Settings.cpp
CHANGED
|
@@ -52,16 +52,15 @@ void Settings::SetConfiguration(int argc, char* argv[])
|
|
|
52
52
|
// clang-format off
|
|
53
53
|
struct option options[] =
|
|
54
54
|
{
|
|
55
|
-
{ "logLevel", optional_argument, nullptr, 'l' },
|
|
56
|
-
{ "logTags", optional_argument, nullptr, 't' },
|
|
57
|
-
{ "rtcMinPort", optional_argument, nullptr, 'm' },
|
|
58
|
-
{ "rtcMaxPort", optional_argument, nullptr, 'M' },
|
|
59
|
-
{ "dtlsCertificateFile", optional_argument, nullptr, 'c' },
|
|
60
|
-
{ "dtlsPrivateKeyFile", optional_argument, nullptr, 'p' },
|
|
61
|
-
{ "libwebrtcFieldTrials", optional_argument, nullptr, 'W' },
|
|
62
|
-
{ "disableLiburing", optional_argument, nullptr, 'd' },
|
|
63
|
-
{
|
|
64
|
-
{ nullptr, 0, nullptr, 0 }
|
|
55
|
+
{ .name="logLevel", .has_arg=optional_argument, .flag=nullptr, .val='l' },
|
|
56
|
+
{ .name="logTags", .has_arg=optional_argument, .flag=nullptr, .val='t' },
|
|
57
|
+
{ .name="rtcMinPort", .has_arg=optional_argument, .flag=nullptr, .val='m' },
|
|
58
|
+
{ .name="rtcMaxPort", .has_arg=optional_argument, .flag=nullptr, .val='M' },
|
|
59
|
+
{ .name="dtlsCertificateFile", .has_arg=optional_argument, .flag=nullptr, .val='c' },
|
|
60
|
+
{ .name="dtlsPrivateKeyFile", .has_arg=optional_argument, .flag=nullptr, .val='p' },
|
|
61
|
+
{ .name="libwebrtcFieldTrials", .has_arg=optional_argument, .flag=nullptr, .val='W' },
|
|
62
|
+
{ .name="disableLiburing", .has_arg=optional_argument, .flag=nullptr, .val='d' },
|
|
63
|
+
{ .name=nullptr, .has_arg=0, .flag=nullptr, .val=0 }
|
|
65
64
|
};
|
|
66
65
|
// clang-format on
|
|
67
66
|
std::string stringValue;
|
|
@@ -172,22 +171,6 @@ void Settings::SetConfiguration(int argc, char* argv[])
|
|
|
172
171
|
break;
|
|
173
172
|
}
|
|
174
173
|
|
|
175
|
-
case 's':
|
|
176
|
-
{
|
|
177
|
-
stringValue = std::string(optarg);
|
|
178
|
-
|
|
179
|
-
if (stringValue == "true")
|
|
180
|
-
{
|
|
181
|
-
Settings::configuration.useBuiltInSctpStack = true;
|
|
182
|
-
}
|
|
183
|
-
else
|
|
184
|
-
{
|
|
185
|
-
Settings::configuration.useBuiltInSctpStack = false;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
174
|
// Invalid option.
|
|
192
175
|
case '?':
|
|
193
176
|
{
|
|
@@ -400,8 +383,6 @@ void Settings::PrintConfiguration()
|
|
|
400
383
|
info, " libwebrtcFieldTrials: %s", Settings::configuration.libwebrtcFieldTrials.c_str());
|
|
401
384
|
}
|
|
402
385
|
MS_DEBUG_TAG(info, " disableLiburing: %s", Settings::configuration.disableLiburing ? "yes" : "no");
|
|
403
|
-
MS_DEBUG_TAG(
|
|
404
|
-
info, " useBuiltInSctpStack: %s", Settings::configuration.useBuiltInSctpStack ? "yes" : "no");
|
|
405
386
|
|
|
406
387
|
MS_DEBUG_TAG(info, "</configuration>");
|
|
407
388
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#define MS_CLASS "Shared"
|
|
2
|
+
// #define MS_LOG_DEV_LEVEL 3
|
|
3
|
+
|
|
4
|
+
#include "Shared.hpp"
|
|
5
|
+
#include "handles/BackoffTimerHandle.hpp"
|
|
6
|
+
#include "handles/TimerHandle.hpp"
|
|
7
|
+
#include "Logger.hpp"
|
|
8
|
+
|
|
9
|
+
Shared::Shared(
|
|
10
|
+
Channel::ChannelMessageRegistrator* channelMessageRegistrator,
|
|
11
|
+
Channel::ChannelNotifier* channelNotifier)
|
|
12
|
+
: channelMessageRegistrator(channelMessageRegistrator), channelNotifier(channelNotifier)
|
|
13
|
+
{
|
|
14
|
+
MS_TRACE();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
Shared::~Shared()
|
|
18
|
+
{
|
|
19
|
+
MS_TRACE();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
TimerHandleInterface* Shared::CreateTimer(TimerHandleInterface::Listener* listener)
|
|
23
|
+
{
|
|
24
|
+
MS_TRACE();
|
|
25
|
+
|
|
26
|
+
return new TimerHandle(listener);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
BackoffTimerHandleInterface* Shared::CreateBackoffTimer(
|
|
30
|
+
const BackoffTimerHandleInterface::BackoffTimerHandleOptions& options)
|
|
31
|
+
{
|
|
32
|
+
MS_TRACE();
|
|
33
|
+
|
|
34
|
+
return new BackoffTimerHandle(options);
|
|
35
|
+
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
/* Static. */
|
|
20
20
|
|
|
21
21
|
static constexpr size_t BufferOutSize{ 65536 };
|
|
22
|
-
thread_local uint8_t BufferOut[BufferOutSize];
|
|
22
|
+
static thread_local uint8_t BufferOut[BufferOutSize];
|
|
23
23
|
static const uint8_t Base64Table[65] =
|
|
24
24
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
25
25
|
|