mediasoup 3.11.2 → 3.11.3

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.
@@ -81,7 +81,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter {
81
81
  // options
82
82
  {
83
83
  env: {
84
- MEDIASOUP_VERSION: '3.11.2',
84
+ MEDIASOUP_VERSION: '3.11.3',
85
85
  // Let the worker process inherit all environment variables, useful
86
86
  // if a custom and not in the path GCC is used so the user can set
87
87
  // LD_LIBRARY_PATH environment variable for runtime.
@@ -9,7 +9,7 @@ export { types };
9
9
  /**
10
10
  * Expose mediasoup version.
11
11
  */
12
- export declare const version = "3.11.2";
12
+ export declare const version = "3.11.3";
13
13
  /**
14
14
  * Expose parseScalabilityMode() function.
15
15
  */
package/node/lib/index.js CHANGED
@@ -11,7 +11,7 @@ exports.types = types;
11
11
  /**
12
12
  * Expose mediasoup version.
13
13
  */
14
- exports.version = '3.11.2';
14
+ exports.version = '3.11.3';
15
15
  /**
16
16
  * Expose parseScalabilityMode() function.
17
17
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasoup",
3
- "version": "3.11.2",
3
+ "version": "3.11.3",
4
4
  "description": "Cutting Edge WebRTC Video Conferencing",
5
5
  "contributors": [
6
6
  "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
package/worker/Makefile CHANGED
@@ -32,10 +32,10 @@ MESON_ARGS ?= ""
32
32
  # Workaround for NixOS and Guix that don't work with pre-built binaries, see:
33
33
  # https://github.com/NixOS/nixpkgs/issues/142383.
34
34
  PIP_BUILD_BINARIES = $(shell [ -f /etc/NIXOS -o -d /etc/guix ] && echo "--no-binary :all:")
35
- # Let's use a specific version of ninja to avoid version 1.11.1 due to a bug in
36
- # Meson:
35
+ # Let's use a specific version of ninja to avoid buggy version 1.11.1:
37
36
  # https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/
38
37
  # https://github.com/ninja-build/ninja/issues/2211
38
+ # https://github.com/ninja-build/ninja/issues/2212
39
39
  NINJA_VERSION ?= 1.10.2.4
40
40
 
41
41
  # Disable `*.pyc` files creation.
@@ -63,51 +63,56 @@ void ChannelMessageHandlers::RegisterHandler(
63
63
  {
64
64
  MS_TRACE();
65
65
 
66
- try
66
+ if (channelRequestHandler != nullptr)
67
67
  {
68
- if (channelRequestHandler != nullptr)
68
+ if (
69
+ ChannelMessageHandlers::mapChannelRequestHandlers.find(id) !=
70
+ ChannelMessageHandlers::mapChannelRequestHandlers.end())
69
71
  {
70
- if (
71
- ChannelMessageHandlers::mapChannelRequestHandlers.find(id) !=
72
- ChannelMessageHandlers::mapChannelRequestHandlers.end())
73
- {
74
- MS_THROW_ERROR("Channel request handler with ID %s already exists", id.c_str());
75
- }
76
-
77
- ChannelMessageHandlers::mapChannelRequestHandlers[id] = channelRequestHandler;
72
+ MS_THROW_ERROR("Channel request handler with ID %s already exists", id.c_str());
78
73
  }
79
74
 
80
- if (payloadChannelRequestHandler != nullptr)
75
+ ChannelMessageHandlers::mapChannelRequestHandlers[id] = channelRequestHandler;
76
+ }
77
+
78
+ if (payloadChannelRequestHandler != nullptr)
79
+ {
80
+ if (
81
+ ChannelMessageHandlers::mapPayloadChannelRequestHandlers.find(id) !=
82
+ ChannelMessageHandlers::mapPayloadChannelRequestHandlers.end())
81
83
  {
82
- if (
83
- ChannelMessageHandlers::mapPayloadChannelRequestHandlers.find(id) !=
84
- ChannelMessageHandlers::mapPayloadChannelRequestHandlers.end())
84
+ if (channelRequestHandler != nullptr)
85
85
  {
86
- MS_THROW_ERROR("PayloadChannel request handler with ID %s already exists", id.c_str());
86
+ ChannelMessageHandlers::mapChannelRequestHandlers.erase(id);
87
87
  }
88
88
 
89
- ChannelMessageHandlers::mapPayloadChannelRequestHandlers[id] = payloadChannelRequestHandler;
89
+ MS_THROW_ERROR("PayloadChannel request handler with ID %s already exists", id.c_str());
90
90
  }
91
91
 
92
- if (payloadChannelNotificationHandler != nullptr)
92
+ ChannelMessageHandlers::mapPayloadChannelRequestHandlers[id] = payloadChannelRequestHandler;
93
+ }
94
+
95
+ if (payloadChannelNotificationHandler != nullptr)
96
+ {
97
+ if (
98
+ ChannelMessageHandlers::mapPayloadChannelNotificationHandlers.find(id) !=
99
+ ChannelMessageHandlers::mapPayloadChannelNotificationHandlers.end())
93
100
  {
94
- if (
95
- ChannelMessageHandlers::mapPayloadChannelNotificationHandlers.find(id) !=
96
- ChannelMessageHandlers::mapPayloadChannelNotificationHandlers.end())
101
+ if (channelRequestHandler != nullptr)
97
102
  {
98
- MS_THROW_ERROR("PayloadChannel notification handler with ID %s already exists", id.c_str());
103
+ ChannelMessageHandlers::mapChannelRequestHandlers.erase(id);
99
104
  }
100
105
 
101
- ChannelMessageHandlers::mapPayloadChannelNotificationHandlers[id] =
102
- payloadChannelNotificationHandler;
106
+ if (payloadChannelRequestHandler != nullptr)
107
+ {
108
+ ChannelMessageHandlers::mapPayloadChannelRequestHandlers.erase(id);
109
+ }
110
+
111
+ MS_THROW_ERROR("PayloadChannel notification handler with ID %s already exists", id.c_str());
103
112
  }
104
- }
105
- catch (const MediaSoupError& error)
106
- {
107
- // In case of error unregister everything.
108
- ChannelMessageHandlers::UnregisterHandler(id);
109
113
 
110
- throw;
114
+ ChannelMessageHandlers::mapPayloadChannelNotificationHandlers[id] =
115
+ payloadChannelNotificationHandler;
111
116
  }
112
117
  }
113
118
 
@@ -455,7 +455,7 @@ namespace RTC
455
455
  size_t representedPackets{ 0u };
456
456
 
457
457
  // Fill statuses vector.
458
- for (uint8_t i{ 0u }; i < missingPackets && this->context.statuses.size() < 7; ++i)
458
+ for (uint16_t i{ 0u }; i < missingPackets && this->context.statuses.size() < 7; ++i)
459
459
  {
460
460
  this->context.statuses.emplace_back(Status::NotReceived);
461
461
  representedPackets++;
@@ -89,7 +89,7 @@ namespace RTC
89
89
  // Iterate all temporal layers of spatial layers previous to the given one.
90
90
  for (uint8_t sIdx{ 0u }; sIdx < spatialLayer; ++sIdx)
91
91
  {
92
- for (uint8_t tIdx{ 0u }; tIdx < this->spatialLayerCounters[sIdx].size(); ++tIdx)
92
+ for (size_t tIdx{ 0u }; tIdx < this->spatialLayerCounters[sIdx].size(); ++tIdx)
93
93
  {
94
94
  auto& temporalLayerCounter = this->spatialLayerCounters[sIdx][tIdx];
95
95
 
@@ -118,7 +118,7 @@ namespace RTC
118
118
 
119
119
  // clang-format off
120
120
  for (
121
- uint8_t tIdx{ 0u };
121
+ size_t tIdx{ 0u };
122
122
  tIdx < this->spatialLayerCounters[spatialLayer].size();
123
123
  ++tIdx
124
124
  )