mediasoup 3.20.6 → 3.20.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.
Files changed (168) hide show
  1. package/node/lib/fbs/data-consumer/binary.d.ts +25 -0
  2. package/node/lib/fbs/data-consumer/binary.d.ts.map +1 -0
  3. package/node/lib/fbs/data-consumer/binary.js +110 -0
  4. package/node/lib/fbs/data-consumer/data.d.ts +10 -0
  5. package/node/lib/fbs/data-consumer/data.d.ts.map +1 -0
  6. package/node/lib/fbs/data-consumer/data.js +30 -0
  7. package/node/lib/fbs/data-consumer/string.d.ts +22 -0
  8. package/node/lib/fbs/data-consumer/string.d.ts.map +1 -0
  9. package/node/lib/fbs/{worker/close-notification.js → data-consumer/string.js} +34 -20
  10. package/node/lib/fbs/data-producer/binary.d.ts +25 -0
  11. package/node/lib/fbs/data-producer/binary.d.ts.map +1 -0
  12. package/node/lib/fbs/data-producer/binary.js +110 -0
  13. package/node/lib/fbs/data-producer/data.d.ts +10 -0
  14. package/node/lib/fbs/data-producer/data.d.ts.map +1 -0
  15. package/node/lib/fbs/data-producer/data.js +30 -0
  16. package/node/lib/fbs/data-producer/string.d.ts +22 -0
  17. package/node/lib/fbs/data-producer/string.d.ts.map +1 -0
  18. package/node/lib/fbs/data-producer/string.js +92 -0
  19. package/node/lib/fbs/message/type.d.ts +7 -0
  20. package/node/lib/fbs/message/type.d.ts.map +1 -0
  21. package/node/lib/fbs/message/type.js +11 -0
  22. package/node/lib/fbs/message-from-worker/body.d.ts +12 -0
  23. package/node/lib/fbs/message-from-worker/body.d.ts.map +1 -0
  24. package/node/lib/fbs/message-from-worker/body.js +34 -0
  25. package/node/lib/fbs/message-from-worker/message.d.ts +30 -0
  26. package/node/lib/fbs/message-from-worker/message.d.ts.map +1 -0
  27. package/node/lib/fbs/message-from-worker/message.js +122 -0
  28. package/node/lib/fbs/message-from-worker.d.ts +3 -0
  29. package/node/lib/fbs/message-from-worker.d.ts.map +1 -0
  30. package/node/lib/fbs/message-from-worker.js +9 -0
  31. package/node/lib/fbs/message-to-worker/body.d.ts +10 -0
  32. package/node/lib/fbs/message-to-worker/body.d.ts.map +1 -0
  33. package/node/lib/fbs/message-to-worker/body.js +30 -0
  34. package/node/lib/fbs/message-to-worker/message.d.ts +29 -0
  35. package/node/lib/fbs/message-to-worker/message.d.ts.map +1 -0
  36. package/node/lib/fbs/message-to-worker/message.js +122 -0
  37. package/node/lib/fbs/message-to-worker.d.ts +3 -0
  38. package/node/lib/fbs/message-to-worker.d.ts.map +1 -0
  39. package/node/lib/fbs/message-to-worker.js +9 -0
  40. package/node/lib/fbs/notification-from-worker/body.d.ts +44 -0
  41. package/node/lib/fbs/notification-from-worker/body.d.ts.map +1 -0
  42. package/node/lib/fbs/notification-from-worker/body.js +98 -0
  43. package/node/lib/fbs/notification-from-worker/event.d.ts +31 -0
  44. package/node/lib/fbs/notification-from-worker/event.d.ts.map +1 -0
  45. package/node/lib/fbs/notification-from-worker/event.js +35 -0
  46. package/node/lib/fbs/notification-from-worker/notification.d.ts +52 -0
  47. package/node/lib/fbs/notification-from-worker/notification.d.ts.map +1 -0
  48. package/node/lib/fbs/notification-from-worker/notification.js +140 -0
  49. package/node/lib/fbs/notification-from-worker.d.ts +4 -0
  50. package/node/lib/fbs/notification-from-worker.d.ts.map +1 -0
  51. package/node/lib/fbs/notification-from-worker.js +11 -0
  52. package/node/lib/fbs/notification-to-worker/body.d.ts +12 -0
  53. package/node/lib/fbs/notification-to-worker/body.d.ts.map +1 -0
  54. package/node/lib/fbs/notification-to-worker/body.js +34 -0
  55. package/node/lib/fbs/notification-to-worker/event.d.ts +6 -0
  56. package/node/lib/fbs/notification-to-worker/event.d.ts.map +1 -0
  57. package/node/lib/fbs/notification-to-worker/event.js +10 -0
  58. package/node/lib/fbs/notification-to-worker/notification.d.ts +36 -0
  59. package/node/lib/fbs/notification-to-worker/notification.d.ts.map +1 -0
  60. package/node/lib/fbs/notification-to-worker/notification.js +140 -0
  61. package/node/lib/fbs/notification-to-worker.d.ts +4 -0
  62. package/node/lib/fbs/notification-to-worker.d.ts.map +1 -0
  63. package/node/lib/fbs/notification-to-worker.js +11 -0
  64. package/node/lib/fbs/sctp-parameters/num-sctp-streams.d.ts.map +1 -1
  65. package/node/lib/fbs/sctp-parameters/num-sctp-streams.js +5 -5
  66. package/node/lib/fbs/trace-events/fir-trace-info.d.ts +21 -0
  67. package/node/lib/fbs/trace-events/fir-trace-info.d.ts.map +1 -0
  68. package/node/lib/fbs/{worker/close-request.js → trace-events/fir-trace-info.js} +32 -20
  69. package/node/lib/fbs/trace-events/key-frame-trace-info.d.ts +25 -0
  70. package/node/lib/fbs/trace-events/key-frame-trace-info.d.ts.map +1 -0
  71. package/node/lib/fbs/trace-events/key-frame-trace-info.js +104 -0
  72. package/node/lib/fbs/trace-events/pli-trace-info.d.ts +21 -0
  73. package/node/lib/fbs/trace-events/pli-trace-info.d.ts.map +1 -0
  74. package/node/lib/fbs/{worker/close-worker-notification.js → trace-events/pli-trace-info.js} +32 -20
  75. package/node/lib/fbs/trace-events/rtp-trace-info.d.ts +25 -0
  76. package/node/lib/fbs/trace-events/rtp-trace-info.d.ts.map +1 -0
  77. package/node/lib/fbs/{consumer/enable-delay-and-loss-request.js → trace-events/rtp-trace-info.js} +35 -33
  78. package/node/lib/fbs/trace-events/trace-event-type.d.ts +8 -0
  79. package/node/lib/fbs/trace-events/trace-event-type.d.ts.map +1 -0
  80. package/node/lib/fbs/trace-events/trace-event-type.js +12 -0
  81. package/node/lib/fbs/trace-events/trace-info.d.ts +14 -0
  82. package/node/lib/fbs/trace-events/trace-info.d.ts.map +1 -0
  83. package/node/lib/fbs/trace-events/trace-info.js +38 -0
  84. package/node/lib/fbs/trace-events.d.ts +7 -0
  85. package/node/lib/fbs/trace-events.d.ts.map +1 -0
  86. package/node/lib/fbs/trace-events.js +20 -0
  87. package/npm-scripts.mjs +13 -8
  88. package/package.json +6 -6
  89. package/worker/fbs/meson.build +0 -1
  90. package/worker/fbs/plainTransport.fbs +1 -1
  91. package/worker/fbs/worker.fbs +0 -2
  92. package/worker/include/RTC/ICE/StunPacket.hpp +8 -9
  93. package/worker/include/RTC/RTP/Packet.hpp +1 -1
  94. package/worker/include/RTC/RTP/ProbationGenerator.hpp +1 -1
  95. package/worker/include/RTC/SCTP/packet/Chunk.hpp +1 -1
  96. package/worker/include/RTC/SCTP/packet/ErrorCause.hpp +1 -1
  97. package/worker/include/RTC/SCTP/packet/Packet.hpp +1 -2
  98. package/worker/include/RTC/SCTP/packet/Parameter.hpp +1 -1
  99. package/worker/include/RTC/SCTP/packet/TLV.hpp +1 -1
  100. package/worker/include/RTC/SCTP/packet/chunks/DataChunk.hpp +1 -1
  101. package/worker/include/RTC/SCTP/packet/chunks/ForwardTsnChunk.hpp +1 -1
  102. package/worker/include/RTC/SCTP/packet/chunks/IDataChunk.hpp +1 -1
  103. package/worker/include/RTC/SCTP/packet/chunks/IForwardTsnChunk.hpp +1 -1
  104. package/worker/include/RTC/SCTP/packet/chunks/InitAckChunk.hpp +1 -1
  105. package/worker/include/RTC/SCTP/packet/chunks/InitChunk.hpp +1 -1
  106. package/worker/include/RTC/SCTP/packet/chunks/SackChunk.hpp +1 -1
  107. package/worker/include/RTC/SCTP/packet/chunks/ShutdownChunk.hpp +1 -1
  108. package/worker/include/RTC/SCTP/packet/errorCauses/InvalidStreamIdentifierErrorCause.hpp +1 -1
  109. package/worker/include/RTC/SCTP/packet/errorCauses/MissingMandatoryParameterErrorCause.hpp +1 -1
  110. package/worker/include/RTC/SCTP/packet/errorCauses/NoUserDataErrorCause.hpp +1 -1
  111. package/worker/include/RTC/SCTP/packet/errorCauses/StaleCookieErrorCause.hpp +1 -1
  112. package/worker/include/RTC/SCTP/packet/parameters/AddIncomingStreamsRequestParameter.hpp +1 -1
  113. package/worker/include/RTC/SCTP/packet/parameters/AddOutgoingStreamsRequestParameter.hpp +1 -1
  114. package/worker/include/RTC/SCTP/packet/parameters/CookiePreservativeParameter.hpp +1 -1
  115. package/worker/include/RTC/SCTP/packet/parameters/IPv4AddressParameter.hpp +1 -1
  116. package/worker/include/RTC/SCTP/packet/parameters/IPv6AddressParameter.hpp +1 -1
  117. package/worker/include/RTC/SCTP/packet/parameters/IncomingSsnResetRequestParameter.hpp +1 -1
  118. package/worker/include/RTC/SCTP/packet/parameters/OutgoingSsnResetRequestParameter.hpp +1 -1
  119. package/worker/include/RTC/SCTP/packet/parameters/ReconfigurationResponseParameter.hpp +2 -2
  120. package/worker/include/RTC/SCTP/packet/parameters/SsnTsnResetRequestParameter.hpp +1 -1
  121. package/worker/include/RTC/SCTP/packet/parameters/ZeroChecksumAcceptableParameter.hpp +1 -1
  122. package/worker/include/Settings.hpp +0 -1
  123. package/worker/include/handles/TcpConnectionHandle.hpp +0 -4
  124. package/worker/include/handles/UdpSocketHandle.hpp +0 -4
  125. package/worker/meson.build +0 -34
  126. package/worker/meson_options.txt +0 -1
  127. package/worker/src/RTC/PipeTransport.cpp +5 -5
  128. package/worker/src/RTC/PlainTransport.cpp +5 -5
  129. package/worker/src/RTC/RTP/Packet.cpp +0 -2
  130. package/worker/src/RTC/RTP/RtpStreamSend.cpp +0 -20
  131. package/worker/src/RTC/Router.cpp +0 -37
  132. package/worker/src/RTC/SCTP/association/Association.cpp +12 -7
  133. package/worker/src/RTC/SimpleProducerStreamManager.cpp +6 -3
  134. package/worker/src/RTC/SimulcastProducerStreamManager.cpp +2 -2
  135. package/worker/src/RTC/SrtpSession.cpp +0 -24
  136. package/worker/src/RTC/Transport.cpp +3 -22
  137. package/worker/src/RTC/WebRtcTransport.cpp +5 -5
  138. package/worker/src/Settings.cpp +0 -14
  139. package/worker/src/Utils/Crypto.cpp +3 -3
  140. package/worker/src/Utils/String.cpp +1 -1
  141. package/worker/src/Worker.cpp +5 -38
  142. package/worker/src/handles/TcpConnectionHandle.cpp +1 -42
  143. package/worker/src/handles/UdpSocketHandle.cpp +1 -42
  144. package/worker/src/lib.cpp +1 -10
  145. package/node/lib/fbs/consumer/degrade-request.d.ts +0 -30
  146. package/node/lib/fbs/consumer/degrade-request.d.ts.map +0 -1
  147. package/node/lib/fbs/consumer/degrade-request.js +0 -124
  148. package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +0 -24
  149. package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +0 -1
  150. package/node/lib/fbs/producer/degrade-request.d.ts +0 -30
  151. package/node/lib/fbs/producer/degrade-request.d.ts.map +0 -1
  152. package/node/lib/fbs/producer/degrade-request.js +0 -124
  153. package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts +0 -24
  154. package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.d.ts.map +0 -1
  155. package/node/lib/fbs/transport/sctp-negotiated-max-streams-notification.js +0 -102
  156. package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts +0 -24
  157. package/node/lib/fbs/transport/sctp-negotiated-options-notification.d.ts.map +0 -1
  158. package/node/lib/fbs/transport/sctp-negotiated-options-notification.js +0 -102
  159. package/node/lib/fbs/worker/close-notification.d.ts +0 -18
  160. package/node/lib/fbs/worker/close-notification.d.ts.map +0 -1
  161. package/node/lib/fbs/worker/close-request.d.ts +0 -18
  162. package/node/lib/fbs/worker/close-request.d.ts.map +0 -1
  163. package/node/lib/fbs/worker/close-worker-notification.d.ts +0 -18
  164. package/node/lib/fbs/worker/close-worker-notification.d.ts.map +0 -1
  165. package/worker/fbs/liburing.fbs +0 -7
  166. package/worker/include/DepLibUring.hpp +0 -143
  167. package/worker/src/DepLibUring.cpp +0 -638
  168. package/worker/subprojects/liburing.wrap +0 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasoup",
3
- "version": "3.20.6",
3
+ "version": "3.20.8",
4
4
  "description": "Cutting Edge WebRTC Video Conferencing",
5
5
  "contributors": [
6
6
  "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
@@ -103,7 +103,7 @@
103
103
  "dependencies": {
104
104
  "debug": "^4.4.3",
105
105
  "flatbuffers": "^25.9.23",
106
- "h264-profile-level-id": "^2.3.2",
106
+ "h264-profile-level-id": "^2.3.3",
107
107
  "node-fetch": "^3.3.2",
108
108
  "supports-color": "^10.2.2",
109
109
  "tar": "^7.5.16"
@@ -114,7 +114,7 @@
114
114
  "@types/debug": "^4.1.13",
115
115
  "@types/ini": "^4.1.1",
116
116
  "@types/jest": "^30.0.0",
117
- "@types/node": "^25.6.2",
117
+ "@types/node": "^25.9.3",
118
118
  "eslint": "^10.5.0",
119
119
  "eslint-config-prettier": "^10.1.8",
120
120
  "eslint-plugin-jest": "^29.15.2",
@@ -122,14 +122,14 @@
122
122
  "globals": "^17.6.0",
123
123
  "ini": "^6.0.0",
124
124
  "jest": "^30.4.2",
125
- "knip": "^6.16.1",
125
+ "knip": "^6.17.1",
126
126
  "marked": "^18.0.5",
127
127
  "open-cli": "^9.0.0",
128
- "pick-port": "^2.2.0",
128
+ "pick-port": "^2.2.1",
129
129
  "prettier": "^3.8.4",
130
130
  "ts-jest": "^29.4.11",
131
131
  "typescript": "^6.0.3",
132
- "typescript-eslint": "^8.61.0",
132
+ "typescript-eslint": "^8.61.1",
133
133
  "werift-sctp": "^0.0.11"
134
134
  }
135
135
  }
@@ -6,7 +6,6 @@ flatbuffers_schemas = [
6
6
  'dataConsumer.fbs',
7
7
  'dataProducer.fbs',
8
8
  'directTransport.fbs',
9
- 'liburing.fbs',
10
9
  'log.fbs',
11
10
  'message.fbs',
12
11
  'notification.fbs',
@@ -22,7 +22,7 @@ table ConnectRequest {
22
22
  }
23
23
 
24
24
  table ConnectResponse {
25
- tuple: FBS.Transport.Tuple (required);
25
+ tuple: FBS.Transport.Tuple;
26
26
  rtcp_tuple: FBS.Transport.Tuple;
27
27
  srtp_parameters: FBS.SrtpParameters.SrtpParameters;
28
28
  }
@@ -1,4 +1,3 @@
1
- include "liburing.fbs";
2
1
  include "transport.fbs";
3
2
 
4
3
  namespace FBS.Worker;
@@ -13,7 +12,6 @@ table DumpResponse {
13
12
  web_rtc_server_ids: [string] (required);
14
13
  router_ids: [string] (required);
15
14
  channel_message_handlers: ChannelMessageHandlers (required);
16
- liburing: FBS.LibUring.Dump;
17
15
  }
18
16
 
19
17
  table ResourceUsageResponse {
@@ -151,14 +151,14 @@ namespace RTC
151
151
  };
152
152
 
153
153
  public:
154
- static const size_t FixedHeaderLength{ 20 };
155
- static const size_t TransactionIdLength{ 12 };
156
- static const size_t UsernameAttributeMaxLength{ 513 };
157
- static const size_t XorMappedAddressIPv4Length{ 8 };
158
- static const size_t XorMappedAddressIPv6Length{ 20 };
159
- static const size_t SoftwareAttributeMaxLength{ 763 };
160
- static const size_t MessageIntegrityAttributeLength{ 20 };
161
- static const size_t FingerprintAttributeLength{ 4 };
154
+ static constexpr size_t FixedHeaderLength{ 20 };
155
+ static constexpr size_t TransactionIdLength{ 12 };
156
+ static constexpr size_t UsernameAttributeMaxLength{ 513 };
157
+ static constexpr size_t XorMappedAddressIPv4Length{ 8 };
158
+ static constexpr size_t XorMappedAddressIPv6Length{ 20 };
159
+ static constexpr size_t SoftwareAttributeMaxLength{ 763 };
160
+ static constexpr size_t MessageIntegrityAttributeLength{ 20 };
161
+ static constexpr size_t FingerprintAttributeLength{ 4 };
162
162
 
163
163
  /**
164
164
  * Whether given buffer could be a valid STUN packet.
@@ -177,7 +177,6 @@ namespace RTC
177
177
  * Create a STUN packet.
178
178
  *
179
179
  * @remarks
180
- * - `bufferLength` must be the exact length of the STUN packet.
181
180
  * - If `transactionId` is not given then a random Transaction ID is
182
181
  * generated.
183
182
  */
@@ -186,7 +186,7 @@ namespace RTC
186
186
  /**
187
187
  * Minimum size (in bytes) of the RTP Fixed Header (without CSRC fields).
188
188
  */
189
- static const size_t FixedHeaderMinLength{ 12 };
189
+ static constexpr size_t FixedHeaderMinLength{ 12 };
190
190
 
191
191
  /**
192
192
  * Whether given buffer could be a valid RTP packet.
@@ -14,7 +14,7 @@ namespace RTC
14
14
  /**
15
15
  * Maximum length of a probation RTP packet.
16
16
  */
17
- static const size_t ProbationPacketMaxLength{ 1400 };
17
+ static constexpr size_t ProbationPacketMaxLength{ 1400 };
18
18
  /**
19
19
  * SSRC of the probation RTP stream.
20
20
  */
@@ -145,7 +145,7 @@ namespace RTC
145
145
  };
146
146
 
147
147
  public:
148
- static const size_t ChunkHeaderLength{ 4 };
148
+ static constexpr size_t ChunkHeaderLength{ 4 };
149
149
 
150
150
  public:
151
151
  /**
@@ -85,7 +85,7 @@ namespace RTC
85
85
  };
86
86
 
87
87
  public:
88
- static const size_t ErrorCauseHeaderLength{ 4 };
88
+ static constexpr size_t ErrorCauseHeaderLength{ 4 };
89
89
 
90
90
  public:
91
91
  /**
@@ -70,7 +70,7 @@ namespace RTC
70
70
  };
71
71
 
72
72
  public:
73
- static const size_t CommonHeaderLength{ 12 };
73
+ static constexpr size_t CommonHeaderLength{ 12 };
74
74
 
75
75
  /**
76
76
  * Whether given buffer could be a valid SCTP packet.
@@ -94,7 +94,6 @@ namespace RTC
94
94
  * Create an SCTP packet.
95
95
  *
96
96
  * @remarks
97
- * - `bufferLength` must be the exact length of the STUN packet.
98
97
  * - If `transactionId` is not given then a random Transaction ID is
99
98
  * generated.
100
99
  */
@@ -99,7 +99,7 @@ namespace RTC
99
99
  };
100
100
 
101
101
  public:
102
- static const size_t ParameterHeaderLength{ 4 };
102
+ static constexpr size_t ParameterHeaderLength{ 4 };
103
103
 
104
104
  public:
105
105
  /**
@@ -33,7 +33,7 @@ namespace RTC
33
33
  class TLV : public Serializable
34
34
  {
35
35
  public:
36
- static const size_t TLVHeaderLength{ 4 };
36
+ static constexpr size_t TLVHeaderLength{ 4 };
37
37
 
38
38
  public:
39
39
  /**
@@ -77,7 +77,7 @@ namespace RTC
77
77
  friend class Packet;
78
78
 
79
79
  public:
80
- static const size_t DataChunkHeaderLength{ 16 };
80
+ static constexpr size_t DataChunkHeaderLength{ 16 };
81
81
 
82
82
  public:
83
83
  /**
@@ -48,7 +48,7 @@ namespace RTC
48
48
  friend class Packet;
49
49
 
50
50
  public:
51
- static const size_t ForwardTsnChunkHeaderLength{ 8 };
51
+ static constexpr size_t ForwardTsnChunkHeaderLength{ 8 };
52
52
 
53
53
  public:
54
54
  /**
@@ -74,7 +74,7 @@ namespace RTC
74
74
  friend class Packet;
75
75
 
76
76
  public:
77
- static const size_t IDataChunkHeaderLength{ 20 };
77
+ static constexpr size_t IDataChunkHeaderLength{ 20 };
78
78
 
79
79
  public:
80
80
  /**
@@ -60,7 +60,7 @@ namespace RTC
60
60
  friend class Packet;
61
61
 
62
62
  public:
63
- static const size_t IForwardTsnChunkHeaderLength{ 8 };
63
+ static constexpr size_t IForwardTsnChunkHeaderLength{ 8 };
64
64
 
65
65
  public:
66
66
  /**
@@ -71,7 +71,7 @@ namespace RTC
71
71
  friend class Packet;
72
72
 
73
73
  public:
74
- static const size_t InitAckChunkHeaderLength{ 20 };
74
+ static constexpr size_t InitAckChunkHeaderLength{ 20 };
75
75
 
76
76
  public:
77
77
  /**
@@ -71,7 +71,7 @@ namespace RTC
71
71
  friend class Packet;
72
72
 
73
73
  public:
74
- static const size_t InitChunkHeaderLength{ 20 };
74
+ static constexpr size_t InitChunkHeaderLength{ 20 };
75
75
 
76
76
  public:
77
77
  /**
@@ -97,7 +97,7 @@ namespace RTC
97
97
  };
98
98
 
99
99
  public:
100
- static const size_t SackChunkHeaderLength{ 16 };
100
+ static constexpr size_t SackChunkHeaderLength{ 16 };
101
101
 
102
102
  public:
103
103
  /**
@@ -39,7 +39,7 @@ namespace RTC
39
39
  friend class Packet;
40
40
 
41
41
  public:
42
- static const size_t ShutdownChunkHeaderLength{ 8 };
42
+ static constexpr size_t ShutdownChunkHeaderLength{ 8 };
43
43
 
44
44
  public:
45
45
  /**
@@ -33,7 +33,7 @@ namespace RTC
33
33
  friend class Chunk;
34
34
 
35
35
  public:
36
- static const size_t InvalidStreamIdentifierErrorCauseHeaderLength{ 8 };
36
+ static constexpr size_t InvalidStreamIdentifierErrorCauseHeaderLength{ 8 };
37
37
 
38
38
  public:
39
39
  /**
@@ -38,7 +38,7 @@ namespace RTC
38
38
  friend class Chunk;
39
39
 
40
40
  public:
41
- static const size_t MissingMandatoryParameterErrorCauseHeaderLength{ 8 };
41
+ static constexpr size_t MissingMandatoryParameterErrorCauseHeaderLength{ 8 };
42
42
 
43
43
  public:
44
44
  /**
@@ -32,7 +32,7 @@ namespace RTC
32
32
  friend class Chunk;
33
33
 
34
34
  public:
35
- static const size_t NoUserDataErrorCauseHeaderLength{ 8 };
35
+ static constexpr size_t NoUserDataErrorCauseHeaderLength{ 8 };
36
36
 
37
37
  public:
38
38
  /**
@@ -32,7 +32,7 @@ namespace RTC
32
32
  friend class Chunk;
33
33
 
34
34
  public:
35
- static const size_t StaleCookieErrorCauseHeaderLength{ 8 };
35
+ static constexpr size_t StaleCookieErrorCauseHeaderLength{ 8 };
36
36
 
37
37
  public:
38
38
  /**
@@ -35,7 +35,7 @@ namespace RTC
35
35
  friend class Chunk;
36
36
 
37
37
  public:
38
- static const size_t AddIncomingStreamsRequestParameterHeaderLength{ 12 };
38
+ static constexpr size_t AddIncomingStreamsRequestParameterHeaderLength{ 12 };
39
39
 
40
40
  public:
41
41
  /**
@@ -35,7 +35,7 @@ namespace RTC
35
35
  friend class Chunk;
36
36
 
37
37
  public:
38
- static const size_t AddOutgoingStreamsRequestParameterHeaderLength{ 12 };
38
+ static constexpr size_t AddOutgoingStreamsRequestParameterHeaderLength{ 12 };
39
39
 
40
40
  public:
41
41
  /**
@@ -32,7 +32,7 @@ namespace RTC
32
32
  friend class Chunk;
33
33
 
34
34
  public:
35
- static const size_t CookiePreservativeParameterHeaderLength{ 8 };
35
+ static constexpr size_t CookiePreservativeParameterHeaderLength{ 8 };
36
36
 
37
37
  public:
38
38
  /**
@@ -31,7 +31,7 @@ namespace RTC
31
31
  friend class Chunk;
32
32
 
33
33
  public:
34
- static const size_t IPv4AddressParameterHeaderLength{ 8 };
34
+ static constexpr size_t IPv4AddressParameterHeaderLength{ 8 };
35
35
 
36
36
  public:
37
37
  /**
@@ -34,7 +34,7 @@ namespace RTC
34
34
  friend class Chunk;
35
35
 
36
36
  public:
37
- static const size_t IPv6AddressParameterHeaderLength{ 20 };
37
+ static constexpr size_t IPv6AddressParameterHeaderLength{ 20 };
38
38
 
39
39
  public:
40
40
  /**
@@ -40,7 +40,7 @@ namespace RTC
40
40
  friend class Chunk;
41
41
 
42
42
  public:
43
- static const size_t IncomingSsnResetRequestParameterHeaderLength{ 8 };
43
+ static constexpr size_t IncomingSsnResetRequestParameterHeaderLength{ 8 };
44
44
 
45
45
  public:
46
46
  /**
@@ -44,7 +44,7 @@ namespace RTC
44
44
  friend class Chunk;
45
45
 
46
46
  public:
47
- static const size_t OutgoingSsnResetRequestParameterHeaderLength{ 16 };
47
+ static constexpr size_t OutgoingSsnResetRequestParameterHeaderLength{ 16 };
48
48
 
49
49
  public:
50
50
  /**
@@ -54,8 +54,8 @@ namespace RTC
54
54
  };
55
55
 
56
56
  public:
57
- static const size_t ReconfigurationResponseParameterHeaderLength{ 12 };
58
- static const size_t ReconfigurationResponseParameterHeaderLengthWithOptionalFields{ 20 };
57
+ static constexpr size_t ReconfigurationResponseParameterHeaderLength{ 12 };
58
+ static constexpr size_t ReconfigurationResponseParameterHeaderLengthWithOptionalFields{ 20 };
59
59
 
60
60
  public:
61
61
  /**
@@ -33,7 +33,7 @@ namespace RTC
33
33
  friend class Chunk;
34
34
 
35
35
  public:
36
- static const size_t SsnTsnResetRequestParameterHeaderLength{ 8 };
36
+ static constexpr size_t SsnTsnResetRequestParameterHeaderLength{ 8 };
37
37
 
38
38
  public:
39
39
  /**
@@ -46,7 +46,7 @@ namespace RTC
46
46
  };
47
47
 
48
48
  public:
49
- static const size_t ZeroChecksumAcceptableParameterHeaderLength{ 8 };
49
+ static constexpr size_t ZeroChecksumAcceptableParameterHeaderLength{ 8 };
50
50
 
51
51
  public:
52
52
  /**
@@ -39,7 +39,6 @@ public:
39
39
  std::string dtlsCertificateFile;
40
40
  std::string dtlsPrivateKeyFile;
41
41
  std::string libwebrtcFieldTrials{ "WebRTC-Bwe-AlrLimitedBackoff/Enabled/" };
42
- bool disableLiburing{ false };
43
42
  };
44
43
 
45
44
  public:
@@ -143,10 +143,6 @@ private:
143
143
  uv_tcp_t* uvHandle{ nullptr };
144
144
  // Others.
145
145
  struct sockaddr_storage* localAddr{ nullptr };
146
- #ifdef MS_LIBURING_SUPPORTED
147
- // Local file descriptor for io_uring.
148
- uv_os_fd_t fd{ 0u };
149
- #endif
150
146
  bool closed{ false };
151
147
  size_t recvBytes{ 0u };
152
148
  size_t sentBytes{ 0u };
@@ -102,10 +102,6 @@ private:
102
102
  // Allocated by this (may be passed by argument).
103
103
  uv_udp_t* uvHandle{ nullptr };
104
104
  // Others.
105
- #ifdef MS_LIBURING_SUPPORTED
106
- // Local file descriptor for io_uring.
107
- uv_os_fd_t fd{ 0u };
108
- #endif
109
105
  bool closed{ false };
110
106
  size_t recvBytes{ 0u };
111
107
  size_t sentBytes{ 0u };
@@ -368,40 +368,6 @@ if host_machine.system() == 'windows'
368
368
  ]
369
369
  endif
370
370
 
371
- if host_machine.system() == 'linux' and not get_option('ms_disable_liburing')
372
- kernel_version = run_command('uname', '-r', check: true).stdout().strip()
373
-
374
- # Enable liburing for kernel versions greather than or equal to 6.
375
- if kernel_version[0].to_int() >= 6
376
- liburing_proj = subproject(
377
- 'liburing',
378
- default_options: [
379
- 'default_library=static',
380
- # NOTE: We need to add this to disable ASAN in liburing, otherwise when
381
- # building `mediasoup-test-asan-undefined` binary, liburing receives
382
- # `use_ubsan: true` and tries to compile its `sanitize.c` file
383
- # that contains references to `__asan_*` functions, but we don't enable
384
- # ASAN (`-fsanitize=address) in that binaries so liburing fails to
385
- # compile.
386
- 'b_sanitize=none',
387
- ],
388
- )
389
-
390
- dependencies += [
391
- liburing_proj.get_variable('uring'),
392
- ]
393
- link_whole += [
394
- liburing_proj.get_variable('liburing')
395
- ]
396
- common_sources += [
397
- 'src/DepLibUring.cpp',
398
- ]
399
- cpp_args += [
400
- '-DMS_LIBURING_SUPPORTED',
401
- ]
402
- endif
403
- endif
404
-
405
371
  if get_option('ms_build_tests')
406
372
  catch2_proj = subproject(
407
373
  'catch2',
@@ -3,6 +3,5 @@ option('ms_log_file_line', type: 'boolean', value: false, description: 'Logging
3
3
  option('ms_rtc_logger_rtp', type: 'boolean', value: false, description: 'Prints a line with information for each processed RTP packet')
4
4
  option('ms_dump_rtp_payload_descriptor', type: 'boolean', value: false, description: 'RTC::RTP::Packet::Dump() method also dumps payload descriptor details')
5
5
  option('ms_dump_rtp_shared_packet_memory_usage', type: 'boolean', value: false, description: 'prints information about total memory allocated by RTC::RTP::SharedPacket instances')
6
- option('ms_disable_liburing', type: 'boolean', value: false, description: 'When set to true, disables liburing integration despite current host supports it')
7
6
  option('ms_build_tests', type: 'boolean', value: false, description: 'Must be enabled when building mediasoup worker tests')
8
7
  option('ms_build_fuzzer', type: 'boolean', value: false, description: 'Must be enabled when building mediasoup worker fuzzer')
@@ -517,7 +517,7 @@ namespace RTC
517
517
  const uint8_t* data = packet->GetBuffer();
518
518
  auto len = packet->GetLength();
519
519
 
520
- if (HasSrtp() && !this->srtpSendSession->EncryptRtp(&data, &len))
520
+ if (HasSrtp() && !this->srtpSendSession->EncryptRtp(&data, std::addressof(len)))
521
521
  {
522
522
  if (cb)
523
523
  {
@@ -546,7 +546,7 @@ namespace RTC
546
546
  const uint8_t* data = packet->GetData();
547
547
  auto len = packet->GetSize();
548
548
 
549
- if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, &len))
549
+ if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, std::addressof(len)))
550
550
  {
551
551
  return;
552
552
  }
@@ -571,7 +571,7 @@ namespace RTC
571
571
  const uint8_t* data = packet->GetData();
572
572
  auto len = packet->GetSize();
573
573
 
574
- if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, &len))
574
+ if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, std::addressof(len)))
575
575
  {
576
576
  return;
577
577
  }
@@ -667,7 +667,7 @@ namespace RTC
667
667
  }
668
668
 
669
669
  // Decrypt the SRTP packet.
670
- if (HasSrtp() && !this->srtpRecvSession->DecryptSrtp(const_cast<uint8_t*>(data), &len))
670
+ if (HasSrtp() && !this->srtpRecvSession->DecryptSrtp(const_cast<uint8_t*>(data), std::addressof(len)))
671
671
  {
672
672
  const auto* packet = RTC::RTP::Packet::Parse(data, len, bufferLen);
673
673
 
@@ -727,7 +727,7 @@ namespace RTC
727
727
  }
728
728
 
729
729
  // Decrypt the SRTCP packet.
730
- if (HasSrtp() && !this->srtpRecvSession->DecryptSrtcp(const_cast<uint8_t*>(data), &len))
730
+ if (HasSrtp() && !this->srtpRecvSession->DecryptSrtcp(const_cast<uint8_t*>(data), std::addressof(len)))
731
731
  {
732
732
  return;
733
733
  }
@@ -823,7 +823,7 @@ namespace RTC
823
823
  const uint8_t* data = packet->GetBuffer();
824
824
  auto len = packet->GetLength();
825
825
 
826
- if (HasSrtp() && !this->srtpSendSession->EncryptRtp(&data, &len))
826
+ if (HasSrtp() && !this->srtpSendSession->EncryptRtp(&data, std::addressof(len)))
827
827
  {
828
828
  if (cb)
829
829
  {
@@ -852,7 +852,7 @@ namespace RTC
852
852
  const uint8_t* data = packet->GetData();
853
853
  auto len = packet->GetSize();
854
854
 
855
- if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, &len))
855
+ if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, std::addressof(len)))
856
856
  {
857
857
  return;
858
858
  }
@@ -884,7 +884,7 @@ namespace RTC
884
884
  const uint8_t* data = packet->GetData();
885
885
  auto len = packet->GetSize();
886
886
 
887
- if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, &len))
887
+ if (HasSrtp() && !this->srtpSendSession->EncryptRtcp(&data, std::addressof(len)))
888
888
  {
889
889
  return;
890
890
  }
@@ -989,7 +989,7 @@ namespace RTC
989
989
  }
990
990
 
991
991
  // Decrypt the SRTP packet.
992
- if (HasSrtp() && !this->srtpRecvSession->DecryptSrtp(const_cast<uint8_t*>(data), &len))
992
+ if (HasSrtp() && !this->srtpRecvSession->DecryptSrtp(const_cast<uint8_t*>(data), std::addressof(len)))
993
993
  {
994
994
  const auto* packet = RTC::RTP::Packet::Parse(data, len, bufferLen);
995
995
 
@@ -1085,7 +1085,7 @@ namespace RTC
1085
1085
  }
1086
1086
 
1087
1087
  // Decrypt the SRTCP packet.
1088
- if (HasSrtp() && !this->srtpRecvSession->DecryptSrtcp(const_cast<uint8_t*>(data), &len))
1088
+ if (HasSrtp() && !this->srtpRecvSession->DecryptSrtcp(const_cast<uint8_t*>(data), std::addressof(len)))
1089
1089
  {
1090
1090
  return;
1091
1091
  }
@@ -2,8 +2,6 @@
2
2
  // #define MS_LOG_DEV_LEVEL 3
3
3
 
4
4
  #include "RTC/RTP/Packet.hpp"
5
- #ifdef MS_RTC_LOGGER_RTP
6
- #endif
7
5
  #include "DepLibUV.hpp"
8
6
  #include "Logger.hpp"
9
7
  #include "MediaSoupErrors.hpp"
@@ -2,11 +2,7 @@
2
2
  // #define MS_LOG_DEV_LEVEL 3
3
3
 
4
4
  #include "RTC/RTP/RtpStreamSend.hpp"
5
- #ifdef MS_LIBURING_SUPPORTED
6
- #include "DepLibUring.hpp"
7
- #endif
8
5
  #include "Logger.hpp"
9
- #include "RTC/Consts.hpp"
10
6
  #include "RTC/RtpDictionaries.hpp"
11
7
  #include "Utils.hpp"
12
8
  #include <vector>
@@ -155,14 +151,6 @@ namespace RTC
155
151
 
156
152
  this->nackCount++;
157
153
 
158
- #ifdef MS_LIBURING_SUPPORTED
159
- if (DepLibUring::IsEnabled())
160
- {
161
- // Activate liburing usage.
162
- DepLibUring::SetActive();
163
- }
164
- #endif
165
-
166
154
  for (auto it = nackPacket->Begin(); it != nackPacket->End(); ++it)
167
155
  {
168
156
  const RTC::RTCP::FeedbackRtpNackItem* item = *it;
@@ -261,14 +249,6 @@ namespace RTC
261
249
  packet->SetMarker(origMarker);
262
250
  }
263
251
  }
264
-
265
- #ifdef MS_LIBURING_SUPPORTED
266
- if (DepLibUring::IsEnabled())
267
- {
268
- // Submit all prepared submission entries.
269
- DepLibUring::Submit();
270
- }
271
- #endif
272
252
  }
273
253
 
274
254
  void RtpStreamSend::ReceiveKeyFrameRequest(RTC::RTCP::FeedbackPs::MessageType messageType)