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
|
@@ -5,11 +5,7 @@
|
|
|
5
5
|
#include "DepLibUV.hpp"
|
|
6
6
|
#include "DepLibWebRTC.hpp"
|
|
7
7
|
#include "DepOpenSSL.hpp"
|
|
8
|
-
// TODO: Remove once we only use built-in SCTP stack.
|
|
9
|
-
#include "DepUsrSCTP.hpp"
|
|
10
8
|
#include "FuzzerUtils.hpp"
|
|
11
|
-
#include "Settings.hpp"
|
|
12
|
-
#include "Utils.hpp"
|
|
13
9
|
#include "RTC/DtlsTransport.hpp"
|
|
14
10
|
#include "RTC/FuzzerDtlsTransport.hpp"
|
|
15
11
|
#include "RTC/FuzzerRateCalculator.hpp"
|
|
@@ -29,6 +25,8 @@
|
|
|
29
25
|
#include "RTC/RTP/FuzzerRtpStreamSend.hpp"
|
|
30
26
|
#include "RTC/SCTP/FuzzerStateCookie.hpp"
|
|
31
27
|
#include "RTC/SCTP/packet/FuzzerPacket.hpp"
|
|
28
|
+
#include "Settings.hpp"
|
|
29
|
+
#include "Utils.hpp"
|
|
32
30
|
#include <cstdlib> // std::getenv()
|
|
33
31
|
#include <iostream>
|
|
34
32
|
#include <sstream> // std::istringstream()
|
|
@@ -146,11 +144,6 @@ namespace
|
|
|
146
144
|
DepLibUV::ClassInit();
|
|
147
145
|
DepOpenSSL::ClassInit();
|
|
148
146
|
DepLibSRTP::ClassInit();
|
|
149
|
-
// TODO: Remove once we only use built-in SCTP stack.
|
|
150
|
-
if (!Settings::configuration.useBuiltInSctpStack)
|
|
151
|
-
{
|
|
152
|
-
DepUsrSCTP::ClassInit();
|
|
153
|
-
}
|
|
154
147
|
DepLibWebRTC::ClassInit();
|
|
155
148
|
Utils::Crypto::ClassInit();
|
|
156
149
|
RTC::DtlsTransport::ClassInit();
|
|
@@ -163,7 +156,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t len)
|
|
|
163
156
|
{
|
|
164
157
|
// Trick to initialize our stuff just once.
|
|
165
158
|
// NOLINTNEXTLINE(readability-identifier-naming)
|
|
166
|
-
thread_local const int unused = init();
|
|
159
|
+
static thread_local const int unused = init();
|
|
167
160
|
|
|
168
161
|
// Avoid [-Wunused-variable].
|
|
169
162
|
(void)unused;
|
|
@@ -21,7 +21,7 @@ namespace Channel
|
|
|
21
21
|
using Method = FBS::Request::Method;
|
|
22
22
|
|
|
23
23
|
public:
|
|
24
|
-
thread_local
|
|
24
|
+
static thread_local flatbuffers::FlatBufferBuilder bufferBuilder;
|
|
25
25
|
static const absl::flat_hash_map<FBS::Request::Method, const char*> Method2String;
|
|
26
26
|
|
|
27
27
|
public:
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#ifndef MS_DEP_LIBURING_HPP
|
|
2
2
|
#define MS_DEP_LIBURING_HPP
|
|
3
3
|
|
|
4
|
-
#include "DepLibUV.hpp"
|
|
5
4
|
#include "FBS/liburing.h"
|
|
5
|
+
#include <uv.h>
|
|
6
6
|
#include <functional>
|
|
7
7
|
#include <liburing.h>
|
|
8
8
|
#include <queue>
|
|
@@ -52,8 +52,8 @@ public:
|
|
|
52
52
|
class LibUring;
|
|
53
53
|
|
|
54
54
|
// Whether liburing is enabled or not after runtime checks.
|
|
55
|
-
thread_local
|
|
56
|
-
thread_local
|
|
55
|
+
static thread_local bool enabled;
|
|
56
|
+
static thread_local LibUring* liburing;
|
|
57
57
|
|
|
58
58
|
public:
|
|
59
59
|
// Singleton.
|
|
@@ -96,9 +96,9 @@
|
|
|
96
96
|
#define MS_LOGGER_HPP
|
|
97
97
|
|
|
98
98
|
#include "common.hpp"
|
|
99
|
+
#include "Channel/ChannelSocket.hpp"
|
|
99
100
|
#include "LogLevel.hpp"
|
|
100
101
|
#include "Settings.hpp"
|
|
101
|
-
#include "Channel/ChannelSocket.hpp"
|
|
102
102
|
#include <cstdio> // std::snprintf(), std::fprintf(), stdout, stderr
|
|
103
103
|
#include <cstdlib> // std::abort()
|
|
104
104
|
#include <cstring>
|
|
@@ -156,10 +156,10 @@ public:
|
|
|
156
156
|
static void ClassInit(Channel::ChannelSocket* channel);
|
|
157
157
|
|
|
158
158
|
public:
|
|
159
|
-
static const uint64_t
|
|
160
|
-
thread_local
|
|
159
|
+
static const uint64_t Pid;
|
|
160
|
+
static thread_local Channel::ChannelSocket* channel;
|
|
161
161
|
static const size_t BufferSize {50000};
|
|
162
|
-
thread_local
|
|
162
|
+
static thread_local char buffer[];
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
/* Logging macros. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#ifndef MS_RTC_ACTIVE_SPEAKER_OBSERVER_HPP
|
|
2
2
|
#define MS_RTC_ACTIVE_SPEAKER_OBSERVER_HPP
|
|
3
3
|
|
|
4
|
-
#include "SharedInterface.hpp"
|
|
5
|
-
#include "RTC/RtpObserver.hpp"
|
|
6
4
|
#include "handles/TimerHandleInterface.hpp"
|
|
5
|
+
#include "RTC/RtpObserver.hpp"
|
|
6
|
+
#include "SharedInterface.hpp"
|
|
7
7
|
#include <absl/container/flat_hash_map.h>
|
|
8
8
|
#include <vector>
|
|
9
9
|
|
|
@@ -20,7 +20,9 @@ namespace RTC
|
|
|
20
20
|
class Speaker
|
|
21
21
|
{
|
|
22
22
|
public:
|
|
23
|
-
Speaker();
|
|
23
|
+
explicit Speaker(SharedInterface* shared);
|
|
24
|
+
|
|
25
|
+
public:
|
|
24
26
|
void EvalActivityScores();
|
|
25
27
|
double GetActivityScore(uint8_t interval) const;
|
|
26
28
|
void LevelChanged(uint32_t level, uint64_t now);
|
|
@@ -56,7 +58,7 @@ namespace RTC
|
|
|
56
58
|
class ProducerSpeaker
|
|
57
59
|
{
|
|
58
60
|
public:
|
|
59
|
-
|
|
61
|
+
ProducerSpeaker(SharedInterface* shared, RTC::Producer* producer);
|
|
60
62
|
~ProducerSpeaker();
|
|
61
63
|
|
|
62
64
|
public:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#ifndef MS_RTC_AUDIO_LEVEL_OBSERVER_HPP
|
|
2
2
|
#define MS_RTC_AUDIO_LEVEL_OBSERVER_HPP
|
|
3
3
|
|
|
4
|
-
#include "SharedInterface.hpp"
|
|
5
|
-
#include "RTC/RtpObserver.hpp"
|
|
6
4
|
#include "handles/TimerHandleInterface.hpp"
|
|
5
|
+
#include "RTC/RtpObserver.hpp"
|
|
6
|
+
#include "SharedInterface.hpp"
|
|
7
7
|
#include <absl/container/flat_hash_map.h>
|
|
8
8
|
|
|
9
9
|
namespace RTC
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
#define MS_RTC_CONSUMER_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "SharedInterface.hpp"
|
|
6
5
|
#include "Channel/ChannelRequest.hpp"
|
|
7
6
|
#include "Channel/ChannelSocket.hpp"
|
|
8
7
|
#include "FBS/consumer.h"
|
|
@@ -17,6 +16,7 @@
|
|
|
17
16
|
#include "RTC/RTP/RtpStreamSend.hpp"
|
|
18
17
|
#include "RTC/RTP/SharedPacket.hpp"
|
|
19
18
|
#include "RTC/RtpDictionaries.hpp"
|
|
19
|
+
#include "SharedInterface.hpp"
|
|
20
20
|
#include <absl/container/flat_hash_set.h>
|
|
21
21
|
#include <string>
|
|
22
22
|
#include <vector>
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
#define MS_RTC_DATA_CONSUMER_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "SharedInterface.hpp"
|
|
6
5
|
#include "Channel/ChannelRequest.hpp"
|
|
7
6
|
#include "Channel/ChannelSocket.hpp"
|
|
7
|
+
#include "RTC/SCTP/public/Message.hpp"
|
|
8
8
|
#include "RTC/SctpDictionaries.hpp"
|
|
9
|
+
#include "SharedInterface.hpp"
|
|
9
10
|
#include <absl/container/flat_hash_set.h>
|
|
10
11
|
#include <string>
|
|
11
12
|
|
|
@@ -24,13 +25,13 @@ namespace RTC
|
|
|
24
25
|
|
|
25
26
|
public:
|
|
26
27
|
virtual void OnDataConsumerSendMessage(
|
|
27
|
-
RTC::DataConsumer* dataConsumer,
|
|
28
|
-
const uint8_t* msg,
|
|
29
|
-
size_t len,
|
|
30
|
-
uint32_t ppid,
|
|
31
|
-
onQueuedCallback* cb) = 0;
|
|
28
|
+
RTC::DataConsumer* dataConsumer, RTC::SCTP::Message message, onQueuedCallback* cb) = 0;
|
|
32
29
|
virtual void OnDataConsumerNeedBufferedAmount(
|
|
33
|
-
RTC::DataConsumer* dataConsumer, uint32_t& bufferedAmount)
|
|
30
|
+
const RTC::DataConsumer* dataConsumer, uint32_t& bufferedAmount) const = 0;
|
|
31
|
+
virtual void OnDataConsumerNeedBufferedAmountLowThreshold(
|
|
32
|
+
const RTC::DataConsumer* dataConsumer, uint32_t& bufferedAmountLowThreshold) const = 0;
|
|
33
|
+
virtual void OnDataConsumerSetBufferedAmountLowThreshold(
|
|
34
|
+
const RTC::DataConsumer* dataConsumer, uint32_t bytes) const = 0;
|
|
34
35
|
virtual void OnDataConsumerDataProducerClosed(RTC::DataConsumer* dataConsumer) = 0;
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -92,13 +93,11 @@ namespace RTC
|
|
|
92
93
|
void DataProducerResumed();
|
|
93
94
|
void SctpAssociationConnected();
|
|
94
95
|
void SctpAssociationClosed();
|
|
95
|
-
void
|
|
96
|
-
void
|
|
96
|
+
void SctpBufferedAmountLow(uint32_t bufferedAmount) const;
|
|
97
|
+
void SctpSendBufferFull() const;
|
|
97
98
|
void DataProducerClosed();
|
|
98
99
|
bool SendMessage(
|
|
99
|
-
|
|
100
|
-
size_t len,
|
|
101
|
-
uint32_t ppid,
|
|
100
|
+
RTC::SCTP::Message message,
|
|
102
101
|
std::vector<uint16_t>& subchannels,
|
|
103
102
|
std::optional<uint16_t> requiredSubchannel,
|
|
104
103
|
const onQueuedCallback* cb = nullptr);
|
|
@@ -130,9 +129,6 @@ namespace RTC
|
|
|
130
129
|
bool dataProducerClosed{ false };
|
|
131
130
|
size_t messagesSent{ 0u };
|
|
132
131
|
size_t bytesSent{ 0u };
|
|
133
|
-
uint32_t bufferedAmount{ 0u };
|
|
134
|
-
uint32_t bufferedAmountLowThreshold{ 0u };
|
|
135
|
-
bool forceTriggerBufferedAmountLow{ false };
|
|
136
132
|
};
|
|
137
133
|
} // namespace RTC
|
|
138
134
|
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
#define MS_RTC_DATA_PRODUCER_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "SharedInterface.hpp"
|
|
6
5
|
#include "Channel/ChannelRequest.hpp"
|
|
7
6
|
#include "Channel/ChannelSocket.hpp"
|
|
7
|
+
#include "RTC/SCTP/public/Message.hpp"
|
|
8
8
|
#include "RTC/SctpDictionaries.hpp"
|
|
9
|
+
#include "SharedInterface.hpp"
|
|
9
10
|
#include <string>
|
|
10
11
|
#include <vector>
|
|
11
12
|
|
|
@@ -24,9 +25,7 @@ namespace RTC
|
|
|
24
25
|
virtual void OnDataProducerReceiveData(RTC::DataProducer* producer, size_t len) = 0;
|
|
25
26
|
virtual void OnDataProducerMessageReceived(
|
|
26
27
|
RTC::DataProducer* dataProducer,
|
|
27
|
-
|
|
28
|
-
size_t len,
|
|
29
|
-
uint32_t ppid,
|
|
28
|
+
RTC::SCTP::Message message,
|
|
30
29
|
std::vector<uint16_t>& subchannels,
|
|
31
30
|
std::optional<uint16_t> requiredSubchannel) = 0;
|
|
32
31
|
virtual void OnDataProducerPaused(RTC::DataProducer* dataProducer) = 0;
|
|
@@ -67,9 +66,7 @@ namespace RTC
|
|
|
67
66
|
return this->paused;
|
|
68
67
|
}
|
|
69
68
|
void ReceiveMessage(
|
|
70
|
-
|
|
71
|
-
size_t len,
|
|
72
|
-
uint32_t ppid,
|
|
69
|
+
RTC::SCTP::Message message,
|
|
73
70
|
std::vector<uint16_t>& subchannels,
|
|
74
71
|
std::optional<uint16_t> requiredSubchannel);
|
|
75
72
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#ifndef MS_RTC_DIRECT_TRANSPORT_HPP
|
|
2
2
|
#define MS_RTC_DIRECT_TRANSPORT_HPP
|
|
3
3
|
|
|
4
|
-
#include "SharedInterface.hpp"
|
|
5
4
|
#include "RTC/Transport.hpp"
|
|
5
|
+
#include "SharedInterface.hpp"
|
|
6
6
|
|
|
7
7
|
namespace RTC
|
|
8
8
|
{
|
|
@@ -32,11 +32,9 @@ namespace RTC
|
|
|
32
32
|
void SendRtcpCompoundPacket(RTC::RTCP::CompoundPacket* packet) override;
|
|
33
33
|
void SendMessage(
|
|
34
34
|
RTC::DataConsumer* dataConsumer,
|
|
35
|
-
|
|
36
|
-
size_t len,
|
|
37
|
-
uint32_t ppid,
|
|
35
|
+
RTC::SCTP::Message message,
|
|
38
36
|
onQueuedCallback* cb = nullptr) override;
|
|
39
|
-
bool
|
|
37
|
+
bool SendData(const uint8_t* data, size_t len) override;
|
|
40
38
|
void RecvStreamClosed(uint32_t ssrc) override;
|
|
41
39
|
void SendStreamClosed(uint32_t ssrc) override;
|
|
42
40
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
#define MS_RTC_DTLS_TRANSPORT_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "SharedInterface.hpp"
|
|
6
5
|
#include "FBS/webRtcTransport.h"
|
|
7
|
-
#include "RTC/SrtpSession.hpp"
|
|
8
6
|
#include "handles/TimerHandleInterface.hpp"
|
|
7
|
+
#include "RTC/SrtpSession.hpp"
|
|
8
|
+
#include "SharedInterface.hpp"
|
|
9
9
|
#include <openssl/bio.h>
|
|
10
10
|
#include <openssl/ssl.h>
|
|
11
11
|
#include <openssl/x509.h>
|
|
@@ -125,14 +125,14 @@ namespace RTC
|
|
|
125
125
|
static void GenerateFingerprints();
|
|
126
126
|
|
|
127
127
|
private:
|
|
128
|
-
thread_local
|
|
129
|
-
thread_local
|
|
130
|
-
thread_local
|
|
131
|
-
thread_local
|
|
128
|
+
static thread_local X509* certificate;
|
|
129
|
+
static thread_local EVP_PKEY* privateKey;
|
|
130
|
+
static thread_local SSL_CTX* sslCtx;
|
|
131
|
+
static thread_local uint8_t sslReadBuffer[];
|
|
132
132
|
static const absl::flat_hash_map<std::string, Role> String2Role;
|
|
133
133
|
static const absl::flat_hash_map<std::string, FingerprintAlgorithm> String2FingerprintAlgorithm;
|
|
134
134
|
static const absl::flat_hash_map<FingerprintAlgorithm, std::string> FingerprintAlgorithm2String;
|
|
135
|
-
thread_local
|
|
135
|
+
static thread_local std::vector<Fingerprint> localFingerprints;
|
|
136
136
|
static const std::vector<SrtpCryptoSuiteMapEntry> SrtpCryptoSuites;
|
|
137
137
|
|
|
138
138
|
public:
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
#define MS_RTC_ICE_ICE_SERVER_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "SharedInterface.hpp"
|
|
6
5
|
#include "FBS/webRtcTransport.h"
|
|
6
|
+
#include "handles/TimerHandleInterface.hpp"
|
|
7
7
|
#include "RTC/ICE/StunPacket.hpp"
|
|
8
8
|
#include "RTC/TransportTuple.hpp"
|
|
9
|
-
#include "
|
|
9
|
+
#include "SharedInterface.hpp"
|
|
10
10
|
#include <list>
|
|
11
11
|
#include <string>
|
|
12
12
|
#include <unordered_map>
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
#define MS_RTC_NACK_GENERATOR_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "
|
|
5
|
+
#include "handles/TimerHandleInterface.hpp"
|
|
6
6
|
#include "RTC/RTP/Packet.hpp"
|
|
7
7
|
#include "RTC/SeqManager.hpp"
|
|
8
|
-
#include "
|
|
8
|
+
#include "SharedInterface.hpp"
|
|
9
9
|
#include <map>
|
|
10
10
|
#include <set>
|
|
11
11
|
#include <vector>
|
|
@@ -75,6 +75,7 @@ namespace RTC
|
|
|
75
75
|
private:
|
|
76
76
|
// Passed by argument.
|
|
77
77
|
Listener* listener{ nullptr };
|
|
78
|
+
SharedInterface* shared{ nullptr };
|
|
78
79
|
unsigned int sendNackDelayMs{ 0u };
|
|
79
80
|
// Allocated by this.
|
|
80
81
|
TimerHandleInterface* timer{ nullptr };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#ifndef MS_RTC_PIPE_TRANSPORT_HPP
|
|
2
2
|
#define MS_RTC_PIPE_TRANSPORT_HPP
|
|
3
3
|
|
|
4
|
-
#include "SharedInterface.hpp"
|
|
5
4
|
#include "FBS/pipeTransport.h"
|
|
6
5
|
#include "RTC/SrtpSession.hpp"
|
|
7
6
|
#include "RTC/Transport.hpp"
|
|
8
7
|
#include "RTC/TransportTuple.hpp"
|
|
9
8
|
#include "RTC/UdpSocket.hpp"
|
|
9
|
+
#include "SharedInterface.hpp"
|
|
10
10
|
|
|
11
11
|
namespace RTC
|
|
12
12
|
{
|
|
@@ -50,11 +50,9 @@ namespace RTC
|
|
|
50
50
|
void SendRtcpCompoundPacket(RTC::RTCP::CompoundPacket* packet) override;
|
|
51
51
|
void SendMessage(
|
|
52
52
|
RTC::DataConsumer* dataConsumer,
|
|
53
|
-
|
|
54
|
-
size_t len,
|
|
55
|
-
uint32_t ppid,
|
|
53
|
+
RTC::SCTP::Message message,
|
|
56
54
|
onQueuedCallback* cb = nullptr) override;
|
|
57
|
-
bool
|
|
55
|
+
bool SendData(const uint8_t* data, size_t len) override;
|
|
58
56
|
void RecvStreamClosed(uint32_t ssrc) override;
|
|
59
57
|
void SendStreamClosed(uint32_t ssrc) override;
|
|
60
58
|
void OnPacketReceived(RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#ifndef MS_RTC_PLAIN_TRANSPORT_HPP
|
|
2
2
|
#define MS_RTC_PLAIN_TRANSPORT_HPP
|
|
3
3
|
|
|
4
|
-
#include "SharedInterface.hpp"
|
|
5
4
|
#include "FBS/plainTransport.h"
|
|
6
5
|
#include "RTC/SrtpSession.hpp"
|
|
7
6
|
#include "RTC/Transport.hpp"
|
|
8
7
|
#include "RTC/TransportTuple.hpp"
|
|
9
8
|
#include "RTC/UdpSocket.hpp"
|
|
9
|
+
#include "SharedInterface.hpp"
|
|
10
10
|
#include <absl/container/flat_hash_map.h>
|
|
11
11
|
|
|
12
12
|
namespace RTC
|
|
@@ -44,11 +44,9 @@ namespace RTC
|
|
|
44
44
|
void SendRtcpCompoundPacket(RTC::RTCP::CompoundPacket* packet) override;
|
|
45
45
|
void SendMessage(
|
|
46
46
|
RTC::DataConsumer* dataConsumer,
|
|
47
|
-
|
|
48
|
-
size_t len,
|
|
49
|
-
uint32_t ppid,
|
|
47
|
+
RTC::SCTP::Message message,
|
|
50
48
|
onQueuedCallback* cb = nullptr) override;
|
|
51
|
-
bool
|
|
49
|
+
bool SendData(const uint8_t* data, size_t len) override;
|
|
52
50
|
void RecvStreamClosed(uint32_t ssrc) override;
|
|
53
51
|
void SendStreamClosed(uint32_t ssrc) override;
|
|
54
52
|
void OnPacketReceived(RTC::TransportTuple* tuple, const uint8_t* data, size_t len, size_t bufferLen);
|
|
@@ -78,7 +78,7 @@ namespace RTC
|
|
|
78
78
|
static uint8_t ConvertSocketFlags(RTC::Transport::SocketFlags& flags, Protocol protocol, int family);
|
|
79
79
|
|
|
80
80
|
private:
|
|
81
|
-
thread_local
|
|
81
|
+
static thread_local absl::flat_hash_map<uint64_t, PortRange> mapPortRanges;
|
|
82
82
|
};
|
|
83
83
|
} // namespace RTC
|
|
84
84
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
#define MS_RTC_PRODUCER_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "SharedInterface.hpp"
|
|
6
5
|
#include "Channel/ChannelRequest.hpp"
|
|
7
6
|
#include "Channel/ChannelSocket.hpp"
|
|
8
7
|
#include "RTC/KeyFrameRequestManager.hpp"
|
|
@@ -14,6 +13,7 @@
|
|
|
14
13
|
#include "RTC/RTP/Packet.hpp"
|
|
15
14
|
#include "RTC/RTP/RtpStreamRecv.hpp"
|
|
16
15
|
#include "RTC/RtpDictionaries.hpp"
|
|
16
|
+
#include "SharedInterface.hpp"
|
|
17
17
|
#include <string>
|
|
18
18
|
#include <vector>
|
|
19
19
|
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
#define MS_RTC_RTP_PACKET_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "Utils.hpp"
|
|
6
5
|
#include "FBS/rtpPacket.h"
|
|
7
6
|
#include "RTC/RTP/Codecs/DependencyDescriptor.hpp"
|
|
8
7
|
#include "RTC/RTP/Codecs/PayloadDescriptorHandler.hpp"
|
|
9
8
|
#include "RTC/RTP/HeaderExtensionIds.hpp"
|
|
10
9
|
#include "RTC/RtpDictionaries.hpp"
|
|
11
10
|
#include "RTC/Serializable.hpp"
|
|
11
|
+
#include "Utils.hpp"
|
|
12
12
|
#ifdef MS_RTC_LOGGER_RTP
|
|
13
13
|
#include "RTC/RtcLogger.hpp"
|
|
14
14
|
#endif
|
|
@@ -229,7 +229,7 @@ namespace RTC
|
|
|
229
229
|
static uint32_t GetNextMediasoupPacketId();
|
|
230
230
|
|
|
231
231
|
private:
|
|
232
|
-
thread_local
|
|
232
|
+
static thread_local uint32_t nextMediasoupPacketId;
|
|
233
233
|
|
|
234
234
|
private:
|
|
235
235
|
/**
|
|
@@ -2,21 +2,20 @@
|
|
|
2
2
|
#define MS_RTC_RTP_RTP_STREAM_HPP
|
|
3
3
|
|
|
4
4
|
#include "common.hpp"
|
|
5
|
-
#include "DepLibUV.hpp"
|
|
6
|
-
#include "SharedInterface.hpp"
|
|
7
5
|
#include "FBS/rtpStream.h"
|
|
8
|
-
#include "RTC/RTCP/FeedbackPsFir.hpp"
|
|
9
|
-
#include "RTC/RTCP/FeedbackPsPli.hpp"
|
|
10
|
-
#include "RTC/RTCP/FeedbackRtpNack.hpp"
|
|
11
|
-
#include "RTC/RTCP/Packet.hpp"
|
|
12
|
-
#include "RTC/RTCP/ReceiverReport.hpp"
|
|
13
|
-
#include "RTC/RTCP/Sdes.hpp"
|
|
14
|
-
#include "RTC/RTCP/SenderReport.hpp"
|
|
15
|
-
#include "RTC/RTCP/XrDelaySinceLastRr.hpp"
|
|
16
|
-
#include "RTC/RTCP/XrReceiverReferenceTime.hpp"
|
|
6
|
+
#include "RTC/RTCP/FeedbackPsFir.hpp"
|
|
7
|
+
#include "RTC/RTCP/FeedbackPsPli.hpp"
|
|
8
|
+
#include "RTC/RTCP/FeedbackRtpNack.hpp"
|
|
9
|
+
#include "RTC/RTCP/Packet.hpp"
|
|
10
|
+
#include "RTC/RTCP/ReceiverReport.hpp"
|
|
11
|
+
#include "RTC/RTCP/Sdes.hpp"
|
|
12
|
+
#include "RTC/RTCP/SenderReport.hpp"
|
|
13
|
+
#include "RTC/RTCP/XrDelaySinceLastRr.hpp"
|
|
14
|
+
#include "RTC/RTCP/XrReceiverReferenceTime.hpp"
|
|
17
15
|
#include "RTC/RTP/Packet.hpp"
|
|
18
16
|
#include "RTC/RTP/RtxStream.hpp"
|
|
19
17
|
#include "RTC/RtpDictionaries.hpp"
|
|
18
|
+
#include "SharedInterface.hpp"
|
|
20
19
|
#include <string>
|
|
21
20
|
#include <vector>
|
|
22
21
|
|
|
@@ -167,7 +166,7 @@ namespace RTC
|
|
|
167
166
|
}
|
|
168
167
|
uint64_t GetActiveMs() const
|
|
169
168
|
{
|
|
170
|
-
return
|
|
169
|
+
return this->shared->GetTimeMs() - this->activeSinceMs;
|
|
171
170
|
}
|
|
172
171
|
|
|
173
172
|
protected:
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#ifndef MS_RTC_RTP_RTP_STREAM_RECV_HPP
|
|
2
2
|
#define MS_RTC_RTP_RTP_STREAM_RECV_HPP
|
|
3
3
|
|
|
4
|
+
#include "handles/TimerHandleInterface.hpp"
|
|
4
5
|
#include "RTC/NackGenerator.hpp"
|
|
5
6
|
#include "RTC/RTCP/XrDelaySinceLastRr.hpp"
|
|
6
7
|
#include "RTC/RTP/RtpStream.hpp"
|
|
7
8
|
#include "RTC/RateCalculator.hpp"
|
|
8
|
-
#include "handles/TimerHandleInterface.hpp"
|
|
9
9
|
#include <vector>
|
|
10
10
|
|
|
11
11
|
namespace RTC
|
|
@@ -30,7 +30,8 @@ namespace RTC
|
|
|
30
30
|
class TransmissionCounter
|
|
31
31
|
{
|
|
32
32
|
public:
|
|
33
|
-
TransmissionCounter(
|
|
33
|
+
TransmissionCounter(
|
|
34
|
+
SharedInterface* shared, uint8_t spatialLayers, uint8_t temporalLayers, size_t windowSize);
|
|
34
35
|
void Update(const RTP::Packet* packet);
|
|
35
36
|
uint32_t GetBitrate(uint64_t nowMs);
|
|
36
37
|
uint32_t GetBitrate(uint64_t nowMs, uint8_t spatialLayer, uint8_t temporalLayer);
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
#include "RTC/RTCP/SenderReport.hpp"
|
|
8
8
|
#include "RTC/RTP/Packet.hpp"
|
|
9
9
|
#include "RTC/RtpDictionaries.hpp"
|
|
10
|
+
#include "SharedInterface.hpp"
|
|
10
11
|
#include <string>
|
|
11
12
|
|
|
12
13
|
namespace RTC
|
|
@@ -30,7 +31,7 @@ namespace RTC
|
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
public:
|
|
33
|
-
explicit RtxStream(RTP::RtxStream::Params& params);
|
|
34
|
+
explicit RtxStream(SharedInterface* shared, RTP::RtxStream::Params& params);
|
|
34
35
|
virtual ~RtxStream();
|
|
35
36
|
|
|
36
37
|
flatbuffers::Offset<FBS::RtxStream::RtxDump> FillBuffer(
|
|
@@ -87,6 +88,7 @@ namespace RTC
|
|
|
87
88
|
|
|
88
89
|
protected:
|
|
89
90
|
// Given as argument.
|
|
91
|
+
SharedInterface* shared{ nullptr };
|
|
90
92
|
Params params;
|
|
91
93
|
// Others.
|
|
92
94
|
// https://tools.ietf.org/html/rfc3550#appendix-A.1 stuff.
|