mediasoup 3.20.0 → 3.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) hide show
  1. package/node/lib/Consumer.d.ts.map +1 -1
  2. package/node/lib/Consumer.js +5 -4
  3. package/node/lib/DataConsumer.d.ts +2 -3
  4. package/node/lib/DataConsumer.d.ts.map +1 -1
  5. package/node/lib/DataConsumer.js +10 -7
  6. package/node/lib/DataConsumerTypes.d.ts +5 -4
  7. package/node/lib/DataConsumerTypes.d.ts.map +1 -1
  8. package/node/lib/DataProducer.d.ts.map +1 -1
  9. package/node/lib/DataProducer.js +2 -1
  10. package/node/lib/PipeTransport.d.ts.map +1 -1
  11. package/node/lib/PipeTransport.js +5 -4
  12. package/node/lib/PlainTransport.d.ts.map +1 -1
  13. package/node/lib/PlainTransport.js +6 -5
  14. package/node/lib/Producer.d.ts.map +1 -1
  15. package/node/lib/Producer.js +4 -3
  16. package/node/lib/Router.js +1 -1
  17. package/node/lib/WebRtcTransport.d.ts.map +1 -1
  18. package/node/lib/WebRtcTransport.js +6 -5
  19. package/node/lib/fbs/consumer/degrade-request.d.ts +30 -0
  20. package/node/lib/fbs/consumer/degrade-request.d.ts.map +1 -0
  21. package/node/lib/fbs/consumer/degrade-request.js +124 -0
  22. package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +24 -0
  23. package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +1 -0
  24. package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +102 -0
  25. package/node/lib/fbs/data-consumer/send-response.d.ts +21 -0
  26. package/node/lib/fbs/data-consumer/send-response.d.ts.map +1 -0
  27. package/node/lib/fbs/data-consumer/send-response.js +91 -0
  28. package/node/lib/fbs/data-consumer.d.ts +1 -0
  29. package/node/lib/fbs/data-consumer.d.ts.map +1 -1
  30. package/node/lib/fbs/data-consumer.js +4 -1
  31. package/node/lib/fbs/producer/degrade-request.d.ts +30 -0
  32. package/node/lib/fbs/producer/degrade-request.d.ts.map +1 -0
  33. package/node/lib/fbs/producer/degrade-request.js +124 -0
  34. package/node/lib/fbs/response/body.d.ts +7 -5
  35. package/node/lib/fbs/response/body.d.ts.map +1 -1
  36. package/node/lib/fbs/response/body.js +7 -3
  37. package/node/lib/fbs/response/response.d.ts +3 -2
  38. package/node/lib/fbs/response/response.d.ts.map +1 -1
  39. package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +1 -1
  40. package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +5 -5
  41. package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts +24 -0
  42. package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts.map +1 -0
  43. package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.js +102 -0
  44. package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts +24 -0
  45. package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts.map +1 -0
  46. package/node/lib/fbs/transport/sctp-negotiated-options-notification.js +102 -0
  47. package/node/lib/fbs/worker/close-notification.d.ts +18 -0
  48. package/node/lib/fbs/worker/close-notification.d.ts.map +1 -0
  49. package/node/lib/fbs/worker/close-notification.js +78 -0
  50. package/node/lib/fbs/worker/close-request.d.ts +18 -0
  51. package/node/lib/fbs/worker/close-request.d.ts.map +1 -0
  52. package/node/lib/fbs/worker/close-request.js +78 -0
  53. package/node/lib/fbs/worker/close-worker-notification.d.ts +18 -0
  54. package/node/lib/fbs/worker/close-worker-notification.d.ts.map +1 -0
  55. package/node/lib/fbs/worker/close-worker-notification.js +78 -0
  56. package/node/lib/sctpParametersTypes.d.ts +23 -0
  57. package/node/lib/sctpParametersTypes.d.ts.map +1 -1
  58. package/node/lib/test/test-Consumer.js +194 -0
  59. package/node/lib/test/test-DataConsumer.js +6 -0
  60. package/node/lib/test/test-Router.js +11 -0
  61. package/node/lib/test/test-werift-sctp.js +7 -0
  62. package/npm-scripts.mjs +2 -2
  63. package/package.json +7 -6
  64. package/worker/Makefile +5 -1
  65. package/worker/deps/libwebrtc/meson.build +5 -1
  66. package/worker/fbs/dataConsumer.fbs +4 -0
  67. package/worker/fbs/response.fbs +1 -0
  68. package/worker/fuzzer/src/RTC/RTP/FuzzerPacket.cpp +2 -2
  69. package/worker/include/Channel/ChannelMessageRegistrator.hpp +4 -3
  70. package/worker/include/Channel/ChannelNotification.hpp +0 -4
  71. package/worker/include/Channel/ChannelRequest.hpp +3 -4
  72. package/worker/include/DepLibSRTP.hpp +2 -2
  73. package/worker/include/RTC/ActiveSpeakerObserver.hpp +2 -2
  74. package/worker/include/RTC/AudioLevelObserver.hpp +2 -2
  75. package/worker/include/RTC/Consumer.hpp +1 -1
  76. package/worker/include/RTC/DataConsumer.hpp +2 -2
  77. package/worker/include/RTC/DtlsTransport.hpp +4 -4
  78. package/worker/include/RTC/ICE/IceServer.hpp +2 -2
  79. package/worker/include/RTC/ICE/StunPacket.hpp +34 -34
  80. package/worker/include/RTC/KeyFrameRequestManager.hpp +3 -3
  81. package/worker/include/RTC/Parameters.hpp +2 -2
  82. package/worker/include/RTC/PipeConsumer.hpp +6 -5
  83. package/worker/include/RTC/PlainTransport.hpp +0 -1
  84. package/worker/include/RTC/PortManager.hpp +92 -12
  85. package/worker/include/RTC/Producer.hpp +7 -6
  86. package/worker/include/RTC/RTCP/Feedback.hpp +1 -2
  87. package/worker/include/RTC/RTCP/FeedbackRtpTransport.hpp +2 -2
  88. package/worker/include/RTC/RTCP/Packet.hpp +2 -2
  89. package/worker/include/RTC/RTCP/Sdes.hpp +1 -1
  90. package/worker/include/RTC/RTP/Codecs/DependencyDescriptor.hpp +2 -1
  91. package/worker/include/RTC/RTP/Packet.hpp +57 -57
  92. package/worker/include/RTC/RTP/ProbationGenerator.hpp +2 -2
  93. package/worker/include/RTC/RTP/SharedPacket.hpp +4 -4
  94. package/worker/include/RTC/Router.hpp +12 -11
  95. package/worker/include/RTC/RtcLogger.hpp +2 -2
  96. package/worker/include/RTC/RtpDictionaries.hpp +6 -6
  97. package/worker/include/RTC/RtpListener.hpp +4 -4
  98. package/worker/include/RTC/SCTP/association/Association.hpp +13 -13
  99. package/worker/include/RTC/SCTP/association/HeartbeatHandler.hpp +2 -2
  100. package/worker/include/RTC/SCTP/association/NegotiatedCapabilities.hpp +2 -2
  101. package/worker/include/RTC/SCTP/association/PacketSender.hpp +3 -3
  102. package/worker/include/RTC/SCTP/association/StateCookie.hpp +9 -9
  103. package/worker/include/RTC/SCTP/association/StreamResetHandler.hpp +4 -4
  104. package/worker/include/RTC/SCTP/association/TransmissionControlBlock.hpp +24 -24
  105. package/worker/include/RTC/SCTP/association/TransmissionControlBlockContextInterface.hpp +4 -4
  106. package/worker/include/RTC/SCTP/packet/Chunk.hpp +86 -86
  107. package/worker/include/RTC/SCTP/packet/ErrorCause.hpp +18 -18
  108. package/worker/include/RTC/SCTP/packet/Packet.hpp +33 -33
  109. package/worker/include/RTC/SCTP/packet/Parameter.hpp +24 -24
  110. package/worker/include/RTC/SCTP/packet/TLV.hpp +13 -13
  111. package/worker/include/RTC/SCTP/packet/UserData.hpp +4 -4
  112. package/worker/include/RTC/SCTP/packet/chunks/AbortAssociationChunk.hpp +5 -5
  113. package/worker/include/RTC/SCTP/packet/chunks/AnyDataChunk.hpp +9 -9
  114. package/worker/include/RTC/SCTP/packet/chunks/AnyForwardTsnChunk.hpp +3 -3
  115. package/worker/include/RTC/SCTP/packet/chunks/CookieAckChunk.hpp +5 -5
  116. package/worker/include/RTC/SCTP/packet/chunks/CookieEchoChunk.hpp +5 -5
  117. package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +11 -11
  118. package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +6 -6
  119. package/worker/include/RTC/SCTP/packet/chunks/HeartbeatAckChunk.hpp +6 -6
  120. package/worker/include/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.hpp +6 -6
  121. package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +6 -6
  122. package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +7 -7
  123. package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +10 -10
  124. package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +8 -8
  125. package/worker/include/RTC/SCTP/packet/chunks/OperationErrorChunk.hpp +6 -6
  126. package/worker/include/RTC/SCTP/packet/chunks/ReConfigChunk.hpp +10 -10
  127. package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +5 -5
  128. package/worker/include/RTC/SCTP/packet/chunks/ShutdownAckChunk.hpp +5 -5
  129. package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +5 -5
  130. package/worker/include/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.hpp +5 -5
  131. package/worker/include/RTC/SCTP/packet/chunks/UnknownChunk.hpp +2 -2
  132. package/worker/include/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.hpp +4 -4
  133. package/worker/include/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.hpp +4 -4
  134. package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +5 -5
  135. package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +5 -5
  136. package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +5 -5
  137. package/worker/include/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.hpp +4 -4
  138. package/worker/include/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.hpp +4 -4
  139. package/worker/include/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.hpp +4 -4
  140. package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +5 -5
  141. package/worker/include/RTC/SCTP/packet/errorCauses/UnknownErrorCause.hpp +2 -2
  142. package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.hpp +4 -4
  143. package/worker/include/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.hpp +4 -4
  144. package/worker/include/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.hpp +4 -4
  145. package/worker/include/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.hpp +4 -4
  146. package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +5 -5
  147. package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +5 -5
  148. package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +5 -5
  149. package/worker/include/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.hpp +4 -4
  150. package/worker/include/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.hpp +3 -3
  151. package/worker/include/RTC/SCTP/packet/parameters/IPv4AddressParameter.hpp +4 -4
  152. package/worker/include/RTC/SCTP/packet/parameters/IPv6AddressParameter.hpp +5 -5
  153. package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +5 -5
  154. package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +5 -5
  155. package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +7 -7
  156. package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +5 -5
  157. package/worker/include/RTC/SCTP/packet/parameters/StateCookieParameter.hpp +5 -5
  158. package/worker/include/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.hpp +4 -4
  159. package/worker/include/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.hpp +4 -4
  160. package/worker/include/RTC/SCTP/packet/parameters/UnknownParameter.hpp +2 -2
  161. package/worker/include/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.hpp +4 -4
  162. package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +7 -7
  163. package/worker/include/RTC/SCTP/public/AssociationInterface.hpp +7 -7
  164. package/worker/include/RTC/SCTP/public/AssociationListenerInterface.hpp +26 -26
  165. package/worker/include/RTC/SCTP/public/AssociationMetrics.hpp +7 -7
  166. package/worker/include/RTC/SCTP/public/Message.hpp +1 -1
  167. package/worker/include/RTC/SCTP/public/SctpOptions.hpp +4 -4
  168. package/worker/include/RTC/SCTP/public/SctpTypes.hpp +10 -10
  169. package/worker/include/RTC/SCTP/rx/DataTracker.hpp +1 -1
  170. package/worker/include/RTC/SCTP/rx/ReassemblyStreamsInterface.hpp +1 -1
  171. package/worker/include/RTC/SCTP/tx/OutstandingData.hpp +39 -39
  172. package/worker/include/RTC/SCTP/tx/RetransmissionErrorCounter.hpp +1 -1
  173. package/worker/include/RTC/SCTP/tx/RetransmissionQueue.hpp +14 -14
  174. package/worker/include/RTC/SCTP/tx/RoundRobinSendQueue.hpp +1 -1
  175. package/worker/include/RTC/SctpListener.hpp +2 -2
  176. package/worker/include/RTC/SimulcastConsumer.hpp +2 -1
  177. package/worker/include/RTC/TcpServer.hpp +3 -2
  178. package/worker/include/RTC/Transport.hpp +8 -8
  179. package/worker/include/RTC/UdpSocket.hpp +3 -2
  180. package/worker/include/RTC/WebRtcServer.hpp +4 -5
  181. package/worker/include/RTC/WebRtcTransport.hpp +2 -2
  182. package/worker/include/Settings.hpp +3 -3
  183. package/worker/include/Worker.hpp +3 -3
  184. package/worker/include/handles/TcpServerHandle.hpp +2 -2
  185. package/worker/meson.build +9 -4
  186. package/worker/mocks/include/Channel/MockChannelMessageRegistrator.hpp +4 -3
  187. package/worker/src/Channel/ChannelNotification.cpp +5 -4
  188. package/worker/src/Channel/ChannelRequest.cpp +9 -6
  189. package/worker/src/DepLibSRTP.cpp +1 -1
  190. package/worker/src/RTC/AudioLevelObserver.cpp +2 -2
  191. package/worker/src/RTC/DataConsumer.cpp +13 -3
  192. package/worker/src/RTC/DataProducer.cpp +1 -1
  193. package/worker/src/RTC/DtlsTransport.cpp +3 -3
  194. package/worker/src/RTC/ICE/IceServer.cpp +1 -1
  195. package/worker/src/RTC/ICE/StunPacket.cpp +77 -77
  196. package/worker/src/RTC/PipeTransport.cpp +5 -4
  197. package/worker/src/RTC/PlainTransport.cpp +9 -8
  198. package/worker/src/RTC/PortManager.cpp +174 -114
  199. package/worker/src/RTC/Producer.cpp +0 -1
  200. package/worker/src/RTC/RTCP/Feedback.cpp +6 -6
  201. package/worker/src/RTC/RTCP/FeedbackPs.cpp +1 -1
  202. package/worker/src/RTC/RTCP/FeedbackPsAfb.cpp +1 -1
  203. package/worker/src/RTC/RTCP/FeedbackPsPli.cpp +1 -1
  204. package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +2 -2
  205. package/worker/src/RTC/RTCP/FeedbackRtp.cpp +1 -1
  206. package/worker/src/RTC/RTCP/FeedbackRtpSrReq.cpp +1 -1
  207. package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +2 -2
  208. package/worker/src/RTC/RTCP/Packet.cpp +2 -2
  209. package/worker/src/RTC/RTCP/Sdes.cpp +1 -1
  210. package/worker/src/RTC/RTP/Codecs/DependencyDescriptor.cpp +2 -1
  211. package/worker/src/RTC/RTP/Packet.cpp +68 -68
  212. package/worker/src/RTC/RTP/ProbationGenerator.cpp +3 -3
  213. package/worker/src/RTC/RTP/RtpStreamRecv.cpp +3 -3
  214. package/worker/src/RTC/RTP/RtxStream.cpp +2 -2
  215. package/worker/src/RTC/RTP/SharedPacket.cpp +4 -4
  216. package/worker/src/RTC/Router.cpp +5 -5
  217. package/worker/src/RTC/RtcLogger.cpp +1 -1
  218. package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +4 -4
  219. package/worker/src/RTC/RtpDictionaries/RtpParameters.cpp +2 -3
  220. package/worker/src/RTC/SCTP/association/Association.cpp +100 -97
  221. package/worker/src/RTC/SCTP/association/HeartbeatHandler.cpp +6 -6
  222. package/worker/src/RTC/SCTP/association/NegotiatedCapabilities.cpp +3 -3
  223. package/worker/src/RTC/SCTP/association/PacketSender.cpp +1 -1
  224. package/worker/src/RTC/SCTP/association/StreamResetHandler.cpp +2 -2
  225. package/worker/src/RTC/SCTP/association/TransmissionControlBlock.cpp +5 -5
  226. package/worker/src/RTC/SCTP/packet/Chunk.cpp +52 -52
  227. package/worker/src/RTC/SCTP/packet/ErrorCause.cpp +14 -14
  228. package/worker/src/RTC/SCTP/packet/Packet.cpp +17 -17
  229. package/worker/src/RTC/SCTP/packet/Parameter.cpp +17 -17
  230. package/worker/src/RTC/SCTP/packet/TLV.cpp +8 -8
  231. package/worker/src/RTC/SCTP/packet/chunks/AbortAssociationChunk.cpp +3 -3
  232. package/worker/src/RTC/SCTP/packet/chunks/CookieAckChunk.cpp +2 -2
  233. package/worker/src/RTC/SCTP/packet/chunks/CookieEchoChunk.cpp +1 -1
  234. package/worker/src/RTC/SCTP/packet/chunks/DataChunk.cpp +2 -2
  235. package/worker/src/RTC/SCTP/packet/chunks/ForwardTsnChunk.cpp +2 -2
  236. package/worker/src/RTC/SCTP/packet/chunks/HeartbeatAckChunk.cpp +3 -3
  237. package/worker/src/RTC/SCTP/packet/chunks/HeartbeatRequestChunk.cpp +3 -3
  238. package/worker/src/RTC/SCTP/packet/chunks/IDataChunk.cpp +2 -2
  239. package/worker/src/RTC/SCTP/packet/chunks/IForwardTsnChunk.cpp +2 -2
  240. package/worker/src/RTC/SCTP/packet/chunks/InitAckChunk.cpp +4 -4
  241. package/worker/src/RTC/SCTP/packet/chunks/InitChunk.cpp +4 -4
  242. package/worker/src/RTC/SCTP/packet/chunks/OperationErrorChunk.cpp +3 -3
  243. package/worker/src/RTC/SCTP/packet/chunks/ReConfigChunk.cpp +3 -3
  244. package/worker/src/RTC/SCTP/packet/chunks/SackChunk.cpp +3 -3
  245. package/worker/src/RTC/SCTP/packet/chunks/ShutdownAckChunk.cpp +2 -2
  246. package/worker/src/RTC/SCTP/packet/chunks/ShutdownChunk.cpp +2 -2
  247. package/worker/src/RTC/SCTP/packet/chunks/ShutdownCompleteChunk.cpp +2 -2
  248. package/worker/src/RTC/SCTP/packet/errorCauses/CookieReceivedWhileShuttingDownErrorCause.cpp +2 -2
  249. package/worker/src/RTC/SCTP/packet/errorCauses/InvalidMandatoryParameterErrorCause.cpp +2 -2
  250. package/worker/src/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.cpp +2 -2
  251. package/worker/src/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.cpp +4 -4
  252. package/worker/src/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.cpp +2 -2
  253. package/worker/src/RTC/SCTP/packet/errorCauses/OutOfResourceErrorCause.cpp +2 -2
  254. package/worker/src/RTC/SCTP/packet/errorCauses/ProtocolViolationErrorCause.cpp +1 -1
  255. package/worker/src/RTC/SCTP/packet/errorCauses/RestartOfAnAssociationWithNewAddressesErrorCause.cpp +1 -1
  256. package/worker/src/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.cpp +2 -2
  257. package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedChunkTypeErrorCause.cpp +1 -1
  258. package/worker/src/RTC/SCTP/packet/errorCauses/UnrecognizedParametersErrorCause.cpp +1 -1
  259. package/worker/src/RTC/SCTP/packet/errorCauses/UnresolvableAddressErrorCause.cpp +1 -1
  260. package/worker/src/RTC/SCTP/packet/errorCauses/UserInitiatedAbortErrorCause.cpp +1 -1
  261. package/worker/src/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.cpp +2 -2
  262. package/worker/src/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.cpp +2 -2
  263. package/worker/src/RTC/SCTP/packet/parameters/CookiePreservativeParameter.cpp +2 -2
  264. package/worker/src/RTC/SCTP/packet/parameters/ForwardTsnSupportedParameter.cpp +2 -2
  265. package/worker/src/RTC/SCTP/packet/parameters/HeartbeatInfoParameter.cpp +1 -1
  266. package/worker/src/RTC/SCTP/packet/parameters/IPv4AddressParameter.cpp +2 -2
  267. package/worker/src/RTC/SCTP/packet/parameters/IPv6AddressParameter.cpp +2 -2
  268. package/worker/src/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.cpp +2 -2
  269. package/worker/src/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.cpp +2 -2
  270. package/worker/src/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.cpp +3 -3
  271. package/worker/src/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.cpp +2 -2
  272. package/worker/src/RTC/SCTP/packet/parameters/StateCookieParameter.cpp +3 -3
  273. package/worker/src/RTC/SCTP/packet/parameters/SupportedAddressTypesParameter.cpp +3 -3
  274. package/worker/src/RTC/SCTP/packet/parameters/SupportedExtensionsParameter.cpp +1 -1
  275. package/worker/src/RTC/SCTP/packet/parameters/UnrecognizedParameterParameter.cpp +1 -1
  276. package/worker/src/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.cpp +3 -3
  277. package/worker/src/RTC/SCTP/rx/InterleavedReassemblyStreams.cpp +1 -0
  278. package/worker/src/RTC/SCTP/rx/TraditionalReassemblyStreams.cpp +1 -0
  279. package/worker/src/RTC/SCTP/tx/OutstandingData.cpp +8 -8
  280. package/worker/src/RTC/SCTP/tx/RoundRobinSendQueue.cpp +1 -1
  281. package/worker/src/RTC/SvcConsumer.cpp +6 -2
  282. package/worker/src/RTC/TcpServer.cpp +4 -4
  283. package/worker/src/RTC/Transport.cpp +42 -19
  284. package/worker/src/RTC/UdpSocket.cpp +4 -4
  285. package/worker/src/RTC/WebRtcServer.cpp +8 -8
  286. package/worker/src/RTC/WebRtcTransport.cpp +9 -8
  287. package/worker/src/Settings.cpp +2 -2
  288. package/worker/src/lib.cpp +1 -2
  289. package/worker/subprojects/packagefiles/ankerl-unordered-dense/meson.build +5 -0
  290. package/worker/subprojects/unordered-dense.wrap +9 -0
  291. package/worker/tasks.py +293 -196
  292. package/worker/test/src/RTC/ICE/TestStunPacket.cpp +22 -22
  293. package/worker/test/src/RTC/ICE/iceCommon.cpp +1 -1
  294. package/worker/test/src/RTC/RTCP/TestFeedbackRtpEcn.cpp +8 -8
  295. package/worker/test/src/RTC/RTCP/TestFeedbackRtpNack.cpp +1 -1
  296. package/worker/test/src/RTC/RTCP/TestFeedbackRtpSrReq.cpp +1 -1
  297. package/worker/test/src/RTC/RTCP/TestFeedbackRtpTllei.cpp +1 -1
  298. package/worker/test/src/RTC/RTCP/TestFeedbackRtpTmmb.cpp +1 -1
  299. package/worker/test/src/RTC/RTCP/TestSenderReport.cpp +1 -1
  300. package/worker/test/src/RTC/RTP/TestPacket.cpp +26 -26
  301. package/worker/test/src/RTC/RTP/TestSharedPacket.cpp +1 -1
  302. package/worker/test/src/RTC/RTP/rtpCommon.cpp +1 -1
  303. package/worker/test/src/RTC/SCTP/association/TestNegotiatedCapabilities.cpp +4 -4
  304. package/worker/test/src/RTC/SCTP/packet/TestPacket.cpp +14 -14
  305. package/worker/test/src/RTC/SCTP/packet/chunks/TestAbortAssociationChunk.cpp +4 -4
  306. package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieAckChunk.cpp +1 -1
  307. package/worker/test/src/RTC/SCTP/packet/chunks/TestCookieEchoChunk.cpp +1 -1
  308. package/worker/test/src/RTC/SCTP/packet/chunks/TestForwardTsnChunk.cpp +3 -3
  309. package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatAckChunk.cpp +3 -3
  310. package/worker/test/src/RTC/SCTP/packet/chunks/TestHeartbeatRequestChunk.cpp +9 -9
  311. package/worker/test/src/RTC/SCTP/packet/chunks/TestIDataChunk.cpp +2 -2
  312. package/worker/test/src/RTC/SCTP/packet/chunks/TestIForwardTsnChunk.cpp +3 -3
  313. package/worker/test/src/RTC/SCTP/packet/chunks/TestInitAckChunk.cpp +3 -3
  314. package/worker/test/src/RTC/SCTP/packet/chunks/TestInitChunk.cpp +8 -8
  315. package/worker/test/src/RTC/SCTP/packet/chunks/TestOperationErrorChunk.cpp +7 -7
  316. package/worker/test/src/RTC/SCTP/packet/chunks/TestReConfigChunk.cpp +6 -6
  317. package/worker/test/src/RTC/SCTP/packet/chunks/TestSackChunk.cpp +2 -2
  318. package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownAckChunk.cpp +1 -1
  319. package/worker/test/src/RTC/SCTP/packet/chunks/TestShutdownCompleteChunk.cpp +1 -1
  320. package/worker/test/src/RTC/SCTP/packet/chunks/TestUnknownChunk.cpp +2 -2
  321. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestCookieReceivedWhileShuttingDownErrorCause.cpp +1 -1
  322. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidMandatoryParameterErrorCause.cpp +1 -1
  323. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestInvalidStreamIdentifierErrorCause.cpp +6 -6
  324. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestMissingMandatoryParameterErrorCause.cpp +11 -11
  325. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestNoUserDataErrorCause.cpp +6 -6
  326. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestOutOfResourceErrorCause.cpp +5 -5
  327. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestProtocolViolationErrorCause.cpp +2 -2
  328. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestRestartOfAnAssociationWithNewAddressesErrorCause.cpp +2 -2
  329. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestStaleCookieErrorCause.cpp +6 -6
  330. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnknownErrorCause.cpp +1 -1
  331. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedChunkTypeErrorCause.cpp +2 -2
  332. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnrecognizedParametersErrorCause.cpp +1 -1
  333. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUnresolvableAddressErrorCause.cpp +2 -2
  334. package/worker/test/src/RTC/SCTP/packet/errorCauses/TestUserInitiatedAbortErrorCause.cpp +2 -2
  335. package/worker/test/src/RTC/SCTP/packet/parameters/TestAddIncomingStreamsRequestParameter.cpp +1 -1
  336. package/worker/test/src/RTC/SCTP/packet/parameters/TestAddOutgoingStreamsRequestParameter.cpp +1 -1
  337. package/worker/test/src/RTC/SCTP/packet/parameters/TestCookiePreservativeParameter.cpp +7 -7
  338. package/worker/test/src/RTC/SCTP/packet/parameters/TestForwardTsnSupportedParameter.cpp +1 -1
  339. package/worker/test/src/RTC/SCTP/packet/parameters/TestHeartbeatInfoParameter.cpp +2 -2
  340. package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv4AddressParameter.cpp +7 -7
  341. package/worker/test/src/RTC/SCTP/packet/parameters/TestIPv6AddressParameter.cpp +7 -7
  342. package/worker/test/src/RTC/SCTP/packet/parameters/TestIncomingSsnResetRequestParameter.cpp +2 -2
  343. package/worker/test/src/RTC/SCTP/packet/parameters/TestOutgoingSsnResetRequestParameter.cpp +2 -2
  344. package/worker/test/src/RTC/SCTP/packet/parameters/TestReconfigurationResponseParameter.cpp +5 -5
  345. package/worker/test/src/RTC/SCTP/packet/parameters/TestSsnTsnResetRequestParameter.cpp +1 -1
  346. package/worker/test/src/RTC/SCTP/packet/parameters/TestStateCookieParameter.cpp +1 -1
  347. package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedAddressTypesParameter.cpp +6 -6
  348. package/worker/test/src/RTC/SCTP/packet/parameters/TestSupportedExtensionsParameter.cpp +3 -3
  349. package/worker/test/src/RTC/SCTP/packet/parameters/TestUnknownParameter.cpp +1 -1
  350. package/worker/test/src/RTC/SCTP/packet/parameters/TestUnrecognizedParameterParameter.cpp +1 -1
  351. package/worker/test/src/RTC/SCTP/packet/parameters/TestZeroChecksumAcceptableParameter.cpp +1 -1
  352. package/worker/test/src/RTC/SCTP/sctpCommon.cpp +1 -1
  353. package/worker/test/src/RTC/SCTP/tx/TestOutstandingData.cpp +3 -3
  354. package/worker/test/src/RTC/SCTP/tx/TestRetransmissionQueue.cpp +1 -1
  355. package/worker/test/src/RTC/TestNackGenerator.cpp +1 -1
  356. package/worker/test/src/RTC/TestPortManager.cpp +126 -0
  357. package/worker/test/src/RTC/TestTransportCongestionControlServer.cpp +2 -2
  358. package/worker/test/src/RTC/TestTransportTuple.cpp +3 -2
  359. package/worker/test/src/Utils/TestCrypto.cpp +3 -3
  360. package/worker/test/src/Utils/TestString.cpp +1 -1
@@ -49,7 +49,7 @@ namespace RTC
49
49
 
50
50
  if (!Packet::IsRtp(buffer, packetLength))
51
51
  {
52
- MS_WARN_TAG(rtp, "not a RTP Packet");
52
+ MS_WARN_TAG(rtp, "not a RTP packet");
53
53
 
54
54
  return nullptr;
55
55
  }
@@ -73,7 +73,7 @@ namespace RTC
73
73
 
74
74
  if (!Packet::IsRtp(buffer, bufferLength))
75
75
  {
76
- MS_WARN_TAG(rtp, "not a RTP Packet");
76
+ MS_WARN_TAG(rtp, "not a RTP packet");
77
77
 
78
78
  return nullptr;
79
79
  }
@@ -114,7 +114,7 @@ namespace RTC
114
114
  fixedHeader->ssrc = 0;
115
115
 
116
116
  // No need to invoke SetLength() since constructor invoked it with
117
- // minimum Packet length.
117
+ // minimum packet length.
118
118
 
119
119
  return packet;
120
120
  }
@@ -417,11 +417,11 @@ namespace RTC
417
417
 
418
418
  Serializable::CloneInto(clonedPacket);
419
419
 
420
- // Clone Extension containers.
420
+ // Clone extension containers.
421
421
  clonedPacket->oneByteExtensions = this->oneByteExtensions;
422
422
  clonedPacket->twoBytesExtensions = this->twoBytesExtensions;
423
423
 
424
- // Clone Extension ids.
424
+ // Clone extension ids.
425
425
  clonedPacket->headerExtensionIds = this->headerExtensionIds;
426
426
 
427
427
  // Assign the payload descriptor handler.
@@ -527,7 +527,7 @@ namespace RTC
527
527
  return;
528
528
  }
529
529
 
530
- // Clear One-Byte and Two-Bytes Extensions.
530
+ // Clear One-Byte and Two-Bytes extensions.
531
531
  std::fill(std::begin(this->oneByteExtensions), std::end(this->oneByteExtensions), -1);
532
532
  this->twoBytesExtensions.clear();
533
533
 
@@ -537,11 +537,11 @@ namespace RTC
537
537
  const auto payloadLength = GetPayloadLength();
538
538
  const auto paddingLength = GetPaddingLength();
539
539
 
540
- // Update Packet length.
540
+ // Update packet length.
541
541
  // NOTE: This throws if given length is higher than buffer length.
542
542
  SetLength(GetLength() - headerExtensionLength);
543
543
 
544
- // Unset the Header Extension flag.
544
+ // Unset the header extension flag.
545
545
  GetFixedHeaderPointer()->extension = 0;
546
546
 
547
547
  // Shift the payload.
@@ -552,18 +552,18 @@ namespace RTC
552
552
  {
553
553
  MS_TRACE();
554
554
 
555
- // Clear One-Byte and Two-Bytes Extensions.
555
+ // Clear One-Byte and Two-Bytes extensions.
556
556
  std::fill(std::begin(this->oneByteExtensions), std::end(this->oneByteExtensions), -1);
557
557
  this->twoBytesExtensions.clear();
558
558
 
559
- // Reset Extension ids.
559
+ // Reset extension ids.
560
560
  this->headerExtensionIds = {};
561
561
 
562
562
  const auto hadHeaderExtension = HasHeaderExtension();
563
563
  const auto previousHeaderExtensionValueLength = GetHeaderExtensionValueLength();
564
564
 
565
565
  // If no explicit ExtensionType is given then select the best one based
566
- // on given Extensions.
566
+ // on given extensions.
567
567
  if (type == ExtensionsType::Auto)
568
568
  {
569
569
  uint8_t highestId{ 0 };
@@ -585,19 +585,19 @@ namespace RTC
585
585
  highestLen);
586
586
  }
587
587
 
588
- // If One-Byte is requested and the Packet already has One-Byte Extensions,
589
- // keep the Header Extension id.
588
+ // If One-Byte is requested and the packet already has One-Byte extensions,
589
+ // keep the header extension id.
590
590
  if (type == ExtensionsType::OneByte && HasOneByteExtensions())
591
591
  {
592
592
  // Nothing to do.
593
593
  }
594
- // If Two-Bytes is requested and the Packet already has Two-Bytes Extensions,
595
- // keep the Header Extension id.
594
+ // If Two-Bytes is requested and the packet already has Two-Bytes extensions,
595
+ // keep the header extension id.
596
596
  else if (type == ExtensionsType::TwoBytes && HasTwoBytesExtensions())
597
597
  {
598
598
  // Nothing to do.
599
599
  }
600
- // Otherwise, if there is Header Extension of non matching type, modify its id.
600
+ // Otherwise, if there is header extension of non matching type, modify its id.
601
601
  else if (hadHeaderExtension)
602
602
  {
603
603
  if (type == ExtensionsType::OneByte)
@@ -610,7 +610,7 @@ namespace RTC
610
610
  }
611
611
  }
612
612
 
613
- // Calculate total length required for all Extensions (with padding if needed).
613
+ // Calculate total length required for all extensions (with padding if needed).
614
614
  size_t extensionsLength{ 0 };
615
615
 
616
616
  if (type == ExtensionsType::OneByte)
@@ -619,25 +619,25 @@ namespace RTC
619
619
  {
620
620
  if (extension.id == 0)
621
621
  {
622
- MS_THROW_TYPE_ERROR("invalid Extension with id 0");
622
+ MS_THROW_TYPE_ERROR("invalid extension with id 0");
623
623
  }
624
624
  else if (extension.id > 14)
625
625
  {
626
626
  MS_THROW_TYPE_ERROR(
627
- "invalid Extension with id %" PRIu8 " > 14 when using One-Byte Extensions",
627
+ "invalid extension with id %" PRIu8 " > 14 when using One-Byte extensions",
628
628
  extension.id);
629
629
  }
630
630
  else if (extension.len == 0)
631
631
  {
632
632
  MS_THROW_TYPE_ERROR(
633
- "invalid Extension with id %" PRIu8 " and length 0 when using One-Byte Extensions",
633
+ "invalid extension with id %" PRIu8 " and length 0 when using One-Byte extensions",
634
634
  extension.id);
635
635
  }
636
636
  else if (extension.len > 16)
637
637
  {
638
638
  MS_THROW_TYPE_ERROR(
639
- "invalid Extension with id %" PRIu8 " and length %" PRIu8
640
- " when using One-Byte Extensions",
639
+ "invalid extension with id %" PRIu8 " and length %" PRIu8
640
+ " when using One-Byte extensions",
641
641
  extension.id,
642
642
  extension.len);
643
643
  }
@@ -651,7 +651,7 @@ namespace RTC
651
651
  {
652
652
  if (extension.id == 0)
653
653
  {
654
- MS_THROW_TYPE_ERROR("invalid Extension with id 0");
654
+ MS_THROW_TYPE_ERROR("invalid extension with id 0");
655
655
  }
656
656
 
657
657
  extensionsLength += (2 + extension.len);
@@ -661,8 +661,8 @@ namespace RTC
661
661
  auto paddedExtensionsLength = Utils::Byte::PadTo4Bytes(extensionsLength);
662
662
  const size_t extensionsPaddingLength = paddedExtensionsLength - extensionsLength;
663
663
 
664
- // Calculate the number of bytes to shift (may be negative if the Packet
665
- // already had Header Extension).
664
+ // Calculate the number of bytes to shift (may be negative if the packet
665
+ // already had header extension).
666
666
  int16_t shift{ 0 };
667
667
 
668
668
  if (hadHeaderExtension)
@@ -680,11 +680,11 @@ namespace RTC
680
680
 
681
681
  if (hadHeaderExtension && shift != 0)
682
682
  {
683
- // Update Packet length.
683
+ // Update packet length.
684
684
  // NOTE: This throws if given length is higher than buffer length.
685
685
  SetLength(GetLength() + shift);
686
686
 
687
- // Update the Header Extension length.
687
+ // Update the header extension length.
688
688
  GetHeaderExtensionPointer()->len = htons(paddedExtensionsLength / 4);
689
689
 
690
690
  // Shift the payload.
@@ -692,11 +692,11 @@ namespace RTC
692
692
  }
693
693
  else if (!hadHeaderExtension)
694
694
  {
695
- // Update Packet length.
695
+ // Update packet length.
696
696
  // NOTE: This throws if given length is higher than buffer length.
697
697
  SetLength(GetLength() + shift);
698
698
 
699
- // Set the Header Extension flag.
699
+ // Set the header extension flag.
700
700
  GetFixedHeaderPointer()->extension = 1;
701
701
 
702
702
  auto* headerExtension = GetHeaderExtensionPointer();
@@ -706,7 +706,7 @@ namespace RTC
706
706
  // override written bytes later.
707
707
  std::memmove(payload + shift, payload, payloadLength + paddingLength);
708
708
 
709
- // Set the Header Extension id.
709
+ // Set the header extension id.
710
710
  if (type == ExtensionsType::OneByte)
711
711
  {
712
712
  headerExtension->id = htons(0xBEDE);
@@ -716,7 +716,7 @@ namespace RTC
716
716
  headerExtension->id = htons(0b0001000000000000);
717
717
  }
718
718
 
719
- // Set the Header Extension length.
719
+ // Set the header extension length.
720
720
  headerExtension->len = htons(paddedExtensionsLength / 4);
721
721
  }
722
722
 
@@ -727,7 +727,7 @@ namespace RTC
727
727
  {
728
728
  for (const auto& extension : extensions)
729
729
  {
730
- // Store the One-Byte Extension offset in the array.
730
+ // Store the One-Byte extension offset in the array.
731
731
  // `-1` because we have 14 elements total 0..13 and `id` is in the
732
732
  // range 1..14.
733
733
  this->oneByteExtensions[extension.id - 1] = ptr - extensionsStart;
@@ -742,7 +742,7 @@ namespace RTC
742
742
  {
743
743
  for (const auto& extension : extensions)
744
744
  {
745
- // Store the Two-Bytes Extension offset in the map.
745
+ // Store the Two-Bytes extension offset in the map.
746
746
  this->twoBytesExtensions[extension.id] = ptr - extensionsStart;
747
747
 
748
748
  *ptr = extension.id;
@@ -760,7 +760,7 @@ namespace RTC
760
760
  ++ptr;
761
761
  }
762
762
 
763
- // Assign Extension ids.
763
+ // Assign extension ids.
764
764
  for (const auto& extension : extensions)
765
765
  {
766
766
  switch (extension.type)
@@ -844,7 +844,7 @@ namespace RTC
844
844
  {
845
845
  MS_TRACE();
846
846
 
847
- // Reset Extension ids.
847
+ // Reset extension ids.
848
848
  this->headerExtensionIds = headerExtensionIds;
849
849
  }
850
850
 
@@ -1247,7 +1247,7 @@ namespace RTC
1247
1247
  const auto newLength =
1248
1248
  previousLength - previousPayloadLength - previousPaddingLength + payloadLength;
1249
1249
 
1250
- // Set the new Packet total length.
1250
+ // Set the new packet total length.
1251
1251
  // NOTE: This throws if given length is higher than buffer length.
1252
1252
  SetLength(newLength);
1253
1253
 
@@ -1270,7 +1270,7 @@ namespace RTC
1270
1270
  const auto newLength =
1271
1271
  previousLength - previousPayloadLength - previousPaddingLength + payloadLength;
1272
1272
 
1273
- // Set the new Packet total length.
1273
+ // Set the new packet total length.
1274
1274
  // NOTE: This throws if given length is higher than buffer length.
1275
1275
  SetLength(newLength);
1276
1276
 
@@ -1310,7 +1310,7 @@ namespace RTC
1310
1310
 
1311
1311
  if (delta > 0)
1312
1312
  {
1313
- // Update Packet length.
1313
+ // Update packet length.
1314
1314
  // NOTE: This throws if given length is higher than buffer length.
1315
1315
  SetLength(GetLength() + delta);
1316
1316
 
@@ -1319,7 +1319,7 @@ namespace RTC
1319
1319
  }
1320
1320
  else
1321
1321
  {
1322
- // Update Packet length.
1322
+ // Update packet length.
1323
1323
  // NOTE: This throws if given length is higher than buffer length.
1324
1324
  SetLength(GetLength() - absDelta);
1325
1325
 
@@ -1338,7 +1338,7 @@ namespace RTC
1338
1338
  const auto previousPaddingLength = GetPaddingLength();
1339
1339
  const auto newLength = previousLength - previousPaddingLength + paddingLength;
1340
1340
 
1341
- // Set the new Packet total length.
1341
+ // Set the new packet total length.
1342
1342
  // NOTE: This throws if given length is higher than buffer length.
1343
1343
  SetLength(newLength);
1344
1344
 
@@ -1368,7 +1368,7 @@ namespace RTC
1368
1368
  return;
1369
1369
  }
1370
1370
 
1371
- // Set the new Packet total length.
1371
+ // Set the new packet total length.
1372
1372
  // NOTE: This throws if given length is higher than buffer length.
1373
1373
  SetLength(newPaddedLength);
1374
1374
 
@@ -1397,7 +1397,7 @@ namespace RTC
1397
1397
  SetPaddingLength(0);
1398
1398
  }
1399
1399
 
1400
- // Update Packet length.
1400
+ // Update packet length.
1401
1401
  // NOTE: This throws if given length is higher than buffer length.
1402
1402
  SetLength(GetLength() + 2);
1403
1403
 
@@ -1451,7 +1451,7 @@ namespace RTC
1451
1451
  SetPaddingLength(0);
1452
1452
  }
1453
1453
 
1454
- // Update Packet length.
1454
+ // Update packet length.
1455
1455
  SetLength(GetLength() - 2);
1456
1456
 
1457
1457
  return true;
@@ -1516,12 +1516,12 @@ namespace RTC
1516
1516
  {
1517
1517
  MS_TRACE();
1518
1518
 
1519
- // Here we are at the beginning of the Packet.
1519
+ // Here we are at the beginning of the packet.
1520
1520
  const auto* ptr = const_cast<uint8_t*>(GetBuffer());
1521
1521
 
1522
1522
  if (GetVersion() != 2)
1523
1523
  {
1524
- MS_WARN_TAG(rtp, "invalid Packet, version must be 2");
1524
+ MS_WARN_TAG(rtp, "invalid packet, version must be 2");
1525
1525
 
1526
1526
  return false;
1527
1527
  }
@@ -1535,7 +1535,7 @@ namespace RTC
1535
1535
 
1536
1536
  if (GetLength() < static_cast<size_t>(ptr - GetBuffer()) + csrcsLength)
1537
1537
  {
1538
- MS_WARN_TAG(rtp, "invalid Packet, not enough space for the announced CSRC list");
1538
+ MS_WARN_TAG(rtp, "invalid packet, not enough space for the announced CSRC list");
1539
1539
 
1540
1540
  return false;
1541
1541
  }
@@ -1543,13 +1543,13 @@ namespace RTC
1543
1543
  ptr += csrcsLength;
1544
1544
  }
1545
1545
 
1546
- // Here we are at the beginning of the optional Header Extension.
1546
+ // Here we are at the beginning of the optional header extension.
1547
1547
  if (HasHeaderExtension())
1548
1548
  {
1549
- // The Header Extension is at least 4 bytes.
1549
+ // The header extension is at least 4 bytes.
1550
1550
  if (GetLength() < static_cast<size_t>(ptr - GetBuffer()) + 4)
1551
1551
  {
1552
- MS_WARN_TAG(rtp, "invalid Packet, not enough space for the announced Header Extension");
1552
+ MS_WARN_TAG(rtp, "invalid packet, not enough space for the announced header extension");
1553
1553
 
1554
1554
  return false;
1555
1555
  }
@@ -1559,14 +1559,14 @@ namespace RTC
1559
1559
  if (GetLength() < static_cast<size_t>(ptr - GetBuffer()) + headerExtensionLength)
1560
1560
  {
1561
1561
  MS_WARN_TAG(
1562
- rtp, "invalid Packet, not enough space for the announced Header Extension value");
1562
+ rtp, "invalid packet, not enough space for the announced header extension value");
1563
1563
 
1564
1564
  return false;
1565
1565
  }
1566
1566
 
1567
1567
  if (!ParseExtensions(storeExtensions))
1568
1568
  {
1569
- MS_WARN_TAG(rtp, "invalid Packet, invalid Extensions");
1569
+ MS_WARN_TAG(rtp, "invalid packet, invalid extensions");
1570
1570
 
1571
1571
  return false;
1572
1572
  }
@@ -1581,24 +1581,24 @@ namespace RTC
1581
1581
 
1582
1582
  if (payloadLength + paddingLength != availablePayloadAndPaddingLength)
1583
1583
  {
1584
- MS_WARN_TAG(rtp, "invalid Packet, not enough space for announced padding");
1584
+ MS_WARN_TAG(rtp, "invalid packet, not enough space for announced padding");
1585
1585
 
1586
1586
  return false;
1587
1587
  }
1588
1588
 
1589
1589
  if (HasPadding() && paddingLength == 0)
1590
1590
  {
1591
- MS_WARN_TAG(rtp, "invalid Packet, padding byte cannot be 0");
1591
+ MS_WARN_TAG(rtp, "invalid packet, padding byte cannot be 0");
1592
1592
 
1593
1593
  return false;
1594
1594
  }
1595
1595
 
1596
1596
  ptr += availablePayloadAndPaddingLength;
1597
1597
 
1598
- // Here we are at the end of the Packet.
1598
+ // Here we are at the end of the packet.
1599
1599
  MS_ASSERT(
1600
1600
  static_cast<size_t>(ptr - GetBuffer()) == GetLength(),
1601
- "Packet computed length does not match its assigned length");
1601
+ "packet computed length does not match its assigned length");
1602
1602
 
1603
1603
  return true;
1604
1604
  }
@@ -1613,12 +1613,12 @@ namespace RTC
1613
1613
  const uint8_t* extensionsEnd = extensionsStart + GetHeaderExtensionValueLength();
1614
1614
  auto* ptr = const_cast<uint8_t*>(extensionsStart);
1615
1615
 
1616
- // One-Byte Extensions cannot have length 0.
1616
+ // One-Byte extensions cannot have length 0.
1617
1617
  while (ptr < extensionsEnd)
1618
1618
  {
1619
1619
  const auto* extension = reinterpret_cast<OneByteExtension*>(ptr);
1620
1620
  const uint8_t id = extension->id;
1621
- // NOTE: In One-Byte Extensions, announced value must be incremented
1621
+ // NOTE: In One-Byte extensions, announced value must be incremented
1622
1622
  // by 1.
1623
1623
  const size_t len = extension->len + 1;
1624
1624
 
@@ -1632,14 +1632,14 @@ namespace RTC
1632
1632
  {
1633
1633
  break;
1634
1634
  }
1635
- // Valid Extension id.
1635
+ // Valid extension id.
1636
1636
  else
1637
1637
  {
1638
1638
  if (ptr + 1 + len > extensionsEnd)
1639
1639
  {
1640
1640
  MS_WARN_TAG(
1641
1641
  rtp,
1642
- "not enough space for the announced value of the One-Byte Extension with id %" PRIu8,
1642
+ "not enough space for the announced value of the One-Byte extension with id %" PRIu8,
1643
1643
  id);
1644
1644
 
1645
1645
  return false;
@@ -1647,7 +1647,7 @@ namespace RTC
1647
1647
 
1648
1648
  if (storeExtensions)
1649
1649
  {
1650
- // Store the One-Byte Extension offset in the array.
1650
+ // Store the One-Byte extension offset in the array.
1651
1651
  // `-1` because we have 14 elements total 0..13 and `id` is in the
1652
1652
  // range 1..14.
1653
1653
  this->oneByteExtensions[id - 1] = ptr - extensionsStart;
@@ -1669,11 +1669,11 @@ namespace RTC
1669
1669
  {
1670
1670
  const uint8_t* extensionsStart = GetHeaderExtensionValue();
1671
1671
  const uint8_t* extensionsEnd = extensionsStart + GetHeaderExtensionValueLength();
1672
- // ptr points to the Extension id field (1 byte).
1672
+ // ptr points to the extension id field (1 byte).
1673
1673
  // ptr+1 points to the length field (1 byte, can have value 0).
1674
1674
  auto* ptr = const_cast<uint8_t*>(extensionsStart);
1675
1675
 
1676
- // Two-Byte Extensions can have length 0.
1676
+ // Two-Byte extensions can have length 0.
1677
1677
  while (ptr + 1 < extensionsEnd)
1678
1678
  {
1679
1679
  const auto* extension = reinterpret_cast<TwoBytesExtension*>(ptr);
@@ -1685,14 +1685,14 @@ namespace RTC
1685
1685
  {
1686
1686
  ++ptr;
1687
1687
  }
1688
- // Valid Extension id.
1688
+ // Valid extension id.
1689
1689
  else
1690
1690
  {
1691
1691
  if (ptr + 2 + len > extensionsEnd)
1692
1692
  {
1693
1693
  MS_WARN_TAG(
1694
1694
  rtp,
1695
- "not enough space for the announced value of the Two-Bytes Extension with id %" PRIu8,
1695
+ "not enough space for the announced value of the Two-Bytes extension with id %" PRIu8,
1696
1696
  id);
1697
1697
 
1698
1698
  return false;
@@ -1700,7 +1700,7 @@ namespace RTC
1700
1700
 
1701
1701
  if (storeExtensions)
1702
1702
  {
1703
- // Store the Two-Bytes Extension offset in the map.
1703
+ // Store the Two-Bytes extension offset in the map.
1704
1704
  this->twoBytesExtensions[id] = ptr - extensionsStart;
1705
1705
  }
1706
1706
 
@@ -1716,8 +1716,8 @@ namespace RTC
1716
1716
 
1717
1717
  return true;
1718
1718
  }
1719
- // If there is no Header Extension of if there is but it doesn't conform
1720
- // to RFC 8285 Extensions, then this is ok.
1719
+ // If there is no header extension of if there is but it doesn't conform
1720
+ // to RFC 8285 extensions, then this is ok.
1721
1721
  else
1722
1722
  {
1723
1723
  return true;
@@ -1740,7 +1740,7 @@ namespace RTC
1740
1740
 
1741
1741
  auto* extension = reinterpret_cast<OneByteExtension*>(GetHeaderExtensionValue() + offset);
1742
1742
 
1743
- // In One-Byte Extensions value length 0 means 1.
1743
+ // In One-Byte extensions value length 0 means 1.
1744
1744
  const auto currentLen = extension->len + 1;
1745
1745
 
1746
1746
  // Fill with 0's if new length is minor.
@@ -37,7 +37,7 @@ namespace RTC
37
37
  mustInitializePayload = false;
38
38
  }
39
39
 
40
- // Create the probation RTP Packet.
40
+ // Create the probation RTP packet.
41
41
  this->probationPacket.reset(
42
42
  RTP::Packet::Factory(ProbationPacketBuffer, sizeof(ProbationPacketBuffer)));
43
43
 
@@ -102,7 +102,7 @@ namespace RTC
102
102
  // bufferPtr += extenLen;
103
103
  }
104
104
 
105
- // Set the extensions into the Packet using One-Byte format.
105
+ // Set the extensions into the packet using One-Byte format.
106
106
  this->probationPacket->SetExtensions(RTP::Packet::ExtensionsType::OneByte, extensions);
107
107
 
108
108
  this->probationPacketMinLength = this->probationPacket->GetLength();
@@ -125,7 +125,7 @@ namespace RTC
125
125
  // Pad given length to 4 bytes.
126
126
  len = Utils::Byte::PadTo4Bytes(len);
127
127
 
128
- // Make the Packet length fit into our available limits.
128
+ // Make the packet length fit into our available limits.
129
129
  if (len > ProbationGenerator::ProbationPacketMaxLength)
130
130
  {
131
131
  len = ProbationGenerator::ProbationPacketMaxLength;
@@ -296,7 +296,7 @@ namespace RTC
296
296
  }
297
297
  }
298
298
 
299
- // Calculate Jitter.
299
+ // Calculate jitter.
300
300
  CalculateJitter(packet->GetTimestamp());
301
301
 
302
302
  // Increase transmission counter.
@@ -472,7 +472,7 @@ namespace RTC
472
472
 
473
473
  const int32_t prevPacketsLost = this->packetsLost;
474
474
 
475
- // Calculate Packets Expected and Lost.
475
+ // Calculate packets expected and lost.
476
476
  auto expected = GetExpectedPackets();
477
477
 
478
478
  if (expected > this->mediaTransmissionCounter.GetPacketCount())
@@ -484,7 +484,7 @@ namespace RTC
484
484
  this->packetsLost = 0;
485
485
  }
486
486
 
487
- // Calculate Fraction Lost.
487
+ // Calculate fraction lost.
488
488
  const uint32_t expectedInterval = expected - this->expectedPrior;
489
489
 
490
490
  this->expectedPrior = expected;
@@ -95,7 +95,7 @@ namespace RTC
95
95
 
96
96
  const int32_t prevPacketsLost = this->packetsLost;
97
97
 
98
- // Calculate Packets Expected and Lost.
98
+ // Calculate packets xxpected and lost.
99
99
  auto expected = GetExpectedPackets();
100
100
 
101
101
  if (expected > this->packetsCount)
@@ -107,7 +107,7 @@ namespace RTC
107
107
  this->packetsLost = 0u;
108
108
  }
109
109
 
110
- // Calculate Fraction Lost.
110
+ // Calculate fraction lost.
111
111
  const uint32_t expectedInterval = expected - this->expectedPrior;
112
112
 
113
113
  this->expectedPrior = expected;
@@ -13,10 +13,10 @@ namespace RTC
13
13
  /* Static. */
14
14
 
15
15
  // When cloning a RTP packet, a buffer is allocated for it and its length is
16
- // the length of the Packet plus this value (in bytes).
16
+ // the length of the packet plus this value (in bytes).
17
17
  static constexpr size_t PacketBufferLengthIncrement{ 100 };
18
- // Callback to pass to every cloned RTP Packet to deallocate its buffer once
19
- // the Packet releases its buffer (for example when the Packet is destroyed).
18
+ // Callback to pass to every cloned RTP packet to deallocate its buffer once
19
+ // the packet releases its buffer (for example when the packet is destroyed).
20
20
  static thread_local Serializable::BufferReleasedListener PacketBufferReleasedListener =
21
21
  // NOLINTNEXTLINE(misc-unused-parameters, readability-non-const-parameter)
22
22
  [](const Serializable* packet, uint8_t* buffer)
@@ -156,7 +156,7 @@ namespace RTC
156
156
  auto* buffer = static_cast<uint8_t*>(::operator new[](bufferLength, std::align_val_t{ 4 }));
157
157
  auto* clonedPacket = packet->Clone(buffer, bufferLength);
158
158
 
159
- // Set a listener in the Packet to deallocate its buffer once the Packet
159
+ // Set a listener in the packet to deallocate its buffer once the packet
160
160
  // is destroyed or releases its internal buffer.
161
161
  clonedPacket->SetBufferReleasedListener(std::addressof(PacketBufferReleasedListener));
162
162
 
@@ -427,7 +427,7 @@ namespace RTC
427
427
  {
428
428
  auto& rtpObservers = kv.second;
429
429
 
430
- rtpObservers.erase(rtpObserver);
430
+ rtpObservers.erase(const_cast<RTC::RtpObserver*>(rtpObserver));
431
431
  }
432
432
 
433
433
  MS_DEBUG_DEV("RtpObserver closed [rtpObserverId:%s]", rtpObserver->id.c_str());
@@ -955,7 +955,7 @@ namespace RTC
955
955
 
956
956
  if (numDataConsumers == 1)
957
957
  {
958
- // We must update the Message`s `streamId` for each destination
958
+ // We must update the message`s `streamId` for each destination
959
959
  // DataConsumer.
960
960
  // NOTE: clang-tidy doesn't understand that we are only doing this
961
961
  // once in the original `message`.
@@ -964,14 +964,14 @@ namespace RTC
964
964
 
965
965
  dataConsumer->SendMessage(std::move(message), subchannels, requiredSubchannel);
966
966
  }
967
- // NOTE: Here we are cloning the Message before passing it to each
967
+ // NOTE: Here we are cloning the message before passing it to each
968
968
  // DataConsumer because each DataConsumer will pass std::move(message)
969
- // internally to its SCTP Association.
969
+ // internally to its SCTP association.
970
970
  else
971
971
  {
972
972
  auto clonedMessage = message.Clone();
973
973
 
974
- // We must update the Message`s `streamId` for each destination
974
+ // We must update the message`s `streamId` for each destination
975
975
  // DataConsumer.
976
976
  clonedMessage.SetStreamId(streamId);
977
977
 
@@ -10,7 +10,7 @@ namespace RTC
10
10
  namespace RtcLogger
11
11
  {
12
12
  // clang-format off
13
- const absl::flat_hash_map<RtpPacket::DiscardReason, std::string> RtpPacket::DiscardReason2String = {
13
+ const ankerl::unordered_dense::map<RtpPacket::DiscardReason, std::string> RtpPacket::DiscardReason2String = {
14
14
  { RtpPacket::DiscardReason::NONE, "None" },
15
15
  { RtpPacket::DiscardReason::PRODUCER_NOT_FOUND, "ProducerNotFound" },
16
16
  { RtpPacket::DiscardReason::RECV_RTP_STREAM_NOT_FOUND, "RecvRtpStreamNotFound" },
@@ -11,17 +11,17 @@ namespace RTC
11
11
  /* Class variables. */
12
12
 
13
13
  // clang-format off
14
- const absl::flat_hash_map<std::string, RtpCodecMimeType::Type> RtpCodecMimeType::String2Type =
14
+ const ankerl::unordered_dense::map<std::string, RtpCodecMimeType::Type> RtpCodecMimeType::String2Type =
15
15
  {
16
16
  { "audio", RtpCodecMimeType::Type::AUDIO },
17
17
  { "video", RtpCodecMimeType::Type::VIDEO }
18
18
  };
19
- const absl::flat_hash_map<RtpCodecMimeType::Type, std::string> RtpCodecMimeType::Type2String =
19
+ const ankerl::unordered_dense::map<RtpCodecMimeType::Type, std::string> RtpCodecMimeType::Type2String =
20
20
  {
21
21
  { RtpCodecMimeType::Type::AUDIO, "audio" },
22
22
  { RtpCodecMimeType::Type::VIDEO, "video" }
23
23
  };
24
- const absl::flat_hash_map<std::string, RtpCodecMimeType::Subtype> RtpCodecMimeType::String2Subtype =
24
+ const ankerl::unordered_dense::map<std::string, RtpCodecMimeType::Subtype> RtpCodecMimeType::String2Subtype =
25
25
  {
26
26
  // Audio codecs:
27
27
  { "opus", RtpCodecMimeType::Subtype::OPUS },
@@ -47,7 +47,7 @@ namespace RTC
47
47
  { "x-ulpfecuc", RtpCodecMimeType::Subtype::X_ULPFECUC },
48
48
  { "red", RtpCodecMimeType::Subtype::RED }
49
49
  };
50
- const absl::flat_hash_map<RtpCodecMimeType::Subtype, std::string> RtpCodecMimeType::Subtype2String =
50
+ const ankerl::unordered_dense::map<RtpCodecMimeType::Subtype, std::string> RtpCodecMimeType::Subtype2String =
51
51
  {
52
52
  // Audio codecs:
53
53
  { RtpCodecMimeType::Subtype::OPUS, "opus" },