mediasoup 3.13.7 → 3.13.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasoup",
3
- "version": "3.13.7",
3
+ "version": "3.13.9",
4
4
  "description": "Cutting Edge WebRTC Video Conferencing",
5
5
  "contributors": [
6
6
  "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
@@ -91,7 +91,11 @@
91
91
  "node/src/fbs",
92
92
  "node/src/tests"
93
93
  ],
94
- "cacheDirectory": ".cache/jest"
94
+ "cacheDirectory": ".cache/jest",
95
+ "modulePathIgnorePatterns": [
96
+ "worker/",
97
+ "rust/"
98
+ ]
95
99
  },
96
100
  "dependencies": {
97
101
  "debug": "^4.3.4",
@@ -104,10 +108,10 @@
104
108
  "devDependencies": {
105
109
  "@octokit/rest": "^20.0.2",
106
110
  "@types/debug": "^4.1.12",
107
- "@types/jest": "^29.5.10",
111
+ "@types/jest": "^29.5.11",
108
112
  "@types/node": "^20.10.3",
109
- "@typescript-eslint/eslint-plugin": "^6.13.1",
110
- "@typescript-eslint/parser": "^6.13.1",
113
+ "@typescript-eslint/eslint-plugin": "^6.13.2",
114
+ "@typescript-eslint/parser": "^6.13.2",
111
115
  "eslint": "^8.55.0",
112
116
  "eslint-plugin-jest": "^27.6.0",
113
117
  "jest": "^29.7.0",
@@ -258,8 +258,8 @@ if host_machine.system() == 'windows'
258
258
  ]
259
259
  endif
260
260
 
261
- if host_machine.system() == 'linux'
262
- kernel_version = run_command('uname', '-r').stdout().strip()
261
+ if host_machine.system() == 'linux' and not get_option('ms_disable_liburing')
262
+ kernel_version = run_command('uname', '-r', check: true).stdout().strip()
263
263
 
264
264
  # Enable liburing for kernel versions greather than or equal to 6.
265
265
  if kernel_version[0].to_int() >= 6
@@ -1,3 +1,4 @@
1
- option('ms_log_trace', type : 'boolean', value : false, description : 'When enabled, logs the current method/function if current log level is "debug"')
2
- option('ms_log_file_line', type : 'boolean', value : false, description : 'When enabled, all the logging macros print more verbose information, including current file and line')
3
- option('ms_rtc_logger_rtp', type : 'boolean', value : false, description : 'When enabled, prints a line with information for each RTP packet')
1
+ option('ms_log_trace', type : 'boolean', value : false, description : 'When set to true, logs the current method/function if current log level is "debug"')
2
+ option('ms_log_file_line', type : 'boolean', value : false, description : 'When set to true, all the logging macros print more verbose information, including current file and line')
3
+ option('ms_rtc_logger_rtp', type : 'boolean', value : false, description : 'When set to true, prints a line with information for each RTP packet')
4
+ option('ms_disable_liburing', type : 'boolean', value : false, description : 'When set to true, disables liburing integration despite current host supports it')
@@ -2,6 +2,9 @@
2
2
  // #define MS_LOG_DEV_LEVEL 3
3
3
 
4
4
  #include "DepUsrSCTP.hpp"
5
+ #ifdef MS_LIBURING_SUPPORTED
6
+ #include "DepLibUring.hpp"
7
+ #endif
5
8
  #include "DepLibUV.hpp"
6
9
  #include "Logger.hpp"
7
10
  #include <usrsctp.h>
@@ -249,7 +252,21 @@ void DepUsrSCTP::Checker::OnTimer(TimerHandle* /*timer*/)
249
252
  auto nowMs = DepLibUV::GetTimeMs();
250
253
  const int elapsedMs = this->lastCalledAtMs ? static_cast<int>(nowMs - this->lastCalledAtMs) : 0;
251
254
 
255
+ #ifdef MS_LIBURING_SUPPORTED
256
+ // Activate liburing usage.
257
+ // 'usrsctp_handle_timers()' will synchronously call the send/recv
258
+ // callbacks for the pending data. If there are multiple messages to be
259
+ // sent over the network then we will send those messages within a single
260
+ // system call.
261
+ DepLibUring::SetActive();
262
+ #endif
263
+
252
264
  usrsctp_handle_timers(elapsedMs);
253
265
 
266
+ #ifdef MS_LIBURING_SUPPORTED
267
+ // Submit all prepared submission entries.
268
+ DepLibUring::Submit();
269
+ #endif
270
+
254
271
  this->lastCalledAtMs = nowMs;
255
272
  }
@@ -921,9 +921,24 @@ namespace RTC
921
921
 
922
922
  auto& dataConsumers = this->mapDataProducerDataConsumers.at(dataProducer);
923
923
 
924
- for (auto* dataConsumer : dataConsumers)
924
+ if (!dataConsumers.empty())
925
925
  {
926
- dataConsumer->SendMessage(msg, len, ppid, subchannels, requiredSubchannel);
926
+ #ifdef MS_LIBURING_SUPPORTED
927
+ // Activate liburing usage.
928
+ // The effective sending could be synchronous, thus we would send those
929
+ // messages within a single system call.
930
+ DepLibUring::SetActive();
931
+ #endif
932
+
933
+ for (auto* dataConsumer : dataConsumers)
934
+ {
935
+ dataConsumer->SendMessage(msg, len, ppid, subchannels, requiredSubchannel);
936
+ }
937
+
938
+ #ifdef MS_LIBURING_SUPPORTED
939
+ // Submit all prepared submission entries.
940
+ DepLibUring::Submit();
941
+ #endif
927
942
  }
928
943
  }
929
944
 
@@ -3,11 +3,11 @@ directory = liburing-liburing-2.4
3
3
  source_url = https://github.com/axboe/liburing/archive/refs/tags/liburing-2.4.tar.gz
4
4
  source_filename = liburing-2.4.tar.gz
5
5
  source_hash = 2398ec82d967a6f903f3ae1fd4541c754472d3a85a584dc78c5da2fabc90706b
6
- patch_filename = liburing_2.4-1_patch.zip
7
- patch_url = https://wrapdb.mesonbuild.com/v2/liburing_2.4-1/get_patch
8
- patch_hash = 0dd939828da6a7c6d22c0f4db879405e74f9ac7153927c365642a28f871c92c2
9
- source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/liburing_2.4-1/liburing-2.4.tar.gz
10
- wrapdb_version = 2.4-1
6
+ patch_filename = liburing_2.4-2_patch.zip
7
+ patch_url = https://wrapdb.mesonbuild.com/v2/liburing_2.4-2/get_patch
8
+ patch_hash = 0435ae1012065fa96a22e1068c2e39e2f7c7c03b58a812774434a6e7455d7f20
9
+ source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/liburing_2.4-2/liburing-2.4.tar.gz
10
+ wrapdb_version = 2.4-2
11
11
 
12
12
  [provide]
13
13
  dependency_names = liburing