mediasoup 3.15.7 → 3.15.8
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/package.json +12 -12
- package/worker/fuzzer/include/RTC/SCTP/association/FuzzerStateCookie.hpp +20 -0
- package/worker/fuzzer/include/RTC/SCTP/packet/FuzzerPacket.hpp +20 -0
- package/worker/fuzzer/src/FuzzerUtils.cpp +3 -0
- package/worker/fuzzer/src/RTC/SCTP/association/FuzzerStateCookie.cpp +73 -0
- package/worker/fuzzer/src/RTC/SCTP/packet/FuzzerPacket.cpp +73 -0
- package/worker/fuzzer/src/fuzzer.cpp +49 -16
- package/worker/include/Logger.hpp +38 -6
- package/worker/include/RTC/Codecs/H264.hpp +12 -3
- package/worker/include/RTC/Codecs/H264_SVC.hpp +12 -3
- package/worker/include/RTC/Codecs/Opus.hpp +10 -4
- package/worker/include/RTC/Codecs/PayloadDescriptorHandler.hpp +7 -0
- package/worker/include/RTC/Codecs/VP8.hpp +44 -3
- package/worker/include/RTC/Codecs/VP9.hpp +11 -2
- package/worker/include/RTC/Consts.hpp +28 -6
- package/worker/include/RTC/RtpPacket.hpp +5 -2
- package/worker/include/RTC/RtpProbationGenerator.hpp +1 -1
- package/worker/include/RTC/RtpRetransmissionBuffer.hpp +3 -0
- package/worker/include/RTC/SCTP/TODO_SCTP.md +20 -0
- package/worker/include/RTC/SCTP/association/NegotiatedCapabilities.hpp +51 -0
- package/worker/include/RTC/SCTP/association/Socket.hpp +100 -0
- package/worker/include/RTC/SCTP/association/StateCookie.hpp +195 -0
- package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +108 -0
- package/worker/include/RTC/SCTP/packet/Chunk.hpp +631 -0
- package/worker/include/RTC/SCTP/packet/ErrorCause.hpp +183 -0
- package/worker/include/RTC/SCTP/packet/Packet.hpp +259 -0
- package/worker/include/RTC/SCTP/packet/Parameter.hpp +205 -0
- package/worker/include/RTC/SCTP/packet/TLV.hpp +168 -0
- package/worker/include/RTC/SCTP/packet/chunks/AbortAssociationChunk.hpp +102 -0
- package/worker/include/RTC/SCTP/packet/chunks/CookieAckChunk.hpp +81 -0
- package/worker/include/RTC/SCTP/packet/chunks/CookieEchoChunk.hpp +102 -0
- package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +208 -0
- package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +132 -0
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatAckChunk.hpp +94 -0
- package/worker/include/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.hpp +94 -0
- package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +208 -0
- package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +149 -0
- package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +173 -0
- package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +173 -0
- package/worker/include/RTC/SCTP/packet/chunks/OperationErrorChunk.hpp +92 -0
- package/worker/include/RTC/SCTP/packet/chunks/ReConfigChunk.hpp +102 -0
- package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +195 -0
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownAckChunk.hpp +81 -0
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +107 -0
- package/worker/include/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.hpp +91 -0
- package/worker/include/RTC/SCTP/packet/chunks/UnknownChunk.hpp +91 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.hpp +80 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.hpp +79 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +105 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +116 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +100 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.hpp +77 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.hpp +98 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.hpp +102 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +100 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/UnknownErrorCause.hpp +90 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.hpp +98 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.hpp +98 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.hpp +98 -0
- package/worker/include/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.hpp +98 -0
- package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +114 -0
- package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +114 -0
- package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +101 -0
- package/worker/include/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.hpp +78 -0
- package/worker/include/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.hpp +97 -0
- package/worker/include/RTC/SCTP/packet/parameters/IPv4AddressParameter.hpp +110 -0
- package/worker/include/RTC/SCTP/packet/parameters/IPv6AddressParameter.hpp +113 -0
- package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +119 -0
- package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +137 -0
- package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +163 -0
- package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +102 -0
- package/worker/include/RTC/SCTP/packet/parameters/StateCookieParameter.hpp +97 -0
- package/worker/include/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.hpp +95 -0
- package/worker/include/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.hpp +99 -0
- package/worker/include/RTC/SCTP/packet/parameters/UnknownParameter.hpp +91 -0
- package/worker/include/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.hpp +98 -0
- package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +120 -0
- package/worker/include/RTC/Serializable.hpp +257 -0
- package/worker/include/Settings.hpp +2 -2
- package/worker/include/Utils.hpp +10 -31
- package/worker/include/common.hpp +1 -1
- package/worker/meson.build +170 -41
- package/worker/meson_options.txt +1 -0
- package/worker/scripts/clang-format.mjs +1 -1
- package/worker/src/RTC/Codecs/H264.cpp +0 -5
- package/worker/src/RTC/Codecs/H264_SVC.cpp +0 -5
- package/worker/src/RTC/Codecs/VP8.cpp +40 -2
- package/worker/src/RTC/Codecs/VP9.cpp +0 -5
- package/worker/src/RTC/RTCP/FeedbackRtpNack.cpp +1 -1
- package/worker/src/RTC/RTCP/Sdes.cpp +2 -3
- package/worker/src/RTC/RtpPacket.cpp +26 -3
- package/worker/src/RTC/RtpRetransmissionBuffer.cpp +1 -0
- package/worker/src/RTC/RtpStreamSend.cpp +5 -0
- package/worker/src/RTC/SCTP/association/NegotiatedCapabilities.cpp +28 -0
- package/worker/src/RTC/SCTP/association/Socket.cpp +42 -0
- package/worker/src/RTC/SCTP/association/StateCookie.cpp +164 -0
- package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +52 -0
- package/worker/src/RTC/SCTP/packet/Chunk.cpp +791 -0
- package/worker/src/RTC/SCTP/packet/ErrorCause.cpp +118 -0
- package/worker/src/RTC/SCTP/packet/Packet.cpp +469 -0
- package/worker/src/RTC/SCTP/packet/Parameter.cpp +121 -0
- package/worker/src/RTC/SCTP/packet/TLV.cpp +183 -0
- package/worker/src/RTC/SCTP/packet/chunks/AbortAssociationChunk.cpp +140 -0
- package/worker/src/RTC/SCTP/packet/chunks/CookieAckChunk.cpp +125 -0
- package/worker/src/RTC/SCTP/packet/chunks/CookieEchoChunk.cpp +134 -0
- package/worker/src/RTC/SCTP/packet/chunks/DataChunk.cpp +230 -0
- package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +180 -0
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatAckChunk.cpp +130 -0
- package/worker/src/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.cpp +130 -0
- package/worker/src/RTC/SCTP/packet/chunks/IDataChunk.cpp +240 -0
- package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +183 -0
- package/worker/src/RTC/SCTP/packet/chunks/InitAckChunk.cpp +200 -0
- package/worker/src/RTC/SCTP/packet/chunks/InitChunk.cpp +200 -0
- package/worker/src/RTC/SCTP/packet/chunks/OperationErrorChunk.cpp +130 -0
- package/worker/src/RTC/SCTP/packet/chunks/ReConfigChunk.cpp +129 -0
- package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +243 -0
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownAckChunk.cpp +125 -0
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownChunk.cpp +138 -0
- package/worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp +135 -0
- package/worker/src/RTC/SCTP/packet/chunks/UnknownChunk.cpp +97 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.cpp +134 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.cpp +133 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.cpp +155 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.cpp +192 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.cpp +140 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.cpp +124 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.cpp +136 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.cpp +144 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.cpp +140 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/UnknownErrorCause.cpp +93 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.cpp +138 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.cpp +140 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.cpp +139 -0
- package/worker/src/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.cpp +138 -0
- package/worker/src/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.cpp +169 -0
- package/worker/src/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.cpp +169 -0
- package/worker/src/RTC/SCTP/packet/parameters/CookiePreservativeParameter.cpp +143 -0
- package/worker/src/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.cpp +129 -0
- package/worker/src/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.cpp +134 -0
- package/worker/src/RTC/SCTP/packet/parameters/IPv4AddressParameter.cpp +154 -0
- package/worker/src/RTC/SCTP/packet/parameters/IPv6AddressParameter.cpp +154 -0
- package/worker/src/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.cpp +174 -0
- package/worker/src/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.cpp +199 -0
- package/worker/src/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.cpp +229 -0
- package/worker/src/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.cpp +145 -0
- package/worker/src/RTC/SCTP/packet/parameters/StateCookieParameter.cpp +133 -0
- package/worker/src/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.cpp +158 -0
- package/worker/src/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.cpp +151 -0
- package/worker/src/RTC/SCTP/packet/parameters/UnknownParameter.cpp +92 -0
- package/worker/src/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.cpp +140 -0
- package/worker/src/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.cpp +181 -0
- package/worker/src/RTC/Serializable.cpp +142 -0
- package/worker/src/RTC/StunPacket.cpp +2 -3
- package/worker/src/RTC/WebRtcTransport.cpp +40 -0
- package/worker/src/Settings.cpp +81 -81
- package/worker/src/Utils/Crypto.cpp +77 -0
- package/worker/tasks.py +2 -2
- package/worker/test/include/RTC/SCTP/common.hpp +207 -0
- package/worker/test/include/helpers.hpp +6 -159
- package/worker/test/src/RTC/Codecs/TestVP8.cpp +146 -1
- package/worker/test/src/RTC/SCTP/association/TestStateCookie.cpp +306 -0
- package/worker/test/src/RTC/SCTP/common.cpp +36 -0
- package/worker/test/src/RTC/SCTP/packet/TestPacket.cpp +905 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestAbortAssociationChunk.cpp +333 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieAckChunk.cpp +133 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieEchoChunk.cpp +271 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestDataChunk.cpp +327 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +227 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatAckChunk.cpp +399 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatRequestChunk.cpp +568 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIDataChunk.cpp +326 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +260 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitAckChunk.cpp +167 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +672 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestOperationErrorChunk.cpp +428 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestReConfigChunk.cpp +338 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +329 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownAckChunk.cpp +135 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownChunk.cpp +176 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownCompleteChunk.cpp +168 -0
- package/worker/test/src/RTC/SCTP/packet/chunks/TestUnknownChunk.cpp +112 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestCookieReceivedWhileShuttingDownErrorCause.cpp +103 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidMandatoryParameterErrorCause.cpp +102 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidStreamIdentifierErrorCause.cpp +210 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestMissingMandatoryParameterErrorCause.cpp +230 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestNoUserDataErrorCause.cpp +191 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestOutOfResourceErrorCause.cpp +139 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestProtocolViolationErrorCause.cpp +230 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestRestartOfAnAssociationWithNewAddressesErrorCause.cpp +232 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestStaleCookieErrorCause.cpp +191 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnknownErrorCause.cpp +146 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedChunkTypeErrorCause.cpp +230 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedParametersErrorCause.cpp +202 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnresolvableAddressErrorCause.cpp +230 -0
- package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUserInitiatedAbortErrorCause.cpp +230 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddIncomingStreamsRequestParameter.cpp +152 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestAddOutgoingStreamsRequestParameter.cpp +152 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestCookiePreservativeParameter.cpp +197 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestForwardTsnSupportedParameter.cpp +109 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestHeartbeatInfoParameter.cpp +300 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv4AddressParameter.cpp +220 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +240 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestIncomingSsnResetRequestParameter.cpp +173 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestOutgoingSsnResetRequestParameter.cpp +196 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestReconfigurationResponseParameter.cpp +309 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSsnTsnResetRequestParameter.cpp +142 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestStateCookieParameter.cpp +167 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedAddressTypesParameter.cpp +198 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedExtensionsParameter.cpp +181 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnknownParameter.cpp +148 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestUnrecognizedParameterParameter.cpp +167 -0
- package/worker/test/src/RTC/SCTP/packet/parameters/TestZeroChecksumAcceptableParameter.cpp +158 -0
- package/worker/test/src/RTC/TestNackGenerator.cpp +15 -8
- package/worker/test/src/RTC/TestRtpPacketH264Svc.cpp +1 -0
- package/worker/test/src/RTC/TestRtpStreamSend.cpp +163 -0
- package/worker/test/src/Utils/TestBits.cpp +1 -1
- package/worker/test/src/Utils/TestByte.cpp +162 -1
- package/worker/test/src/Utils/TestCrypto.cpp +73 -0
- package/worker/test/src/Utils/TestIP.cpp +3 -3
- package/worker/test/src/Utils/TestString.cpp +2 -2
- package/worker/test/src/Utils/TestTime.cpp +1 -1
- package/worker/test/src/helpers.cpp +196 -0
- package/worker/test/src/tests.cpp +24 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.8",
|
|
4
4
|
"description": "Cutting Edge WebRTC Video Conferencing",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"@types/ini": "^4.1.1",
|
|
93
|
-
"debug": "^4.4.
|
|
93
|
+
"debug": "^4.4.1",
|
|
94
94
|
"flatbuffers": "^25.2.10",
|
|
95
95
|
"h264-profile-level-id": "^2.2.0",
|
|
96
96
|
"ini": "^5.0.0",
|
|
@@ -99,24 +99,24 @@
|
|
|
99
99
|
"tar": "^7.4.3"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@eslint/js": "^9.
|
|
102
|
+
"@eslint/js": "^9.26.0",
|
|
103
103
|
"@octokit/rest": "^21.1.1",
|
|
104
104
|
"@types/debug": "^4.1.12",
|
|
105
105
|
"@types/jest": "^29.5.14",
|
|
106
|
-
"@types/node": "^22.
|
|
107
|
-
"eslint": "^9.
|
|
108
|
-
"eslint-config-prettier": "^10.1.
|
|
106
|
+
"@types/node": "^22.15.18",
|
|
107
|
+
"eslint": "^9.26.0",
|
|
108
|
+
"eslint-config-prettier": "^10.1.5",
|
|
109
109
|
"eslint-plugin-jest": "^28.11.0",
|
|
110
|
-
"eslint-plugin-prettier": "^5.
|
|
111
|
-
"globals": "^16.
|
|
110
|
+
"eslint-plugin-prettier": "^5.4.0",
|
|
111
|
+
"globals": "^16.1.0",
|
|
112
112
|
"jest": "^29.7.0",
|
|
113
|
-
"marked": "^15.0.
|
|
113
|
+
"marked": "^15.0.11",
|
|
114
114
|
"open-cli": "^8.0.0",
|
|
115
115
|
"pick-port": "^2.1.0",
|
|
116
116
|
"prettier": "^3.5.3",
|
|
117
117
|
"sctp": "^1.0.0",
|
|
118
|
-
"ts-jest": "^29.3.
|
|
119
|
-
"typescript": "^5.8.
|
|
120
|
-
"typescript-eslint": "^8.
|
|
118
|
+
"ts-jest": "^29.3.3",
|
|
119
|
+
"typescript": "^5.8.3",
|
|
120
|
+
"typescript-eslint": "^8.32.1"
|
|
121
121
|
}
|
|
122
122
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#ifndef MS_FUZZER_RTC_SCTP_STATE_COOKIE_HPP
|
|
2
|
+
#define MS_FUZZER_RTC_SCTP_STATE_COOKIE_HPP
|
|
3
|
+
|
|
4
|
+
#include "common.hpp"
|
|
5
|
+
|
|
6
|
+
namespace Fuzzer
|
|
7
|
+
{
|
|
8
|
+
namespace RTC
|
|
9
|
+
{
|
|
10
|
+
namespace SCTP
|
|
11
|
+
{
|
|
12
|
+
namespace StateCookie
|
|
13
|
+
{
|
|
14
|
+
void Fuzz(const uint8_t* data, size_t len);
|
|
15
|
+
}
|
|
16
|
+
} // namespace SCTP
|
|
17
|
+
} // namespace RTC
|
|
18
|
+
} // namespace Fuzzer
|
|
19
|
+
|
|
20
|
+
#endif
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#ifndef MS_FUZZER_RTC_SCTP_PACKET_HPP
|
|
2
|
+
#define MS_FUZZER_RTC_SCTP_PACKET_HPP
|
|
3
|
+
|
|
4
|
+
#include "common.hpp"
|
|
5
|
+
|
|
6
|
+
namespace Fuzzer
|
|
7
|
+
{
|
|
8
|
+
namespace RTC
|
|
9
|
+
{
|
|
10
|
+
namespace SCTP
|
|
11
|
+
{
|
|
12
|
+
namespace Packet
|
|
13
|
+
{
|
|
14
|
+
void Fuzz(const uint8_t* data, size_t len);
|
|
15
|
+
}
|
|
16
|
+
} // namespace SCTP
|
|
17
|
+
} // namespace RTC
|
|
18
|
+
} // namespace Fuzzer
|
|
19
|
+
|
|
20
|
+
#endif
|
|
@@ -45,8 +45,11 @@ void Fuzzer::Utils::Fuzz(const uint8_t* data, size_t len)
|
|
|
45
45
|
::Utils::Byte::Set3Bytes(data2, len, uint32_t{ 666u });
|
|
46
46
|
::Utils::Byte::Set4Bytes(data2, len, uint32_t{ 666u });
|
|
47
47
|
::Utils::Byte::Set8Bytes(data2, len, uint64_t{ 6666u });
|
|
48
|
+
::Utils::Byte::PadTo4Bytes(static_cast<uint8_t>(len));
|
|
48
49
|
::Utils::Byte::PadTo4Bytes(static_cast<uint16_t>(len));
|
|
49
50
|
::Utils::Byte::PadTo4Bytes(static_cast<uint32_t>(len));
|
|
51
|
+
::Utils::Byte::PadTo4Bytes(static_cast<uint64_t>(len));
|
|
52
|
+
::Utils::Byte::PadTo4Bytes(len);
|
|
50
53
|
|
|
51
54
|
/* Bits class. */
|
|
52
55
|
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#include "RTC/SCTP/association/FuzzerStateCookie.hpp"
|
|
2
|
+
#include "Utils.hpp"
|
|
3
|
+
#include "RTC/SCTP/association/StateCookie.hpp"
|
|
4
|
+
#include <cstdlib> // std::malloc(), std::free()
|
|
5
|
+
#include <cstring> // std::memcpy()
|
|
6
|
+
|
|
7
|
+
thread_local static uint8_t StateCookieSerializeBuffer[65536];
|
|
8
|
+
thread_local static uint8_t StateCookieCloneBuffer[65536];
|
|
9
|
+
|
|
10
|
+
void Fuzzer::RTC::SCTP::StateCookie::Fuzz(const uint8_t* data, size_t len)
|
|
11
|
+
{
|
|
12
|
+
auto* clonedData = static_cast<uint8_t*>(std::malloc(len));
|
|
13
|
+
|
|
14
|
+
std::memcpy(clonedData, data, len);
|
|
15
|
+
|
|
16
|
+
// We need to force `data` to be a StateCookie since it's too hard that random
|
|
17
|
+
// data matches it.
|
|
18
|
+
if (len > ::RTC::SCTP::StateCookie::StateCookieLength)
|
|
19
|
+
{
|
|
20
|
+
len = ::Utils::Crypto::GetRandomUInt(
|
|
21
|
+
::RTC::SCTP::StateCookie::StateCookieLength, ::RTC::SCTP::StateCookie::StateCookieLength + 10);
|
|
22
|
+
|
|
23
|
+
if (len < ::RTC::SCTP::StateCookie::StateCookieLength + 5)
|
|
24
|
+
{
|
|
25
|
+
::Utils::Byte::Set4Bytes(clonedData, 0, ::RTC::SCTP::StateCookie::MagicValue1);
|
|
26
|
+
::Utils::Byte::Set2Bytes(clonedData, 34, ::RTC::SCTP::StateCookie::MagicValue2);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
::RTC::SCTP::StateCookie* stateCookie = ::RTC::SCTP::StateCookie::Parse(clonedData, len);
|
|
31
|
+
|
|
32
|
+
if (!stateCookie)
|
|
33
|
+
{
|
|
34
|
+
std::free(clonedData);
|
|
35
|
+
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
stateCookie->GetMyVerificationTag();
|
|
40
|
+
stateCookie->GetPeerVerificationTag();
|
|
41
|
+
stateCookie->GetMyInitialTsn();
|
|
42
|
+
stateCookie->GetPeerInitialTsn();
|
|
43
|
+
stateCookie->GetMyAdvertisedReceiverWindowCredit();
|
|
44
|
+
stateCookie->GetTieTag();
|
|
45
|
+
stateCookie->GetNegotiatedCapabilities();
|
|
46
|
+
|
|
47
|
+
stateCookie->Serialize(StateCookieSerializeBuffer, len);
|
|
48
|
+
|
|
49
|
+
stateCookie->GetMyVerificationTag();
|
|
50
|
+
stateCookie->GetPeerVerificationTag();
|
|
51
|
+
stateCookie->GetMyInitialTsn();
|
|
52
|
+
stateCookie->GetPeerInitialTsn();
|
|
53
|
+
stateCookie->GetMyAdvertisedReceiverWindowCredit();
|
|
54
|
+
stateCookie->GetTieTag();
|
|
55
|
+
stateCookie->GetNegotiatedCapabilities();
|
|
56
|
+
|
|
57
|
+
auto* clonedStateCookie = stateCookie->Clone(StateCookieCloneBuffer, len);
|
|
58
|
+
|
|
59
|
+
delete stateCookie;
|
|
60
|
+
|
|
61
|
+
clonedStateCookie->GetMyVerificationTag();
|
|
62
|
+
clonedStateCookie->GetPeerVerificationTag();
|
|
63
|
+
clonedStateCookie->GetMyInitialTsn();
|
|
64
|
+
clonedStateCookie->GetPeerInitialTsn();
|
|
65
|
+
clonedStateCookie->GetMyAdvertisedReceiverWindowCredit();
|
|
66
|
+
clonedStateCookie->GetTieTag();
|
|
67
|
+
clonedStateCookie->GetNegotiatedCapabilities();
|
|
68
|
+
|
|
69
|
+
clonedStateCookie->Serialize(StateCookieSerializeBuffer, len);
|
|
70
|
+
|
|
71
|
+
std::free(clonedData);
|
|
72
|
+
delete clonedStateCookie;
|
|
73
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
#include "RTC/SCTP/packet/FuzzerPacket.hpp"
|
|
2
|
+
#include "RTC/SCTP/packet/Packet.hpp"
|
|
3
|
+
|
|
4
|
+
thread_local static uint8_t PacketSerializeBuffer[65536];
|
|
5
|
+
thread_local static uint8_t PacketCloneBuffer[65536];
|
|
6
|
+
|
|
7
|
+
void Fuzzer::RTC::SCTP::Packet::Fuzz(const uint8_t* data, size_t len)
|
|
8
|
+
{
|
|
9
|
+
::RTC::SCTP::Packet* packet = ::RTC::SCTP::Packet::Parse(data, len);
|
|
10
|
+
|
|
11
|
+
if (!packet)
|
|
12
|
+
{
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
packet->GetSourcePort();
|
|
17
|
+
packet->GetDestinationPort();
|
|
18
|
+
packet->GetVerificationTag();
|
|
19
|
+
packet->GetChecksum();
|
|
20
|
+
packet->ValidateCRC32cChecksum();
|
|
21
|
+
packet->HasChunks();
|
|
22
|
+
packet->GetChunksCount();
|
|
23
|
+
packet->GetChunkAt(0);
|
|
24
|
+
packet->GetChunkAt(1);
|
|
25
|
+
packet->GetChunkAt(2);
|
|
26
|
+
packet->GetChunkAt(666);
|
|
27
|
+
|
|
28
|
+
packet->Serialize(PacketSerializeBuffer, len);
|
|
29
|
+
|
|
30
|
+
packet->GetSourcePort();
|
|
31
|
+
packet->SetSourcePort(12345);
|
|
32
|
+
packet->GetDestinationPort();
|
|
33
|
+
packet->SetDestinationPort(54321);
|
|
34
|
+
packet->GetVerificationTag();
|
|
35
|
+
packet->SetVerificationTag(12345678);
|
|
36
|
+
packet->GetChecksum();
|
|
37
|
+
packet->ValidateCRC32cChecksum();
|
|
38
|
+
packet->SetChecksum(999999);
|
|
39
|
+
packet->SetCRC32cChecksum();
|
|
40
|
+
packet->ValidateCRC32cChecksum();
|
|
41
|
+
packet->HasChunks();
|
|
42
|
+
packet->GetChunksCount();
|
|
43
|
+
packet->GetChunkAt(0);
|
|
44
|
+
packet->GetChunkAt(1);
|
|
45
|
+
packet->GetChunkAt(2);
|
|
46
|
+
packet->GetChunkAt(666);
|
|
47
|
+
|
|
48
|
+
auto* clonedPacket = packet->Clone(PacketCloneBuffer, len);
|
|
49
|
+
|
|
50
|
+
delete packet;
|
|
51
|
+
|
|
52
|
+
clonedPacket->GetSourcePort();
|
|
53
|
+
clonedPacket->SetSourcePort(12345);
|
|
54
|
+
clonedPacket->GetDestinationPort();
|
|
55
|
+
clonedPacket->SetDestinationPort(54321);
|
|
56
|
+
clonedPacket->GetVerificationTag();
|
|
57
|
+
clonedPacket->SetVerificationTag(12345678);
|
|
58
|
+
clonedPacket->GetChecksum();
|
|
59
|
+
clonedPacket->ValidateCRC32cChecksum();
|
|
60
|
+
clonedPacket->SetChecksum(999999);
|
|
61
|
+
clonedPacket->SetCRC32cChecksum();
|
|
62
|
+
clonedPacket->ValidateCRC32cChecksum();
|
|
63
|
+
clonedPacket->HasChunks();
|
|
64
|
+
clonedPacket->GetChunksCount();
|
|
65
|
+
clonedPacket->GetChunkAt(0);
|
|
66
|
+
clonedPacket->GetChunkAt(1);
|
|
67
|
+
clonedPacket->GetChunkAt(2);
|
|
68
|
+
clonedPacket->GetChunkAt(666);
|
|
69
|
+
|
|
70
|
+
clonedPacket->Serialize(PacketSerializeBuffer, len);
|
|
71
|
+
|
|
72
|
+
delete clonedPacket;
|
|
73
|
+
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
#include "DepOpenSSL.hpp"
|
|
7
7
|
#include "DepUsrSCTP.hpp"
|
|
8
8
|
#include "FuzzerUtils.hpp"
|
|
9
|
-
#include "LogLevel.hpp"
|
|
10
9
|
#include "Settings.hpp"
|
|
11
10
|
#include "Utils.hpp"
|
|
12
11
|
#include "RTC/Codecs/FuzzerH264.hpp"
|
|
@@ -24,13 +23,19 @@
|
|
|
24
23
|
#include "RTC/FuzzerStunPacket.hpp"
|
|
25
24
|
#include "RTC/FuzzerTrendCalculator.hpp"
|
|
26
25
|
#include "RTC/RTCP/FuzzerPacket.hpp"
|
|
26
|
+
#include "RTC/SCTP/association/FuzzerStateCookie.hpp"
|
|
27
|
+
#include "RTC/SCTP/packet/FuzzerPacket.hpp"
|
|
27
28
|
#include <cstdlib> // std::getenv()
|
|
28
29
|
#include <iostream>
|
|
30
|
+
#include <sstream> // std::istringstream()
|
|
29
31
|
#include <stddef.h>
|
|
30
32
|
#include <stdint.h>
|
|
33
|
+
#include <string>
|
|
34
|
+
#include <vector>
|
|
31
35
|
|
|
32
36
|
bool fuzzStun = false;
|
|
33
37
|
bool fuzzDtls = false;
|
|
38
|
+
bool fuzzSctp = false;
|
|
34
39
|
bool fuzzRtp = false;
|
|
35
40
|
bool fuzzRtcp = false;
|
|
36
41
|
bool fuzzCodecs = false;
|
|
@@ -58,6 +63,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t len)
|
|
|
58
63
|
Fuzzer::RTC::DtlsTransport::Fuzz(data, len);
|
|
59
64
|
}
|
|
60
65
|
|
|
66
|
+
if (fuzzSctp)
|
|
67
|
+
{
|
|
68
|
+
Fuzzer::RTC::SCTP::Packet::Fuzz(data, len);
|
|
69
|
+
Fuzzer::RTC::SCTP::StateCookie::Fuzz(data, len);
|
|
70
|
+
}
|
|
71
|
+
|
|
61
72
|
if (fuzzRtp)
|
|
62
73
|
{
|
|
63
74
|
Fuzzer::RTC::RtpPacket::Fuzz(data, len);
|
|
@@ -92,25 +103,35 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t len)
|
|
|
92
103
|
|
|
93
104
|
int Init()
|
|
94
105
|
{
|
|
95
|
-
|
|
106
|
+
std::string logLevel{ "none" };
|
|
107
|
+
std::vector<std::string> logTags = { "info" };
|
|
108
|
+
|
|
109
|
+
const auto* logLevelPtr = std::getenv("MS_FUZZ_LOG_LEVEL");
|
|
110
|
+
const auto* logTagsPtr = std::getenv("MS_FUZZ_LOG_TAGS");
|
|
96
111
|
|
|
97
112
|
// Get logLevel from ENV variable.
|
|
98
|
-
if (
|
|
113
|
+
if (logLevelPtr)
|
|
99
114
|
{
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
115
|
+
logLevel = std::string(logLevelPtr);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Get logTags from ENV variable.
|
|
119
|
+
if (logTagsPtr)
|
|
120
|
+
{
|
|
121
|
+
auto logTagsStr = std::string(logTagsPtr);
|
|
122
|
+
std::istringstream iss(logTagsStr);
|
|
123
|
+
std::string logTag;
|
|
124
|
+
|
|
125
|
+
while (iss >> logTag)
|
|
109
126
|
{
|
|
110
|
-
|
|
127
|
+
logTags.push_back(logTag);
|
|
111
128
|
}
|
|
112
129
|
}
|
|
113
130
|
|
|
131
|
+
Settings::SetLogLevel(logLevel);
|
|
132
|
+
Settings::SetLogTags(logTags);
|
|
133
|
+
Settings::PrintConfiguration();
|
|
134
|
+
|
|
114
135
|
// Select what to fuzz.
|
|
115
136
|
|
|
116
137
|
if (std::getenv("MS_FUZZ_STUN") && std::string(std::getenv("MS_FUZZ_STUN")) == "1")
|
|
@@ -119,50 +140,62 @@ int Init()
|
|
|
119
140
|
|
|
120
141
|
fuzzStun = true;
|
|
121
142
|
}
|
|
143
|
+
|
|
122
144
|
if (std::getenv("MS_FUZZ_DTLS") && std::string(std::getenv("MS_FUZZ_DTLS")) == "1")
|
|
123
145
|
{
|
|
124
146
|
std::cout << "[fuzzer] DTLS fuzzer enabled" << std::endl;
|
|
125
147
|
|
|
126
148
|
fuzzDtls = true;
|
|
127
149
|
}
|
|
150
|
+
|
|
151
|
+
if (std::getenv("MS_FUZZ_SCTP") && std::string(std::getenv("MS_FUZZ_SCTP")) == "1")
|
|
152
|
+
{
|
|
153
|
+
std::cout << "[fuzzer] SCTP fuzzer enabled" << std::endl;
|
|
154
|
+
|
|
155
|
+
fuzzSctp = true;
|
|
156
|
+
}
|
|
157
|
+
|
|
128
158
|
if (std::getenv("MS_FUZZ_RTP") && std::string(std::getenv("MS_FUZZ_RTP")) == "1")
|
|
129
159
|
{
|
|
130
160
|
std::cout << "[fuzzer] RTP fuzzer enabled" << std::endl;
|
|
131
161
|
|
|
132
162
|
fuzzRtp = true;
|
|
133
163
|
}
|
|
164
|
+
|
|
134
165
|
if (std::getenv("MS_FUZZ_RTCP") && std::string(std::getenv("MS_FUZZ_RTCP")) == "1")
|
|
135
166
|
{
|
|
136
167
|
std::cout << "[fuzzer] RTCP fuzzer enabled" << std::endl;
|
|
137
168
|
|
|
138
169
|
fuzzRtcp = true;
|
|
139
170
|
}
|
|
171
|
+
|
|
140
172
|
if (std::getenv("MS_FUZZ_CODECS") && std::string(std::getenv("MS_FUZZ_CODECS")) == "1")
|
|
141
173
|
{
|
|
142
174
|
std::cout << "[fuzzer] codecs fuzzer enabled" << std::endl;
|
|
143
175
|
|
|
144
176
|
fuzzCodecs = true;
|
|
145
177
|
}
|
|
178
|
+
|
|
146
179
|
if (std::getenv("MS_FUZZ_UTILS") && std::string(std::getenv("MS_FUZZ_UTILS")) == "1")
|
|
147
180
|
{
|
|
148
181
|
std::cout << "[fuzzer] Utils fuzzer enabled" << std::endl;
|
|
149
182
|
|
|
150
183
|
fuzzUtils = true;
|
|
151
184
|
}
|
|
152
|
-
|
|
185
|
+
|
|
186
|
+
if (!fuzzStun && !fuzzDtls && !fuzzSctp && !fuzzRtp && !fuzzRtcp && !fuzzCodecs && !fuzzUtils)
|
|
153
187
|
{
|
|
154
188
|
std::cout << "[fuzzer] all fuzzers enabled" << std::endl;
|
|
155
189
|
|
|
156
190
|
fuzzStun = true;
|
|
157
191
|
fuzzDtls = true;
|
|
192
|
+
fuzzSctp = true;
|
|
158
193
|
fuzzRtp = true;
|
|
159
194
|
fuzzRtcp = true;
|
|
160
195
|
fuzzCodecs = true;
|
|
161
196
|
fuzzUtils = true;
|
|
162
197
|
}
|
|
163
198
|
|
|
164
|
-
Settings::configuration.logLevel = logLevel;
|
|
165
|
-
|
|
166
199
|
// Initialize static stuff.
|
|
167
200
|
DepLibUV::ClassInit();
|
|
168
201
|
DepOpenSSL::ClassInit();
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* If the macro MS_LOG_STD is defined, all the macros log to stdout/stderr.
|
|
13
13
|
*
|
|
14
|
-
* If the macro MS_LOG_FILE_LINE is
|
|
14
|
+
* If the macro MS_LOG_FILE_LINE is defined, all the logging macros print more
|
|
15
15
|
* verbose information, including current file and line.
|
|
16
16
|
*
|
|
17
17
|
* MS_TRACE()
|
|
@@ -64,9 +64,17 @@
|
|
|
64
64
|
* Example:
|
|
65
65
|
* MS_DUMP("foo");
|
|
66
66
|
*
|
|
67
|
+
* MS_DUMP_CLEAN(indentation, ...)
|
|
68
|
+
*
|
|
69
|
+
* Log always. Useful for Dump() methods in packets. It doesn't print the
|
|
70
|
+
* class and method names.
|
|
71
|
+
* `indentation` mandatory argument must be 0, 1, 2 or 3, and it affects the
|
|
72
|
+
* output by adding indentation at the start of the string.
|
|
73
|
+
*
|
|
67
74
|
* MS_DUMP_DATA(const uint8_t* data, size_t len)
|
|
68
75
|
*
|
|
69
|
-
* Logs always. Prints the given data in hexadecimal format (Wireshark
|
|
76
|
+
* Logs always. Prints the given data in hexadecimal format (Wireshark
|
|
77
|
+
* friendly).
|
|
70
78
|
*
|
|
71
79
|
* MS_ERROR(...)
|
|
72
80
|
*
|
|
@@ -350,15 +358,37 @@ public:
|
|
|
350
358
|
} \
|
|
351
359
|
while (false)
|
|
352
360
|
|
|
361
|
+
#define MS_DUMP_CLEAN(indentation, desc, ...) \
|
|
362
|
+
do \
|
|
363
|
+
{ \
|
|
364
|
+
const char* spaces = (indentation == 1) ? " " : \
|
|
365
|
+
((indentation == 2) ? " " : \
|
|
366
|
+
((indentation == 3) ? " " : "")); \
|
|
367
|
+
const int loggerWritten = std::snprintf(Logger::buffer, Logger::BufferSize, "X%s" desc, spaces, ##__VA_ARGS__); \
|
|
368
|
+
Logger::channel->SendLog(Logger::buffer, static_cast<uint32_t>(loggerWritten)); \
|
|
369
|
+
} \
|
|
370
|
+
while (false)
|
|
371
|
+
|
|
372
|
+
#define MS_DUMP_CLEAN_STD(indentation, desc, ...) \
|
|
373
|
+
do \
|
|
374
|
+
{ \
|
|
375
|
+
const char* spaces = (indentation == 1) ? " " : \
|
|
376
|
+
((indentation == 2) ? " " : \
|
|
377
|
+
((indentation == 3) ? " " : "")); \
|
|
378
|
+
std::fprintf(stdout, "%s" desc _MS_LOG_SEPARATOR_CHAR_STD, spaces, ##__VA_ARGS__); \
|
|
379
|
+
std::fflush(stdout); \
|
|
380
|
+
} \
|
|
381
|
+
while (false)
|
|
382
|
+
|
|
353
383
|
#define MS_DUMP_DATA(data, len) \
|
|
354
384
|
do \
|
|
355
385
|
{ \
|
|
356
|
-
const int loggerWritten = std::snprintf(Logger::buffer, Logger::BufferSize, "X
|
|
386
|
+
const int loggerWritten = std::snprintf(Logger::buffer, Logger::BufferSize, "X" _MS_LOG_STR, _MS_LOG_ARG); \
|
|
357
387
|
Logger::channel->SendLog(Logger::buffer, static_cast<uint32_t>(loggerWritten)); \
|
|
358
388
|
size_t bufferDataLen{ 0 }; \
|
|
359
389
|
for (size_t i{0}; i < len; ++i) \
|
|
360
390
|
{ \
|
|
361
|
-
if (i %
|
|
391
|
+
if (i % 4 == 0) \
|
|
362
392
|
{ \
|
|
363
393
|
if (bufferDataLen != 0) \
|
|
364
394
|
{ \
|
|
@@ -381,11 +411,11 @@ public:
|
|
|
381
411
|
#define MS_DUMP_DATA_STD(data, len) \
|
|
382
412
|
do \
|
|
383
413
|
{ \
|
|
384
|
-
std::fprintf(stdout,
|
|
414
|
+
std::fprintf(stdout, _MS_LOG_STR _MS_LOG_SEPARATOR_CHAR_STD, _MS_LOG_ARG); \
|
|
385
415
|
size_t bufferDataLen{ 0 }; \
|
|
386
416
|
for (size_t i{0}; i < len; ++i) \
|
|
387
417
|
{ \
|
|
388
|
-
if (i %
|
|
418
|
+
if (i % 4 == 0) \
|
|
389
419
|
{ \
|
|
390
420
|
if (bufferDataLen != 0) \
|
|
391
421
|
{ \
|
|
@@ -462,6 +492,8 @@ public:
|
|
|
462
492
|
#define MS_WARN_DEV MS_WARN_DEV_STD
|
|
463
493
|
#undef MS_DUMP
|
|
464
494
|
#define MS_DUMP MS_DUMP_STD
|
|
495
|
+
#undef MS_DUMP_CLEAN
|
|
496
|
+
#define MS_DUMP_CLEAN MS_DUMP_CLEAN_STD
|
|
465
497
|
#undef MS_DUMP_DATA
|
|
466
498
|
#define MS_DUMP_DATA MS_DUMP_DATA_STD
|
|
467
499
|
#undef MS_ERROR
|
|
@@ -15,7 +15,7 @@ namespace RTC
|
|
|
15
15
|
struct PayloadDescriptor : public RTC::Codecs::PayloadDescriptor
|
|
16
16
|
{
|
|
17
17
|
/* Pure virtual methods inherited from RTC::Codecs::PayloadDescriptor. */
|
|
18
|
-
~PayloadDescriptor() = default;
|
|
18
|
+
~PayloadDescriptor() override = default;
|
|
19
19
|
|
|
20
20
|
void Dump() const override;
|
|
21
21
|
|
|
@@ -66,7 +66,7 @@ namespace RTC
|
|
|
66
66
|
{
|
|
67
67
|
public:
|
|
68
68
|
explicit PayloadDescriptorHandler(PayloadDescriptor* payloadDescriptor);
|
|
69
|
-
~PayloadDescriptorHandler() = default;
|
|
69
|
+
~PayloadDescriptorHandler() override = default;
|
|
70
70
|
|
|
71
71
|
public:
|
|
72
72
|
void Dump() const override
|
|
@@ -74,7 +74,16 @@ namespace RTC
|
|
|
74
74
|
this->payloadDescriptor->Dump();
|
|
75
75
|
}
|
|
76
76
|
bool Process(RTC::Codecs::EncodingContext* encodingContext, uint8_t* data, bool& marker) override;
|
|
77
|
-
|
|
77
|
+
std::unique_ptr<RTC::Codecs::PayloadDescriptor::Encoder> GetEncoder() const override
|
|
78
|
+
{
|
|
79
|
+
return nullptr;
|
|
80
|
+
}
|
|
81
|
+
void Encode(uint8_t* data, Codecs::PayloadDescriptor::Encoder* encoder) override
|
|
82
|
+
{
|
|
83
|
+
}
|
|
84
|
+
void Restore(uint8_t* data) override
|
|
85
|
+
{
|
|
86
|
+
}
|
|
78
87
|
uint8_t GetSpatialLayer() const override
|
|
79
88
|
{
|
|
80
89
|
return 0u;
|
|
@@ -15,7 +15,7 @@ namespace RTC
|
|
|
15
15
|
public:
|
|
16
16
|
struct PayloadDescriptor : public RTC::Codecs::PayloadDescriptor
|
|
17
17
|
{
|
|
18
|
-
~PayloadDescriptor() = default;
|
|
18
|
+
~PayloadDescriptor() override = default;
|
|
19
19
|
|
|
20
20
|
void Dump() const override;
|
|
21
21
|
|
|
@@ -80,7 +80,7 @@ namespace RTC
|
|
|
80
80
|
{
|
|
81
81
|
public:
|
|
82
82
|
explicit PayloadDescriptorHandler(PayloadDescriptor* payloadDescriptor);
|
|
83
|
-
~PayloadDescriptorHandler() = default;
|
|
83
|
+
~PayloadDescriptorHandler() override = default;
|
|
84
84
|
|
|
85
85
|
public:
|
|
86
86
|
void Dump() const override
|
|
@@ -88,7 +88,16 @@ namespace RTC
|
|
|
88
88
|
this->payloadDescriptor->Dump();
|
|
89
89
|
}
|
|
90
90
|
bool Process(RTC::Codecs::EncodingContext* encodingContext, uint8_t* data, bool& marker) override;
|
|
91
|
-
|
|
91
|
+
std::unique_ptr<RTC::Codecs::PayloadDescriptor::Encoder> GetEncoder() const override
|
|
92
|
+
{
|
|
93
|
+
return nullptr;
|
|
94
|
+
}
|
|
95
|
+
void Encode(uint8_t* data, Codecs::PayloadDescriptor::Encoder* encoder) override
|
|
96
|
+
{
|
|
97
|
+
}
|
|
98
|
+
void Restore(uint8_t* data) override
|
|
99
|
+
{
|
|
100
|
+
}
|
|
92
101
|
uint8_t GetSpatialLayer() const override
|
|
93
102
|
{
|
|
94
103
|
// return 0u;
|
|
@@ -16,7 +16,7 @@ namespace RTC
|
|
|
16
16
|
struct PayloadDescriptor : public RTC::Codecs::PayloadDescriptor
|
|
17
17
|
{
|
|
18
18
|
/* Pure virtual methods inherited from RTC::Codecs::PayloadDescriptor. */
|
|
19
|
-
~PayloadDescriptor() = default;
|
|
19
|
+
~PayloadDescriptor() override = default;
|
|
20
20
|
|
|
21
21
|
void Dump() const override;
|
|
22
22
|
|
|
@@ -57,7 +57,7 @@ namespace RTC
|
|
|
57
57
|
{
|
|
58
58
|
public:
|
|
59
59
|
explicit PayloadDescriptorHandler(PayloadDescriptor* payloadDescriptor);
|
|
60
|
-
~PayloadDescriptorHandler() = default;
|
|
60
|
+
~PayloadDescriptorHandler() override = default;
|
|
61
61
|
|
|
62
62
|
public:
|
|
63
63
|
void Dump() const override
|
|
@@ -65,10 +65,16 @@ namespace RTC
|
|
|
65
65
|
this->payloadDescriptor->Dump();
|
|
66
66
|
}
|
|
67
67
|
bool Process(RTC::Codecs::EncodingContext* encodingContext, uint8_t* data, bool& marker) override;
|
|
68
|
+
std::unique_ptr<RTC::Codecs::PayloadDescriptor::Encoder> GetEncoder() const override
|
|
69
|
+
{
|
|
70
|
+
return nullptr;
|
|
71
|
+
}
|
|
72
|
+
void Encode(uint8_t* data, Codecs::PayloadDescriptor::Encoder* encoder) override
|
|
73
|
+
{
|
|
74
|
+
}
|
|
68
75
|
void Restore(uint8_t* data) override
|
|
69
76
|
{
|
|
70
|
-
|
|
71
|
-
};
|
|
77
|
+
}
|
|
72
78
|
uint8_t GetSpatialLayer() const override
|
|
73
79
|
{
|
|
74
80
|
return 0u;
|
|
@@ -12,6 +12,11 @@ namespace RTC
|
|
|
12
12
|
// Codec payload descriptor.
|
|
13
13
|
struct PayloadDescriptor
|
|
14
14
|
{
|
|
15
|
+
struct Encoder
|
|
16
|
+
{
|
|
17
|
+
virtual ~Encoder() = default;
|
|
18
|
+
};
|
|
19
|
+
|
|
15
20
|
virtual ~PayloadDescriptor() = default;
|
|
16
21
|
virtual void Dump() const = 0;
|
|
17
22
|
};
|
|
@@ -214,6 +219,8 @@ namespace RTC
|
|
|
214
219
|
public:
|
|
215
220
|
virtual void Dump() const = 0;
|
|
216
221
|
virtual bool Process(RTC::Codecs::EncodingContext* context, uint8_t* data, bool& marker) = 0;
|
|
222
|
+
virtual std::unique_ptr<PayloadDescriptor::Encoder> GetEncoder() const = 0;
|
|
223
|
+
virtual void Encode(uint8_t* data, PayloadDescriptor::Encoder* encoder) = 0;
|
|
217
224
|
virtual void Restore(uint8_t* data) = 0;
|
|
218
225
|
virtual uint8_t GetSpatialLayer() const = 0;
|
|
219
226
|
virtual uint8_t GetTemporalLayer() const = 0;
|