mediasoup 3.19.22 → 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 +1 -1
- package/node/lib/Worker.d.ts.map +1 -1
- package/node/lib/Worker.js +63 -31
- 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 +11 -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 +5 -1
- 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 +6 -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/ChannelRequest.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 +6 -4
- package/worker/include/RTC/AudioLevelObserver.hpp +2 -2
- package/worker/include/RTC/Consumer.hpp +1 -1
- package/worker/include/RTC/DataConsumer.hpp +11 -15
- package/worker/include/RTC/DataProducer.hpp +4 -7
- package/worker/include/RTC/DirectTransport.hpp +3 -5
- package/worker/include/RTC/DtlsTransport.hpp +7 -7
- package/worker/include/RTC/ICE/IceServer.hpp +2 -2
- package/worker/include/RTC/ICE/StunPacket.hpp +1 -1
- package/worker/include/RTC/KeyFrameRequestManager.hpp +1 -1
- package/worker/include/RTC/NackGenerator.hpp +3 -2
- package/worker/include/RTC/PipeTransport.hpp +3 -5
- package/worker/include/RTC/PlainTransport.hpp +3 -5
- package/worker/include/RTC/PortManager.hpp +1 -1
- package/worker/include/RTC/Producer.hpp +1 -1
- 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 +11 -12
- package/worker/include/RTC/RTP/RtpStreamRecv.hpp +3 -2
- 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 +5 -6
- package/worker/include/RTC/RtpObserver.hpp +1 -1
- package/worker/include/RTC/SCTP/association/Association.hpp +46 -15
- package/worker/include/RTC/SCTP/association/AssociationListenerDeferrer.hpp +14 -6
- package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +12 -11
- 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 +26 -26
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +58 -48
- package/worker/include/RTC/SCTP/association/{TCBContext.hpp → TransmissionControlBlockContextInterface.hpp} +11 -6
- 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 +39 -31
- 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 +29 -21
- 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 +48 -57
- package/worker/include/RTC/SCTP/tx/RetransmissionErrorCounter.hpp +3 -3
- package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +36 -43
- package/worker/include/RTC/SCTP/tx/RetransmissionTimeout.hpp +6 -6
- 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 +3 -3
- package/worker/include/RTC/TcpServer.hpp +2 -2
- package/worker/include/RTC/Transport.hpp +59 -80
- package/worker/include/RTC/TransportCongestionControlClient.hpp +2 -2
- package/worker/include/RTC/TransportCongestionControlServer.hpp +2 -2
- package/worker/include/RTC/TransportTuple.hpp +1 -1
- package/worker/include/RTC/UdpSocket.hpp +1 -1
- package/worker/include/RTC/WebRtcServer.hpp +1 -1
- package/worker/include/RTC/WebRtcTransport.hpp +3 -5
- package/worker/include/Settings.hpp +2 -3
- package/worker/include/Shared.hpp +31 -7
- package/worker/include/SharedInterface.hpp +37 -4
- package/worker/include/Utils/UnwrappedSequenceNumber.hpp +270 -0
- package/worker/include/Utils.hpp +4 -4
- package/worker/include/Worker.hpp +4 -4
- package/worker/include/common.hpp +12 -12
- package/worker/include/handles/BackoffTimerHandle.hpp +8 -9
- package/worker/include/handles/BackoffTimerHandleInterface.hpp +10 -3
- package/worker/include/handles/TimerHandle.hpp +0 -7
- package/worker/meson.build +33 -34
- package/worker/mocks/include/MockShared.hpp +56 -9
- 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/MockShared.cpp +30 -10
- 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 +1 -0
- package/worker/scripts/package-lock.json +6 -7
- package/worker/src/Channel/ChannelSocket.cpp +2 -3
- 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 +7 -7
- package/worker/src/RTC/Consumer.cpp +5 -6
- package/worker/src/RTC/DataConsumer.cpp +54 -64
- package/worker/src/RTC/DataProducer.cpp +13 -8
- package/worker/src/RTC/DirectTransport.cpp +7 -6
- package/worker/src/RTC/ICE/IceServer.cpp +2 -2
- package/worker/src/RTC/ICE/StunPacket.cpp +1 -1
- package/worker/src/RTC/NackGenerator.cpp +3 -3
- package/worker/src/RTC/PipeConsumer.cpp +1 -1
- package/worker/src/RTC/PipeTransport.cpp +6 -19
- package/worker/src/RTC/PlainTransport.cpp +6 -19
- package/worker/src/RTC/Producer.cpp +10 -11
- package/worker/src/RTC/RTCP/FeedbackPsAfb.cpp +1 -1
- 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 +9 -9
- package/worker/src/RTC/RTP/RtpStreamRecv.cpp +11 -10
- package/worker/src/RTC/RTP/RtpStreamSend.cpp +7 -7
- 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 +58 -35
- package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +1 -1
- package/worker/src/RTC/SCTP/LICENSE +44 -0
- package/worker/src/RTC/SCTP/association/Association.cpp +348 -322
- package/worker/src/RTC/SCTP/association/AssociationListenerDeferrer.cpp +46 -13
- package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +26 -28
- package/worker/src/RTC/SCTP/association/PacketSender.cpp +8 -8
- package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +71 -56
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +176 -66
- 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 +81 -74
- package/worker/src/RTC/SCTP/tx/RetransmissionQueue.cpp +85 -98
- package/worker/src/RTC/SCTP/tx/RetransmissionTimeout.cpp +1 -1
- 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 +3 -4
- package/worker/src/RTC/SimulcastConsumer.cpp +5 -6
- package/worker/src/RTC/SrtpSession.cpp +1 -1
- package/worker/src/RTC/SvcConsumer.cpp +5 -6
- package/worker/src/RTC/TcpConnection.cpp +1 -1
- package/worker/src/RTC/Transport.cpp +475 -551
- package/worker/src/RTC/TransportCongestionControlClient.cpp +5 -6
- package/worker/src/RTC/TransportCongestionControlServer.cpp +1 -2
- package/worker/src/RTC/WebRtcServer.cpp +1 -1
- package/worker/src/RTC/WebRtcTransport.cpp +5 -13
- package/worker/src/Settings.cpp +9 -28
- package/worker/src/Shared.cpp +3 -3
- package/worker/src/Utils/Crypto.cpp +1 -1
- package/worker/src/Utils/String.cpp +1 -1
- package/worker/src/Worker.cpp +10 -26
- package/worker/src/handles/BackoffTimerHandle.cpp +24 -6
- package/worker/src/handles/UdpSocketHandle.cpp +1 -1
- package/worker/src/lib.cpp +5 -17
- package/worker/subprojects/catch2.wrap +6 -6
- package/worker/test/include/RTC/ICE/iceCommon.hpp +7 -7
- package/worker/test/include/RTC/RTP/rtpCommon.hpp +6 -6
- package/worker/test/include/RTC/SCTP/sctpCommon.hpp +10 -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 +6 -6
- package/worker/test/src/RTC/RTP/TestRtpStreamSend.cpp +6 -2
- 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 +475 -423
- 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/TestRoundRobinSendQueue.cpp +1130 -0
- package/worker/test/src/RTC/SCTP/tx/TestStreamScheduler.cpp +721 -0
- package/worker/test/src/RTC/TestKeyFrameRequestManager.cpp +9 -27
- package/worker/test/src/RTC/TestNackGenerator.cpp +7 -8
- package/worker/test/src/RTC/TestRateCalculator.cpp +6 -7
- package/worker/test/src/RTC/TestSimpleConsumer.cpp +7 -3
- package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +8 -3
- 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/DepUsrSCTP.hpp +0 -49
- package/worker/include/RTC/SCTP/TODO_SCTP.md +0 -55
- package/worker/include/RTC/SCTP/common/UnwrappedSequenceNumber.hpp +0 -274
- package/worker/include/RTC/SctpAssociation.hpp +0 -147
- package/worker/src/DepUsrSCTP.cpp +0 -283
- package/worker/src/RTC/SctpAssociation.cpp +0 -1175
- package/worker/subprojects/usrsctp.wrap +0 -8
|
@@ -12,7 +12,7 @@ namespace RTC
|
|
|
12
12
|
/* Static. */
|
|
13
13
|
|
|
14
14
|
static constexpr size_t StunResponseFactoryBufferLength{ 65536 };
|
|
15
|
-
thread_local uint8_t StunResponseFactoryBuffer[StunResponseFactoryBufferLength];
|
|
15
|
+
static thread_local uint8_t StunResponseFactoryBuffer[StunResponseFactoryBufferLength];
|
|
16
16
|
static constexpr size_t MaxTuples{ 8 };
|
|
17
17
|
static constexpr uint8_t ConsentCheckMinTimeoutSec{ 10u };
|
|
18
18
|
static constexpr uint8_t ConsentCheckMaxTimeoutSec{ 60u };
|
|
@@ -560,7 +560,7 @@ namespace RTC
|
|
|
560
560
|
}
|
|
561
561
|
else
|
|
562
562
|
{
|
|
563
|
-
thread_local std::string_view errorReasonPhrase;
|
|
563
|
+
static thread_local std::string_view errorReasonPhrase;
|
|
564
564
|
|
|
565
565
|
response->GetErrorCode(errorReasonPhrase);
|
|
566
566
|
|
|
@@ -15,7 +15,7 @@ namespace RTC
|
|
|
15
15
|
/* Static. */
|
|
16
16
|
|
|
17
17
|
static constexpr size_t AttributeFactoryBufferLength{ 65536 };
|
|
18
|
-
thread_local uint8_t AttributeFactoryBuffer[AttributeFactoryBufferLength];
|
|
18
|
+
static thread_local uint8_t AttributeFactoryBuffer[AttributeFactoryBufferLength];
|
|
19
19
|
|
|
20
20
|
/* Class variables. */
|
|
21
21
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// #define MS_LOG_DEV_LEVEL 3
|
|
3
3
|
|
|
4
4
|
#include "RTC/NackGenerator.hpp"
|
|
5
|
-
#include "DepLibUV.hpp"
|
|
6
5
|
#include "Logger.hpp"
|
|
7
6
|
|
|
8
7
|
namespace RTC
|
|
@@ -19,6 +18,7 @@ namespace RTC
|
|
|
19
18
|
|
|
20
19
|
NackGenerator::NackGenerator(Listener* listener, SharedInterface* shared, unsigned int sendNackDelayMs)
|
|
21
20
|
: listener(listener),
|
|
21
|
+
shared(shared),
|
|
22
22
|
sendNackDelayMs(sendNackDelayMs),
|
|
23
23
|
timer(shared->CreateTimer(this)),
|
|
24
24
|
rtt(DefaultRtt)
|
|
@@ -211,7 +211,7 @@ namespace RTC
|
|
|
211
211
|
this->nackList.emplace(
|
|
212
212
|
seq,
|
|
213
213
|
NackInfo{
|
|
214
|
-
|
|
214
|
+
this->shared->GetTimeMs(),
|
|
215
215
|
seq,
|
|
216
216
|
seq,
|
|
217
217
|
});
|
|
@@ -247,7 +247,7 @@ namespace RTC
|
|
|
247
247
|
{
|
|
248
248
|
MS_TRACE();
|
|
249
249
|
|
|
250
|
-
const uint64_t nowMs =
|
|
250
|
+
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
251
251
|
std::vector<uint16_t> nackBatch;
|
|
252
252
|
|
|
253
253
|
auto it = this->nackList.begin();
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
#include "RTC/PipeTransport.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
6
|
#include "MediaSoupErrors.hpp"
|
|
7
|
+
#include "RTC/SCTP/packet/Packet.hpp"
|
|
7
8
|
#include "Settings.hpp"
|
|
8
9
|
#include "Utils.hpp"
|
|
9
|
-
#include "RTC/SCTP/packet/Packet.hpp"
|
|
10
10
|
#include <cstring> // std::memcpy()
|
|
11
11
|
|
|
12
12
|
namespace RTC
|
|
@@ -144,7 +144,7 @@ namespace RTC
|
|
|
144
144
|
|
|
145
145
|
// Tell the Transport parent class that we are about to destroy
|
|
146
146
|
// the class instance.
|
|
147
|
-
|
|
147
|
+
SetDestroying();
|
|
148
148
|
|
|
149
149
|
this->shared->GetChannelMessageRegistrator()->UnregisterHandler(this->id);
|
|
150
150
|
|
|
@@ -579,22 +579,14 @@ namespace RTC
|
|
|
579
579
|
}
|
|
580
580
|
|
|
581
581
|
void PipeTransport::SendMessage(
|
|
582
|
-
RTC::DataConsumer* dataConsumer,
|
|
582
|
+
RTC::DataConsumer* dataConsumer, RTC::SCTP::Message message, onQueuedCallback* cb)
|
|
583
583
|
{
|
|
584
584
|
MS_TRACE();
|
|
585
585
|
|
|
586
|
-
|
|
587
|
-
{
|
|
588
|
-
// TODO: SCTP
|
|
589
|
-
}
|
|
590
|
-
// TODO: Remove once we only use built-in SCTP stack.
|
|
591
|
-
else
|
|
592
|
-
{
|
|
593
|
-
this->oldSctpAssociation->SendSctpMessage(dataConsumer, msg, len, ppid, cb);
|
|
594
|
-
}
|
|
586
|
+
SendSctpMessage(dataConsumer, std::move(message), cb);
|
|
595
587
|
}
|
|
596
588
|
|
|
597
|
-
bool PipeTransport::
|
|
589
|
+
bool PipeTransport::SendData(const uint8_t* data, size_t len)
|
|
598
590
|
{
|
|
599
591
|
MS_TRACE();
|
|
600
592
|
|
|
@@ -650,12 +642,7 @@ namespace RTC
|
|
|
650
642
|
OnRtpDataReceived(tuple, data, len, bufferLen);
|
|
651
643
|
}
|
|
652
644
|
// Check if it's SCTP.
|
|
653
|
-
else if (
|
|
654
|
-
{
|
|
655
|
-
OnSctpDataReceived(tuple, data, len);
|
|
656
|
-
}
|
|
657
|
-
// TODO: Remove once we only use built-in SCTP stack.
|
|
658
|
-
else if (!Settings::configuration.useBuiltInSctpStack && RTC::SctpAssociation::IsSctp(data, len))
|
|
645
|
+
else if (RTC::SCTP::Packet::IsSctp(data, len))
|
|
659
646
|
{
|
|
660
647
|
OnSctpDataReceived(tuple, data, len);
|
|
661
648
|
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
#include "RTC/PlainTransport.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
6
|
#include "MediaSoupErrors.hpp"
|
|
7
|
+
#include "RTC/SCTP/packet/Packet.hpp"
|
|
7
8
|
#include "Settings.hpp"
|
|
8
9
|
#include "Utils.hpp"
|
|
9
|
-
#include "RTC/SCTP/packet/Packet.hpp"
|
|
10
10
|
#include <cstring> // std::memcpy()
|
|
11
11
|
|
|
12
12
|
namespace RTC
|
|
@@ -266,7 +266,7 @@ namespace RTC
|
|
|
266
266
|
|
|
267
267
|
// Tell the Transport parent class that we are about to destroy
|
|
268
268
|
// the class instance.
|
|
269
|
-
|
|
269
|
+
SetDestroying();
|
|
270
270
|
|
|
271
271
|
this->shared->GetChannelMessageRegistrator()->UnregisterHandler(this->id);
|
|
272
272
|
|
|
@@ -899,22 +899,14 @@ namespace RTC
|
|
|
899
899
|
}
|
|
900
900
|
|
|
901
901
|
void PlainTransport::SendMessage(
|
|
902
|
-
RTC::DataConsumer* dataConsumer,
|
|
902
|
+
RTC::DataConsumer* dataConsumer, RTC::SCTP::Message message, onQueuedCallback* cb)
|
|
903
903
|
{
|
|
904
904
|
MS_TRACE();
|
|
905
905
|
|
|
906
|
-
|
|
907
|
-
{
|
|
908
|
-
// TODO: SCTP
|
|
909
|
-
}
|
|
910
|
-
// TODO: Remove once we only use built-in SCTP stack.
|
|
911
|
-
else
|
|
912
|
-
{
|
|
913
|
-
this->oldSctpAssociation->SendSctpMessage(dataConsumer, msg, len, ppid, cb);
|
|
914
|
-
}
|
|
906
|
+
SendSctpMessage(dataConsumer, std::move(message), cb);
|
|
915
907
|
}
|
|
916
908
|
|
|
917
|
-
bool PlainTransport::
|
|
909
|
+
bool PlainTransport::SendData(const uint8_t* data, size_t len)
|
|
918
910
|
{
|
|
919
911
|
MS_TRACE();
|
|
920
912
|
|
|
@@ -972,12 +964,7 @@ namespace RTC
|
|
|
972
964
|
OnRtpDataReceived(tuple, data, len, bufferLen);
|
|
973
965
|
}
|
|
974
966
|
// Check if it's SCTP.
|
|
975
|
-
else if (
|
|
976
|
-
{
|
|
977
|
-
OnSctpDataReceived(tuple, data, len);
|
|
978
|
-
}
|
|
979
|
-
// TODO: Remove once we only use built-in SCTP stack.
|
|
980
|
-
else if (!Settings::configuration.useBuiltInSctpStack && RTC::SctpAssociation::IsSctp(data, len))
|
|
967
|
+
else if (RTC::SCTP::Packet::IsSctp(data, len))
|
|
981
968
|
{
|
|
982
969
|
OnSctpDataReceived(tuple, data, len);
|
|
983
970
|
}
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
// #define MS_LOG_DEV_LEVEL 3
|
|
3
3
|
|
|
4
4
|
#include "RTC/Producer.hpp"
|
|
5
|
-
#include "DepLibUV.hpp"
|
|
6
5
|
#include "Logger.hpp"
|
|
7
6
|
#include "MediaSoupErrors.hpp"
|
|
8
|
-
#include "Utils.hpp"
|
|
9
7
|
#include "RTC/Consts.hpp"
|
|
10
8
|
#include "RTC/RTCP/Feedback.hpp"
|
|
11
9
|
#include "RTC/RTCP/XrReceiverReferenceTime.hpp"
|
|
12
10
|
#include "RTC/RTP/Codecs/Tools.hpp"
|
|
11
|
+
#include "Utils.hpp"
|
|
13
12
|
#ifdef MS_RTC_LOGGER_RTP
|
|
14
13
|
#include "RTC/RtcLogger.hpp"
|
|
15
14
|
#endif
|
|
@@ -21,7 +20,7 @@ namespace RTC
|
|
|
21
20
|
/* Static */
|
|
22
21
|
|
|
23
22
|
static constexpr size_t ProducerSendBufferSize{ 65536 };
|
|
24
|
-
thread_local uint8_t ProducerSendBuffer[ProducerSendBufferSize];
|
|
23
|
+
static thread_local uint8_t ProducerSendBuffer[ProducerSendBufferSize];
|
|
25
24
|
static constexpr unsigned int SendNackDelay{ 10u }; // In ms.
|
|
26
25
|
|
|
27
26
|
/* Instance methods. */
|
|
@@ -1196,8 +1195,8 @@ namespace RTC
|
|
|
1196
1195
|
|
|
1197
1196
|
// Mangle RTP header extensions.
|
|
1198
1197
|
{
|
|
1199
|
-
thread_local uint8_t buffer[4096];
|
|
1200
|
-
thread_local std::vector<RTC::RTP::Packet::Extension> extensions;
|
|
1198
|
+
static thread_local uint8_t buffer[4096];
|
|
1199
|
+
static thread_local std::vector<RTC::RTP::Packet::Extension> extensions;
|
|
1201
1200
|
|
|
1202
1201
|
// This happens just once.
|
|
1203
1202
|
if (extensions.capacity() != 24)
|
|
@@ -1495,7 +1494,7 @@ namespace RTC
|
|
|
1495
1494
|
auto notification = FBS::Producer::CreateTraceNotification(
|
|
1496
1495
|
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1497
1496
|
FBS::Producer::TraceEventType::KEYFRAME,
|
|
1498
|
-
|
|
1497
|
+
this->shared->GetTimeMs(),
|
|
1499
1498
|
FBS::Common::TraceDirection::DIRECTION_IN,
|
|
1500
1499
|
FBS::Producer::TraceInfo::KeyFrameTraceInfo,
|
|
1501
1500
|
traceInfo.Union());
|
|
@@ -1511,7 +1510,7 @@ namespace RTC
|
|
|
1511
1510
|
auto notification = FBS::Producer::CreateTraceNotification(
|
|
1512
1511
|
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1513
1512
|
FBS::Producer::TraceEventType::RTP,
|
|
1514
|
-
|
|
1513
|
+
this->shared->GetTimeMs(),
|
|
1515
1514
|
FBS::Common::TraceDirection::DIRECTION_IN,
|
|
1516
1515
|
FBS::Producer::TraceInfo::RtpTraceInfo,
|
|
1517
1516
|
traceInfo.Union());
|
|
@@ -1535,7 +1534,7 @@ namespace RTC
|
|
|
1535
1534
|
auto notification = FBS::Producer::CreateTraceNotification(
|
|
1536
1535
|
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1537
1536
|
FBS::Producer::TraceEventType::PLI,
|
|
1538
|
-
|
|
1537
|
+
this->shared->GetTimeMs(),
|
|
1539
1538
|
FBS::Common::TraceDirection::DIRECTION_OUT,
|
|
1540
1539
|
FBS::Producer::TraceInfo::PliTraceInfo,
|
|
1541
1540
|
traceInfo.Union());
|
|
@@ -1558,7 +1557,7 @@ namespace RTC
|
|
|
1558
1557
|
auto notification = FBS::Producer::CreateTraceNotification(
|
|
1559
1558
|
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1560
1559
|
FBS::Producer::TraceEventType::FIR,
|
|
1561
|
-
|
|
1560
|
+
this->shared->GetTimeMs(),
|
|
1562
1561
|
FBS::Common::TraceDirection::DIRECTION_OUT,
|
|
1563
1562
|
FBS::Producer::TraceInfo::FirTraceInfo,
|
|
1564
1563
|
traceInfo.Union());
|
|
@@ -1578,7 +1577,7 @@ namespace RTC
|
|
|
1578
1577
|
auto notification = FBS::Producer::CreateTraceNotification(
|
|
1579
1578
|
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1580
1579
|
FBS::Producer::TraceEventType::NACK,
|
|
1581
|
-
|
|
1580
|
+
this->shared->GetTimeMs(),
|
|
1582
1581
|
FBS::Common::TraceDirection::DIRECTION_OUT);
|
|
1583
1582
|
|
|
1584
1583
|
EmitTraceEvent(notification);
|
|
@@ -1605,7 +1604,7 @@ namespace RTC
|
|
|
1605
1604
|
auto notification = FBS::Producer::CreateTraceNotification(
|
|
1606
1605
|
this->shared->GetChannelNotifier()->GetBufferBuilder(),
|
|
1607
1606
|
FBS::Producer::TraceEventType::SR,
|
|
1608
|
-
|
|
1607
|
+
this->shared->GetTimeMs(),
|
|
1609
1608
|
FBS::Common::TraceDirection::DIRECTION_IN,
|
|
1610
1609
|
FBS::Producer::TraceInfo::SrTraceInfo,
|
|
1611
1610
|
traceInfo.Union());
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
#include "RTC/RTP/Packet.hpp"
|
|
5
5
|
#ifdef MS_RTC_LOGGER_RTP
|
|
6
|
-
#include "DepLibUV.hpp"
|
|
7
6
|
#endif
|
|
7
|
+
#include "DepLibUV.hpp"
|
|
8
8
|
#include "Logger.hpp"
|
|
9
9
|
#include "MediaSoupErrors.hpp"
|
|
10
10
|
#include "RTC/Consts.hpp"
|
|
@@ -136,6 +136,8 @@ namespace RTC
|
|
|
136
136
|
|
|
137
137
|
#ifdef MS_RTC_LOGGER_RTP
|
|
138
138
|
// Initialize logger.
|
|
139
|
+
// NOTE: Here we use DepLibUV directly since `this->logger` doesn't
|
|
140
|
+
// have any purpose during tests.
|
|
139
141
|
this->logger.timestamp = DepLibUV::GetTimeMs();
|
|
140
142
|
this->logger.recvRtpTimestamp = GetTimestamp();
|
|
141
143
|
this->logger.recvSeqNumber = GetSequenceNumber();
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
#include "RTC/RTP/ProbationGenerator.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
|
-
#include "Utils.hpp"
|
|
7
6
|
#include "RTC/RtpDictionaries.hpp"
|
|
7
|
+
#include "Utils.hpp"
|
|
8
8
|
#include <cstring> // std::memcpy(), std::memset()
|
|
9
9
|
#include <vector>
|
|
10
10
|
|
|
@@ -14,9 +14,9 @@ namespace RTC
|
|
|
14
14
|
{
|
|
15
15
|
/* Static. */
|
|
16
16
|
|
|
17
|
-
thread_local uint8_t ProbationPacketBuffer[ProbationGenerator::ProbationPacketMaxLength];
|
|
17
|
+
static thread_local uint8_t ProbationPacketBuffer[ProbationGenerator::ProbationPacketMaxLength];
|
|
18
18
|
static constexpr size_t ProbationPacketExtensionsBufferLength{ 200 };
|
|
19
|
-
alignas(4) thread_local uint8_t
|
|
19
|
+
alignas(4) static thread_local uint8_t
|
|
20
20
|
ProbationPacketExtensionsBuffer[ProbationPacketExtensionsBufferLength];
|
|
21
21
|
// 8 bytes, same as RTC::Consts::MidRtpExtensionMaxLength.
|
|
22
22
|
static const std::string MidValue{ "probator" };
|
|
@@ -28,7 +28,7 @@ namespace RTC
|
|
|
28
28
|
MS_TRACE();
|
|
29
29
|
|
|
30
30
|
// Trick to only fill the padding with zeroes once.
|
|
31
|
-
thread_local bool mustInitializePayload{ true };
|
|
31
|
+
static thread_local bool mustInitializePayload{ true };
|
|
32
32
|
|
|
33
33
|
if (mustInitializePayload)
|
|
34
34
|
{
|
|
@@ -27,7 +27,7 @@ namespace RTC
|
|
|
27
27
|
shared(shared),
|
|
28
28
|
params(params),
|
|
29
29
|
score(initialScore),
|
|
30
|
-
activeSinceMs(
|
|
30
|
+
activeSinceMs(this->shared->GetTimeMs())
|
|
31
31
|
{
|
|
32
32
|
MS_TRACE();
|
|
33
33
|
}
|
|
@@ -64,7 +64,7 @@ namespace RTC
|
|
|
64
64
|
{
|
|
65
65
|
MS_TRACE();
|
|
66
66
|
|
|
67
|
-
const uint64_t nowMs =
|
|
67
|
+
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
68
68
|
const auto mediaKind = this->params.mimeType.type == RTC::RtpCodecMimeType::Type::AUDIO
|
|
69
69
|
? FBS::RtpParameters::MediaKind::AUDIO
|
|
70
70
|
: FBS::RtpParameters::MediaKind::VIDEO;
|
|
@@ -123,7 +123,7 @@ namespace RTC
|
|
|
123
123
|
// Tell the RtpCodecMimeType to update its string based on current type and subtype.
|
|
124
124
|
params.mimeType.UpdateMimeType();
|
|
125
125
|
|
|
126
|
-
this->rtxStream = new RTP::RtxStream(params);
|
|
126
|
+
this->rtxStream = new RTP::RtxStream(this->shared, params);
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
bool RtpStream::ReceiveStreamPacket(const RTP::Packet* packet)
|
|
@@ -140,7 +140,7 @@ namespace RTC
|
|
|
140
140
|
this->started = true;
|
|
141
141
|
this->maxSeq = seq - 1;
|
|
142
142
|
this->maxPacketTs = packet->GetTimestamp();
|
|
143
|
-
this->maxPacketMs =
|
|
143
|
+
this->maxPacketMs = this->shared->GetTimeMs();
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
// If not a valid packet ignore it.
|
|
@@ -159,7 +159,7 @@ namespace RTC
|
|
|
159
159
|
if (Utils::Number::IsHigherThan<uint32_t>(packet->GetTimestamp(), this->maxPacketTs))
|
|
160
160
|
{
|
|
161
161
|
this->maxPacketTs = packet->GetTimestamp();
|
|
162
|
-
this->maxPacketMs =
|
|
162
|
+
this->maxPacketMs = this->shared->GetTimeMs();
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
return true;
|
|
@@ -180,7 +180,7 @@ namespace RTC
|
|
|
180
180
|
// If previous score was 0 (and new one is not 0) then update activeSinceMs.
|
|
181
181
|
if (previousScore == 0u)
|
|
182
182
|
{
|
|
183
|
-
this->activeSinceMs =
|
|
183
|
+
this->activeSinceMs = this->shared->GetTimeMs();
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
// Notify the listener.
|
|
@@ -227,7 +227,7 @@ namespace RTC
|
|
|
227
227
|
packet->GetTimestamp());
|
|
228
228
|
|
|
229
229
|
this->maxPacketTs = packet->GetTimestamp();
|
|
230
|
-
this->maxPacketMs =
|
|
230
|
+
this->maxPacketMs = this->shared->GetTimeMs();
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
// Too old packet received (older than the allowed misorder).
|
|
@@ -249,7 +249,7 @@ namespace RTC
|
|
|
249
249
|
InitSeq(seq);
|
|
250
250
|
|
|
251
251
|
this->maxPacketTs = packet->GetTimestamp();
|
|
252
|
-
this->maxPacketMs =
|
|
252
|
+
this->maxPacketMs = this->shared->GetTimeMs();
|
|
253
253
|
|
|
254
254
|
// Notify the subclass about it.
|
|
255
255
|
UserOnSequenceNumberReset();
|
|
@@ -336,7 +336,7 @@ namespace RTC
|
|
|
336
336
|
// If previous score was 0 (and new one is not 0) then update activeSinceMs.
|
|
337
337
|
if (previousScore == 0u)
|
|
338
338
|
{
|
|
339
|
-
this->activeSinceMs =
|
|
339
|
+
this->activeSinceMs = this->shared->GetTimeMs();
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
this->listener->OnRtpStreamScore(this, this->score, previousScore);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
|
|
4
4
|
#include "RTC/RTP/RtpStreamRecv.hpp"
|
|
5
5
|
#include "Logger.hpp"
|
|
6
|
-
#include "Utils.hpp"
|
|
7
6
|
#include "RTC/RTP/Codecs/Tools.hpp"
|
|
7
|
+
#include "Utils.hpp"
|
|
8
8
|
|
|
9
9
|
namespace RTC
|
|
10
10
|
{
|
|
@@ -18,7 +18,7 @@ namespace RTC
|
|
|
18
18
|
/* TransmissionCounter methods. */
|
|
19
19
|
|
|
20
20
|
RtpStreamRecv::TransmissionCounter::TransmissionCounter(
|
|
21
|
-
uint8_t spatialLayers, uint8_t temporalLayers, size_t windowSize)
|
|
21
|
+
SharedInterface* shared, uint8_t spatialLayers, uint8_t temporalLayers, size_t windowSize)
|
|
22
22
|
{
|
|
23
23
|
MS_TRACE();
|
|
24
24
|
|
|
@@ -29,7 +29,7 @@ namespace RTC
|
|
|
29
29
|
{
|
|
30
30
|
for (uint8_t tIdx{ 0u }; tIdx < temporalLayers; ++tIdx)
|
|
31
31
|
{
|
|
32
|
-
spatialLayerCounter.emplace_back(/*ignorePaddingOnlyPackets*/ true, windowSize);
|
|
32
|
+
spatialLayerCounter.emplace_back(shared, /*ignorePaddingOnlyPackets*/ true, windowSize);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -191,8 +191,8 @@ namespace RTC
|
|
|
191
191
|
sendNackDelayMs(sendNackDelayMs),
|
|
192
192
|
useRtpInactivityCheck(useRtpInactivityCheck),
|
|
193
193
|
transmissionCounter(
|
|
194
|
-
params.spatialLayers, params.temporalLayers, this->params.useDtx ? 6000 : 2500),
|
|
195
|
-
mediaTransmissionCounter(/*ignorePaddingOnlyPackets*/ true)
|
|
194
|
+
shared, params.spatialLayers, params.temporalLayers, this->params.useDtx ? 6000 : 2500),
|
|
195
|
+
mediaTransmissionCounter(shared, /*ignorePaddingOnlyPackets*/ true)
|
|
196
196
|
{
|
|
197
197
|
MS_TRACE();
|
|
198
198
|
|
|
@@ -228,7 +228,7 @@ namespace RTC
|
|
|
228
228
|
{
|
|
229
229
|
MS_TRACE();
|
|
230
230
|
|
|
231
|
-
const uint64_t nowMs =
|
|
231
|
+
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
232
232
|
|
|
233
233
|
auto baseStats = RTP::RtpStream::FillBufferStats(builder);
|
|
234
234
|
|
|
@@ -531,7 +531,7 @@ namespace RTC
|
|
|
531
531
|
if (this->lastSrReceived != 0)
|
|
532
532
|
{
|
|
533
533
|
// Get delay in milliseconds.
|
|
534
|
-
auto delayMs = static_cast<uint32_t>(
|
|
534
|
+
auto delayMs = static_cast<uint32_t>(this->shared->GetTimeMs() - this->lastSrReceived);
|
|
535
535
|
// Express delay in units of 1/65536 seconds.
|
|
536
536
|
uint32_t dlsr = (delayMs / 1000) << 16;
|
|
537
537
|
|
|
@@ -565,7 +565,7 @@ namespace RTC
|
|
|
565
565
|
{
|
|
566
566
|
MS_TRACE();
|
|
567
567
|
|
|
568
|
-
this->lastSrReceived =
|
|
568
|
+
this->lastSrReceived = this->shared->GetTimeMs();
|
|
569
569
|
this->lastSrTimestamp = report->GetNtpSec() << 16;
|
|
570
570
|
this->lastSrTimestamp += report->GetNtpFrac() >> 16;
|
|
571
571
|
|
|
@@ -599,7 +599,7 @@ namespace RTC
|
|
|
599
599
|
/* Calculate RTT. */
|
|
600
600
|
|
|
601
601
|
// Get the NTP representation of the current timestamp.
|
|
602
|
-
const uint64_t nowMs =
|
|
602
|
+
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
603
603
|
auto ntp = Utils::Time::TimeMs2Ntp(nowMs);
|
|
604
604
|
|
|
605
605
|
// Get the compact NTP representation of the current timestamp.
|
|
@@ -713,7 +713,8 @@ namespace RTC
|
|
|
713
713
|
}
|
|
714
714
|
|
|
715
715
|
// NOTE: Based on https://github.com/versatica/mediasoup/issues/1018.
|
|
716
|
-
auto transit =
|
|
716
|
+
auto transit =
|
|
717
|
+
static_cast<int>((this->shared->GetTimeMs() * GetClockRate() / 1000) - rtpTimestamp);
|
|
717
718
|
int d = transit - this->transit;
|
|
718
719
|
|
|
719
720
|
// First transit calculation, save and return.
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
#include "DepLibUring.hpp"
|
|
7
7
|
#endif
|
|
8
8
|
#include "Logger.hpp"
|
|
9
|
-
#include "Utils.hpp"
|
|
10
9
|
#include "RTC/Consts.hpp"
|
|
11
10
|
#include "RTC/RtpDictionaries.hpp"
|
|
11
|
+
#include "Utils.hpp"
|
|
12
12
|
#include <vector>
|
|
13
13
|
|
|
14
14
|
namespace RTC
|
|
@@ -21,7 +21,7 @@ namespace RTC
|
|
|
21
21
|
static constexpr size_t RetransmissionBufferMaxItems{ 2500u };
|
|
22
22
|
// 17: 16 bit mask + the initial sequence number.
|
|
23
23
|
static constexpr size_t MaxRequestedPackets{ 17u };
|
|
24
|
-
thread_local std::vector<RTP::RetransmissionBuffer::Item*> RetransmissionContainer(
|
|
24
|
+
static thread_local std::vector<RTP::RetransmissionBuffer::Item*> RetransmissionContainer(
|
|
25
25
|
MaxRequestedPackets + 1);
|
|
26
26
|
static constexpr uint32_t DefaultRtt{ 100u };
|
|
27
27
|
|
|
@@ -39,7 +39,7 @@ namespace RTC
|
|
|
39
39
|
std::string& mid)
|
|
40
40
|
: RTP::RtpStream::RtpStream(listener, shared, params, 10),
|
|
41
41
|
mid(mid),
|
|
42
|
-
transmissionCounter(/*ignorePaddingOnlyPackets*/ true)
|
|
42
|
+
transmissionCounter(shared, /*ignorePaddingOnlyPackets*/ true)
|
|
43
43
|
{
|
|
44
44
|
MS_TRACE();
|
|
45
45
|
|
|
@@ -83,7 +83,7 @@ namespace RTC
|
|
|
83
83
|
{
|
|
84
84
|
MS_TRACE();
|
|
85
85
|
|
|
86
|
-
const uint64_t nowMs =
|
|
86
|
+
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
87
87
|
|
|
88
88
|
auto baseStats = RTP::RtpStream::FillBufferStats(builder);
|
|
89
89
|
auto stats = FBS::RtpStream::CreateSendStats(
|
|
@@ -302,7 +302,7 @@ namespace RTC
|
|
|
302
302
|
/* Calculate RTT. */
|
|
303
303
|
|
|
304
304
|
// Get the NTP representation of the current timestamp.
|
|
305
|
-
const uint64_t nowMs =
|
|
305
|
+
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
306
306
|
auto ntp = Utils::Time::TimeMs2Ntp(nowMs);
|
|
307
307
|
|
|
308
308
|
// Get the compact NTP representation of the current timestamp.
|
|
@@ -342,7 +342,7 @@ namespace RTC
|
|
|
342
342
|
{
|
|
343
343
|
MS_TRACE();
|
|
344
344
|
|
|
345
|
-
this->lastRrReceivedMs =
|
|
345
|
+
this->lastRrReceivedMs = this->shared->GetTimeMs();
|
|
346
346
|
this->lastRrTimestamp = report->GetNtpSec() << 16;
|
|
347
347
|
this->lastRrTimestamp += report->GetNtpFrac() >> 16;
|
|
348
348
|
}
|
|
@@ -485,7 +485,7 @@ namespace RTC
|
|
|
485
485
|
}
|
|
486
486
|
|
|
487
487
|
// Look for each requested packet.
|
|
488
|
-
const uint64_t nowMs =
|
|
488
|
+
const uint64_t nowMs = this->shared->GetTimeMs();
|
|
489
489
|
const uint16_t rtt = (this->rtt > 0.0f ? this->rtt : DefaultRtt);
|
|
490
490
|
uint16_t currentSeq = seq;
|
|
491
491
|
bool requested{ true };
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// #define MS_LOG_DEV_LEVEL 3
|
|
3
3
|
|
|
4
4
|
#include "RTC/RTP/RtxStream.hpp"
|
|
5
|
-
#include "DepLibUV.hpp"
|
|
6
5
|
#include "Logger.hpp"
|
|
7
6
|
#include "Utils.hpp"
|
|
8
7
|
|
|
@@ -18,7 +17,8 @@ namespace RTC
|
|
|
18
17
|
|
|
19
18
|
/* Instance methods. */
|
|
20
19
|
|
|
21
|
-
RtxStream::RtxStream(RTP::RtxStream::Params& params)
|
|
20
|
+
RtxStream::RtxStream(SharedInterface* shared, RTP::RtxStream::Params& params)
|
|
21
|
+
: shared(shared), params(params)
|
|
22
22
|
{
|
|
23
23
|
MS_TRACE();
|
|
24
24
|
|
|
@@ -57,7 +57,7 @@ namespace RTC
|
|
|
57
57
|
this->started = true;
|
|
58
58
|
this->maxSeq = seq - 1;
|
|
59
59
|
this->maxPacketTs = packet->GetTimestamp();
|
|
60
|
-
this->maxPacketMs =
|
|
60
|
+
this->maxPacketMs = this->shared->GetTimeMs();
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
// If not a valid packet ignore it.
|
|
@@ -76,7 +76,7 @@ namespace RTC
|
|
|
76
76
|
if (Utils::Number::IsHigherThan<uint32_t>(packet->GetTimestamp(), this->maxPacketTs))
|
|
77
77
|
{
|
|
78
78
|
this->maxPacketTs = packet->GetTimestamp();
|
|
79
|
-
this->maxPacketMs =
|
|
79
|
+
this->maxPacketMs = this->shared->GetTimeMs();
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// Increase packet count.
|
|
@@ -141,7 +141,7 @@ namespace RTC
|
|
|
141
141
|
if (this->lastSrReceived != 0)
|
|
142
142
|
{
|
|
143
143
|
// Get delay in milliseconds.
|
|
144
|
-
const uint32_t delayMs =
|
|
144
|
+
const uint32_t delayMs = this->shared->GetTimeMs() - this->lastSrReceived;
|
|
145
145
|
// Express delay in units of 1/65536 seconds.
|
|
146
146
|
uint32_t dlsr = (delayMs / 1000) << 16;
|
|
147
147
|
|
|
@@ -163,7 +163,7 @@ namespace RTC
|
|
|
163
163
|
{
|
|
164
164
|
MS_TRACE();
|
|
165
165
|
|
|
166
|
-
this->lastSrReceived =
|
|
166
|
+
this->lastSrReceived = this->shared->GetTimeMs();
|
|
167
167
|
this->lastSrTimestamp = report->GetNtpSec() << 16;
|
|
168
168
|
this->lastSrTimestamp += report->GetNtpFrac() >> 16;
|
|
169
169
|
}
|
|
@@ -209,7 +209,7 @@ namespace RTC
|
|
|
209
209
|
InitSeq(seq);
|
|
210
210
|
|
|
211
211
|
this->maxPacketTs = packet->GetTimestamp();
|
|
212
|
-
this->maxPacketMs =
|
|
212
|
+
this->maxPacketMs = this->shared->GetTimeMs();
|
|
213
213
|
}
|
|
214
214
|
else
|
|
215
215
|
{
|