Unverified 提交 4b3acdc6 authored 作者: Rémi Kalbe's avatar Rémi Kalbe 提交者: GitHub

Merge branch 'versatica:v3' into v3

# Changelog # Changelog
### WIP ### 3.9.8
* Fix VP9 kSVC forwarding logic to not forward lower unneded layers (PR #778 by @ggarber).
* Fix update bandwidth estimation configuration and available bitrate when updating max outgoing bitrate (PR #779 by @ggarber).
* Replace outdated `random-numbers` package by native `crypto.randomInt()` (PR #776 by @piranna). * Replace outdated `random-numbers` package by native `crypto.randomInt()` (PR #776 by @piranna).
* Update NPM deps and TypeScript version.
### 3.9.7 ### 3.9.7
......
...@@ -81,7 +81,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter { ...@@ -81,7 +81,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter {
// options // options
{ {
env: { env: {
MEDIASOUP_VERSION: '3.9.7', MEDIASOUP_VERSION: '3.9.8',
// Let the worker process inherit all environment variables, useful // Let the worker process inherit all environment variables, useful
// if a custom and not in the path GCC is used so the user can set // if a custom and not in the path GCC is used so the user can set
// LD_LIBRARY_PATH environment variable for runtime. // LD_LIBRARY_PATH environment variable for runtime.
......
...@@ -9,7 +9,7 @@ export { types }; ...@@ -9,7 +9,7 @@ export { types };
/** /**
* Expose mediasoup version. * Expose mediasoup version.
*/ */
export declare const version = "3.9.7"; export declare const version = "3.9.8";
/** /**
* Expose parseScalabilityMode() function. * Expose parseScalabilityMode() function.
*/ */
......
...@@ -11,7 +11,7 @@ exports.types = types; ...@@ -11,7 +11,7 @@ exports.types = types;
/** /**
* Expose mediasoup version. * Expose mediasoup version.
*/ */
exports.version = '3.9.7'; exports.version = '3.9.8';
/** /**
* Expose parseScalabilityMode() function. * Expose parseScalabilityMode() function.
*/ */
......
"use strict"; "use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) { }) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k; if (k2 === undefined) k2 = k;
o[k2] = m[k]; o[k2] = m[k];
......
{ {
"name": "mediasoup", "name": "mediasoup",
"version": "3.9.7", "version": "3.9.8",
"description": "Cutting Edge WebRTC Video Conferencing", "description": "Cutting Edge WebRTC Video Conferencing",
"contributors": [ "contributors": [
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)", "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
...@@ -78,9 +78,9 @@ ...@@ -78,9 +78,9 @@
"devDependencies": { "devDependencies": {
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",
"@types/uuid": "^8.3.4", "@types/uuid": "^8.3.4",
"@typescript-eslint/eslint-plugin": "^5.12.1", "@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.12.1", "@typescript-eslint/parser": "^5.13.0",
"eslint": "^8.9.0", "eslint": "^8.10.0",
"eslint-plugin-jest": "^26.1.1", "eslint-plugin-jest": "^26.1.1",
"jest": "^27.5.1", "jest": "^27.5.1",
"jest-tobetype": "^1.2.3", "jest-tobetype": "^1.2.3",
...@@ -88,6 +88,6 @@ ...@@ -88,6 +88,6 @@
"pick-port": "^1.0.0", "pick-port": "^1.0.0",
"sctp": "^1.0.0", "sctp": "^1.0.0",
"tsc-watch": "^4.6.0", "tsc-watch": "^4.6.0",
"typescript": "^4.5.5" "typescript": "^4.6.2"
} }
} }
...@@ -83,6 +83,7 @@ namespace RTC ...@@ -83,6 +83,7 @@ namespace RTC
private: private:
void MayEmitAvailableBitrateEvent(uint32_t previousAvailableBitrate); void MayEmitAvailableBitrateEvent(uint32_t previousAvailableBitrate);
void UpdatePacketLoss(double packetLoss); void UpdatePacketLoss(double packetLoss);
void ApplyBitrateUpdates();
void InitializeController(); void InitializeController();
void DestroyController(); void DestroyController();
......
...@@ -281,9 +281,17 @@ namespace RTC ...@@ -281,9 +281,17 @@ namespace RTC
} }
} }
// Filter spatial layers higher than current one (unless old packet). // Unless old packet filter spatial layers that are either
if (packetSpatialLayer > tmpSpatialLayer && !isOldPacket) // * higher than current one
// * different than the current one when KSVC is enabled and this is not a keyframe
// (interframe p bit = 1)
if (
!isOldPacket &&
(packetSpatialLayer > tmpSpatialLayer ||
(context->IsKSvc() && this->payloadDescriptor->p && packetSpatialLayer != tmpSpatialLayer)))
{
return false; return false;
}
// Check and handle temporal layer (unless old packet). // Check and handle temporal layer (unless old packet).
if (!isOldPacket) if (!isOldPacket)
......
...@@ -269,6 +269,14 @@ namespace RTC ...@@ -269,6 +269,14 @@ namespace RTC
MS_THROW_ERROR("maxOutgoingBitrate must be >= 30000bps"); MS_THROW_ERROR("maxOutgoingBitrate must be >= 30000bps");
this->maxOutgoingBitrate = maxBitrate; this->maxOutgoingBitrate = maxBitrate;
ApplyBitrateUpdates();
if (this->maxOutgoingBitrate > 0u)
{
this->bitrates.availableBitrate =
std::min<uint32_t>(this->maxOutgoingBitrate, this->bitrates.availableBitrate);
}
} }
void TransportCongestionControlClient::SetDesiredBitrate(uint32_t desiredBitrate, bool force) void TransportCongestionControlClient::SetDesiredBitrate(uint32_t desiredBitrate, bool force)
...@@ -290,6 +298,11 @@ namespace RTC ...@@ -290,6 +298,11 @@ namespace RTC
// more stable values. // more stable values.
this->bitrates.startBitrate = std::max<uint32_t>(MinBitrate, this->bitrates.availableBitrate); this->bitrates.startBitrate = std::max<uint32_t>(MinBitrate, this->bitrates.availableBitrate);
ApplyBitrateUpdates();
}
void TransportCongestionControlClient::ApplyBitrateUpdates()
{
auto currentMaxBitrate = this->bitrates.maxBitrate; auto currentMaxBitrate = this->bitrates.maxBitrate;
uint32_t newMaxBitrate = 0; uint32_t newMaxBitrate = 0;
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论