mediasoup 3.16.0 → 3.16.1
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/node/lib/fbs/consumer/degrade-request.d.ts +30 -0
- package/node/lib/fbs/consumer/degrade-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/degrade-request.js +91 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +24 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +1 -0
- package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +69 -0
- package/package.json +11 -11
- package/worker/include/Logger.hpp +13 -0
- package/worker/include/RTC/PipeConsumer.hpp +12 -0
- package/worker/include/RTC/RtcLogger.hpp +7 -7
- package/worker/include/RTC/SimpleConsumer.hpp +7 -0
- package/worker/include/RTC/SimulcastConsumer.hpp +9 -1
- package/worker/include/RTC/SvcConsumer.hpp +8 -1
- package/worker/meson.build +4 -4
- package/worker/meson_options.txt +1 -1
- package/worker/scripts/package-lock.json +14 -12
- package/worker/src/RTC/PipeConsumer.cpp +144 -26
- package/worker/src/RTC/Producer.cpp +6 -3
- package/worker/src/RTC/RtcLogger.cpp +28 -23
- package/worker/src/RTC/SCTP/association/Socket.cpp +2 -2
- package/worker/src/RTC/SimpleConsumer.cpp +122 -34
- package/worker/src/RTC/SimulcastConsumer.cpp +171 -44
- package/worker/src/RTC/SrtpSession.cpp +56 -11
- package/worker/src/RTC/SvcConsumer.cpp +114 -27
- package/worker/src/RTC/Transport.cpp +4 -1
- package/worker/src/lib.cpp +6 -0
- package/worker/subprojects/libsrtp3.wrap +8 -0
- package/worker/subprojects/libuv.wrap +9 -9
- package/worker/test/src/RTC/TestSeqManager.cpp +1 -1
- package/worker/subprojects/libsrtp2.wrap +0 -8
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
export declare class DegradeRequest implements flatbuffers.IUnpackableObject<DegradeRequestT> {
|
|
3
|
+
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
+
bb_pos: number;
|
|
5
|
+
__init(i: number, bb: flatbuffers.ByteBuffer): DegradeRequest;
|
|
6
|
+
static getRootAsDegradeRequest(bb: flatbuffers.ByteBuffer, obj?: DegradeRequest): DegradeRequest;
|
|
7
|
+
static getSizePrefixedRootAsDegradeRequest(bb: flatbuffers.ByteBuffer, obj?: DegradeRequest): DegradeRequest;
|
|
8
|
+
durationMs(): number;
|
|
9
|
+
maxDelayMs(): number;
|
|
10
|
+
delayPercent(): number;
|
|
11
|
+
lossPercent(): number;
|
|
12
|
+
static startDegradeRequest(builder: flatbuffers.Builder): void;
|
|
13
|
+
static addDurationMs(builder: flatbuffers.Builder, durationMs: number): void;
|
|
14
|
+
static addMaxDelayMs(builder: flatbuffers.Builder, maxDelayMs: number): void;
|
|
15
|
+
static addDelayPercent(builder: flatbuffers.Builder, delayPercent: number): void;
|
|
16
|
+
static addLossPercent(builder: flatbuffers.Builder, lossPercent: number): void;
|
|
17
|
+
static endDegradeRequest(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
18
|
+
static createDegradeRequest(builder: flatbuffers.Builder, durationMs: number, maxDelayMs: number, delayPercent: number, lossPercent: number): flatbuffers.Offset;
|
|
19
|
+
unpack(): DegradeRequestT;
|
|
20
|
+
unpackTo(_o: DegradeRequestT): void;
|
|
21
|
+
}
|
|
22
|
+
export declare class DegradeRequestT implements flatbuffers.IGeneratedObject {
|
|
23
|
+
durationMs: number;
|
|
24
|
+
maxDelayMs: number;
|
|
25
|
+
delayPercent: number;
|
|
26
|
+
lossPercent: number;
|
|
27
|
+
constructor(durationMs?: number, maxDelayMs?: number, delayPercent?: number, lossPercent?: number);
|
|
28
|
+
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=degrade-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"degrade-request.d.ts","sourceRoot":"","sources":["../../../src/fbs/consumer/degrade-request.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,cAAe,YAAW,WAAW,CAAC,iBAAiB,CAAC,eAAe,CAAC;IACnF,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,cAAc;IAM5D,MAAM,CAAC,uBAAuB,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,cAAc,GAAE,cAAc;IAI7F,MAAM,CAAC,mCAAmC,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,cAAc,GAAE,cAAc;IAKzG,UAAU,IAAG,MAAM;IAKnB,UAAU,IAAG,MAAM;IAKnB,YAAY,IAAG,MAAM;IAKrB,WAAW,IAAG,MAAM;IAKpB,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO;IAItD,MAAM,CAAC,aAAa,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,UAAU,EAAC,MAAM;IAInE,MAAM,CAAC,aAAa,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,UAAU,EAAC,MAAM;IAInE,MAAM,CAAC,eAAe,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,YAAY,EAAC,MAAM;IAIvE,MAAM,CAAC,cAAc,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,WAAW,EAAC,MAAM;IAIrE,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAKxE,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,UAAU,EAAC,MAAM,EAAE,UAAU,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,EAAE,WAAW,EAAC,MAAM,GAAE,WAAW,CAAC,MAAM;IAS1J,MAAM,IAAI,eAAe;IAUzB,QAAQ,CAAC,EAAE,EAAE,eAAe,GAAG,IAAI;CAMlC;AAED,qBAAa,eAAgB,YAAW,WAAW,CAAC,gBAAgB;IAE3D,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,MAAM;IAClB,YAAY,EAAE,MAAM;IACpB,WAAW,EAAE,MAAM;gBAHnB,UAAU,GAAE,MAAU,EACtB,UAAU,GAAE,MAAU,EACtB,YAAY,GAAE,MAAU,EACxB,WAAW,GAAE,MAAU;IAIhC,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAQpD"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DegradeRequestT = exports.DegradeRequest = void 0;
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
6
|
+
const flatbuffers = require("flatbuffers");
|
|
7
|
+
class DegradeRequest {
|
|
8
|
+
bb = null;
|
|
9
|
+
bb_pos = 0;
|
|
10
|
+
__init(i, bb) {
|
|
11
|
+
this.bb_pos = i;
|
|
12
|
+
this.bb = bb;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
static getRootAsDegradeRequest(bb, obj) {
|
|
16
|
+
return (obj || new DegradeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
17
|
+
}
|
|
18
|
+
static getSizePrefixedRootAsDegradeRequest(bb, obj) {
|
|
19
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
|
+
return (obj || new DegradeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
+
}
|
|
22
|
+
durationMs() {
|
|
23
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
+
return offset ? this.bb.readUint32(this.bb_pos + offset) : 0;
|
|
25
|
+
}
|
|
26
|
+
maxDelayMs() {
|
|
27
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
28
|
+
return offset ? this.bb.readUint16(this.bb_pos + offset) : 0;
|
|
29
|
+
}
|
|
30
|
+
delayPercent() {
|
|
31
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
32
|
+
return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
|
|
33
|
+
}
|
|
34
|
+
lossPercent() {
|
|
35
|
+
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
36
|
+
return offset ? this.bb.readUint8(this.bb_pos + offset) : 0;
|
|
37
|
+
}
|
|
38
|
+
static startDegradeRequest(builder) {
|
|
39
|
+
builder.startObject(4);
|
|
40
|
+
}
|
|
41
|
+
static addDurationMs(builder, durationMs) {
|
|
42
|
+
builder.addFieldInt32(0, durationMs, 0);
|
|
43
|
+
}
|
|
44
|
+
static addMaxDelayMs(builder, maxDelayMs) {
|
|
45
|
+
builder.addFieldInt16(1, maxDelayMs, 0);
|
|
46
|
+
}
|
|
47
|
+
static addDelayPercent(builder, delayPercent) {
|
|
48
|
+
builder.addFieldInt8(2, delayPercent, 0);
|
|
49
|
+
}
|
|
50
|
+
static addLossPercent(builder, lossPercent) {
|
|
51
|
+
builder.addFieldInt8(3, lossPercent, 0);
|
|
52
|
+
}
|
|
53
|
+
static endDegradeRequest(builder) {
|
|
54
|
+
const offset = builder.endObject();
|
|
55
|
+
return offset;
|
|
56
|
+
}
|
|
57
|
+
static createDegradeRequest(builder, durationMs, maxDelayMs, delayPercent, lossPercent) {
|
|
58
|
+
DegradeRequest.startDegradeRequest(builder);
|
|
59
|
+
DegradeRequest.addDurationMs(builder, durationMs);
|
|
60
|
+
DegradeRequest.addMaxDelayMs(builder, maxDelayMs);
|
|
61
|
+
DegradeRequest.addDelayPercent(builder, delayPercent);
|
|
62
|
+
DegradeRequest.addLossPercent(builder, lossPercent);
|
|
63
|
+
return DegradeRequest.endDegradeRequest(builder);
|
|
64
|
+
}
|
|
65
|
+
unpack() {
|
|
66
|
+
return new DegradeRequestT(this.durationMs(), this.maxDelayMs(), this.delayPercent(), this.lossPercent());
|
|
67
|
+
}
|
|
68
|
+
unpackTo(_o) {
|
|
69
|
+
_o.durationMs = this.durationMs();
|
|
70
|
+
_o.maxDelayMs = this.maxDelayMs();
|
|
71
|
+
_o.delayPercent = this.delayPercent();
|
|
72
|
+
_o.lossPercent = this.lossPercent();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.DegradeRequest = DegradeRequest;
|
|
76
|
+
class DegradeRequestT {
|
|
77
|
+
durationMs;
|
|
78
|
+
maxDelayMs;
|
|
79
|
+
delayPercent;
|
|
80
|
+
lossPercent;
|
|
81
|
+
constructor(durationMs = 0, maxDelayMs = 0, delayPercent = 0, lossPercent = 0) {
|
|
82
|
+
this.durationMs = durationMs;
|
|
83
|
+
this.maxDelayMs = maxDelayMs;
|
|
84
|
+
this.delayPercent = delayPercent;
|
|
85
|
+
this.lossPercent = lossPercent;
|
|
86
|
+
}
|
|
87
|
+
pack(builder) {
|
|
88
|
+
return DegradeRequest.createDegradeRequest(builder, this.durationMs, this.maxDelayMs, this.delayPercent, this.lossPercent);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.DegradeRequestT = DegradeRequestT;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
export declare class EnableDelayAndLossRequest implements flatbuffers.IUnpackableObject<EnableDelayAndLossRequestT> {
|
|
3
|
+
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
+
bb_pos: number;
|
|
5
|
+
__init(i: number, bb: flatbuffers.ByteBuffer): EnableDelayAndLossRequest;
|
|
6
|
+
static getRootAsEnableDelayAndLossRequest(bb: flatbuffers.ByteBuffer, obj?: EnableDelayAndLossRequest): EnableDelayAndLossRequest;
|
|
7
|
+
static getSizePrefixedRootAsEnableDelayAndLossRequest(bb: flatbuffers.ByteBuffer, obj?: EnableDelayAndLossRequest): EnableDelayAndLossRequest;
|
|
8
|
+
delay(): boolean;
|
|
9
|
+
loss(): boolean;
|
|
10
|
+
static startEnableDelayAndLossRequest(builder: flatbuffers.Builder): void;
|
|
11
|
+
static addDelay(builder: flatbuffers.Builder, delay: boolean): void;
|
|
12
|
+
static addLoss(builder: flatbuffers.Builder, loss: boolean): void;
|
|
13
|
+
static endEnableDelayAndLossRequest(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
14
|
+
static createEnableDelayAndLossRequest(builder: flatbuffers.Builder, delay: boolean, loss: boolean): flatbuffers.Offset;
|
|
15
|
+
unpack(): EnableDelayAndLossRequestT;
|
|
16
|
+
unpackTo(_o: EnableDelayAndLossRequestT): void;
|
|
17
|
+
}
|
|
18
|
+
export declare class EnableDelayAndLossRequestT implements flatbuffers.IGeneratedObject {
|
|
19
|
+
delay: boolean;
|
|
20
|
+
loss: boolean;
|
|
21
|
+
constructor(delay?: boolean, loss?: boolean);
|
|
22
|
+
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=enable-delay-and-loss-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable-delay-and-loss-request.d.ts","sourceRoot":"","sources":["../../../src/fbs/consumer/enable-delay-and-loss-request.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,yBAA0B,YAAW,WAAW,CAAC,iBAAiB,CAAC,0BAA0B,CAAC;IACzG,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,yBAAyB;IAMvE,MAAM,CAAC,kCAAkC,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,yBAAyB,GAAE,yBAAyB;IAI9H,MAAM,CAAC,8CAA8C,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,yBAAyB,GAAE,yBAAyB;IAK1I,KAAK,IAAG,OAAO;IAKf,IAAI,IAAG,OAAO;IAKd,MAAM,CAAC,8BAA8B,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO;IAIjE,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,KAAK,EAAC,OAAO;IAI1D,MAAM,CAAC,OAAO,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAC,OAAO;IAIxD,MAAM,CAAC,4BAA4B,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAKnF,MAAM,CAAC,+BAA+B,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,KAAK,EAAC,OAAO,EAAE,IAAI,EAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAOnH,MAAM,IAAI,0BAA0B;IAQpC,QAAQ,CAAC,EAAE,EAAE,0BAA0B,GAAG,IAAI;CAI7C;AAED,qBAAa,0BAA2B,YAAW,WAAW,CAAC,gBAAgB;IAEtE,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,OAAO;gBADb,KAAK,GAAE,OAAe,EACtB,IAAI,GAAE,OAAe;IAI9B,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAMpD"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.EnableDelayAndLossRequestT = exports.EnableDelayAndLossRequest = void 0;
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
|
|
6
|
+
const flatbuffers = require("flatbuffers");
|
|
7
|
+
class EnableDelayAndLossRequest {
|
|
8
|
+
bb = null;
|
|
9
|
+
bb_pos = 0;
|
|
10
|
+
__init(i, bb) {
|
|
11
|
+
this.bb_pos = i;
|
|
12
|
+
this.bb = bb;
|
|
13
|
+
return this;
|
|
14
|
+
}
|
|
15
|
+
static getRootAsEnableDelayAndLossRequest(bb, obj) {
|
|
16
|
+
return (obj || new EnableDelayAndLossRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
17
|
+
}
|
|
18
|
+
static getSizePrefixedRootAsEnableDelayAndLossRequest(bb, obj) {
|
|
19
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
20
|
+
return (obj || new EnableDelayAndLossRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
21
|
+
}
|
|
22
|
+
delay() {
|
|
23
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
24
|
+
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
|
25
|
+
}
|
|
26
|
+
loss() {
|
|
27
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
28
|
+
return offset ? !!this.bb.readInt8(this.bb_pos + offset) : false;
|
|
29
|
+
}
|
|
30
|
+
static startEnableDelayAndLossRequest(builder) {
|
|
31
|
+
builder.startObject(2);
|
|
32
|
+
}
|
|
33
|
+
static addDelay(builder, delay) {
|
|
34
|
+
builder.addFieldInt8(0, +delay, +false);
|
|
35
|
+
}
|
|
36
|
+
static addLoss(builder, loss) {
|
|
37
|
+
builder.addFieldInt8(1, +loss, +false);
|
|
38
|
+
}
|
|
39
|
+
static endEnableDelayAndLossRequest(builder) {
|
|
40
|
+
const offset = builder.endObject();
|
|
41
|
+
return offset;
|
|
42
|
+
}
|
|
43
|
+
static createEnableDelayAndLossRequest(builder, delay, loss) {
|
|
44
|
+
EnableDelayAndLossRequest.startEnableDelayAndLossRequest(builder);
|
|
45
|
+
EnableDelayAndLossRequest.addDelay(builder, delay);
|
|
46
|
+
EnableDelayAndLossRequest.addLoss(builder, loss);
|
|
47
|
+
return EnableDelayAndLossRequest.endEnableDelayAndLossRequest(builder);
|
|
48
|
+
}
|
|
49
|
+
unpack() {
|
|
50
|
+
return new EnableDelayAndLossRequestT(this.delay(), this.loss());
|
|
51
|
+
}
|
|
52
|
+
unpackTo(_o) {
|
|
53
|
+
_o.delay = this.delay();
|
|
54
|
+
_o.loss = this.loss();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.EnableDelayAndLossRequest = EnableDelayAndLossRequest;
|
|
58
|
+
class EnableDelayAndLossRequestT {
|
|
59
|
+
delay;
|
|
60
|
+
loss;
|
|
61
|
+
constructor(delay = false, loss = false) {
|
|
62
|
+
this.delay = delay;
|
|
63
|
+
this.loss = loss;
|
|
64
|
+
}
|
|
65
|
+
pack(builder) {
|
|
66
|
+
return EnableDelayAndLossRequest.createEnableDelayAndLossRequest(builder, this.delay, this.loss);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.EnableDelayAndLossRequestT = EnableDelayAndLossRequestT;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.1",
|
|
4
4
|
"description": "Cutting Edge WebRTC Video Conferencing",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -100,24 +100,24 @@
|
|
|
100
100
|
"tar": "^7.4.3"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
|
-
"@eslint/js": "^9.
|
|
103
|
+
"@eslint/js": "^9.29.0",
|
|
104
104
|
"@octokit/rest": "^22.0.0",
|
|
105
105
|
"@types/debug": "^4.1.12",
|
|
106
|
-
"@types/jest": "^
|
|
107
|
-
"@types/node": "^
|
|
108
|
-
"eslint": "^9.
|
|
106
|
+
"@types/jest": "^30.0.0",
|
|
107
|
+
"@types/node": "^24.0.4",
|
|
108
|
+
"eslint": "^9.29.0",
|
|
109
109
|
"eslint-config-prettier": "^10.1.5",
|
|
110
|
-
"eslint-plugin-jest": "^
|
|
111
|
-
"eslint-plugin-prettier": "^5.
|
|
110
|
+
"eslint-plugin-jest": "^29.0.1",
|
|
111
|
+
"eslint-plugin-prettier": "^5.5.1",
|
|
112
112
|
"globals": "^16.2.0",
|
|
113
|
-
"jest": "^
|
|
113
|
+
"jest": "^30.0.3",
|
|
114
114
|
"marked": "^15.0.12",
|
|
115
115
|
"open-cli": "^8.0.0",
|
|
116
116
|
"pick-port": "^2.1.0",
|
|
117
|
-
"prettier": "^3.
|
|
117
|
+
"prettier": "^3.6.1",
|
|
118
118
|
"sctp": "^1.0.0",
|
|
119
|
-
"ts-jest": "^29.
|
|
119
|
+
"ts-jest": "^29.4.0",
|
|
120
120
|
"typescript": "^5.8.3",
|
|
121
|
-
"typescript-eslint": "^8.
|
|
121
|
+
"typescript-eslint": "^8.35.0"
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -460,6 +460,7 @@ public:
|
|
|
460
460
|
} \
|
|
461
461
|
while (false)
|
|
462
462
|
|
|
463
|
+
#ifdef MS_EXECUTABLE
|
|
463
464
|
#define MS_ABORT(desc, ...) \
|
|
464
465
|
do \
|
|
465
466
|
{ \
|
|
@@ -468,6 +469,18 @@ public:
|
|
|
468
469
|
std::abort(); \
|
|
469
470
|
} \
|
|
470
471
|
while (false)
|
|
472
|
+
#else
|
|
473
|
+
#define MS_ABORT(desc, ...) \
|
|
474
|
+
do \
|
|
475
|
+
{ \
|
|
476
|
+
std::fprintf(stderr, "(ABORT) " _MS_LOG_STR_DESC desc _MS_LOG_SEPARATOR_CHAR_STD, _MS_LOG_ARG, ##__VA_ARGS__); \
|
|
477
|
+
std::fflush(stderr); \
|
|
478
|
+
char abortMessage[Logger::BufferSize]; \
|
|
479
|
+
std::snprintf(abortMessage, Logger::BufferSize, "(ABORT) " _MS_LOG_STR_DESC desc _MS_LOG_SEPARATOR_CHAR_STD, _MS_LOG_ARG, ##__VA_ARGS__); \
|
|
480
|
+
throw std::runtime_error(abortMessage); \
|
|
481
|
+
} \
|
|
482
|
+
while (false)
|
|
483
|
+
#endif
|
|
471
484
|
|
|
472
485
|
#define MS_ASSERT(condition, desc, ...) \
|
|
473
486
|
if (!(condition)) \
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
#include "RTC/Consumer.hpp"
|
|
5
5
|
#include "RTC/SeqManager.hpp"
|
|
6
6
|
#include "RTC/Shared.hpp"
|
|
7
|
+
#include <map>
|
|
7
8
|
|
|
8
9
|
namespace RTC
|
|
9
10
|
{
|
|
@@ -59,6 +60,11 @@ namespace RTC
|
|
|
59
60
|
void UserOnResumed() override;
|
|
60
61
|
void CreateRtpStreams();
|
|
61
62
|
void RequestKeyFrame();
|
|
63
|
+
void StorePacketInTargetLayerRetransmissionBuffer(
|
|
64
|
+
std::map<uint16_t, std::shared_ptr<RTC::RtpPacket>, RTC::SeqManager<uint16_t>::SeqLowerThan>&
|
|
65
|
+
targetLayerRetransmissionBuffer,
|
|
66
|
+
RTC::RtpPacket* packet,
|
|
67
|
+
std::shared_ptr<RTC::RtpPacket>& sharedPacket);
|
|
62
68
|
|
|
63
69
|
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
|
|
64
70
|
public:
|
|
@@ -75,6 +81,12 @@ namespace RTC
|
|
|
75
81
|
absl::flat_hash_map<RTC::RtpStreamSend*, bool> mapRtpStreamSyncRequired;
|
|
76
82
|
absl::flat_hash_map<RTC::RtpStreamSend*, std::unique_ptr<RTC::SeqManager<uint16_t>>>
|
|
77
83
|
mapRtpStreamRtpSeqManager;
|
|
84
|
+
// Buffers to store packets that arrive earlier than the first packet of the
|
|
85
|
+
// video key frame.
|
|
86
|
+
absl::flat_hash_map<
|
|
87
|
+
RTC::RtpStreamSend*,
|
|
88
|
+
std::map<uint16_t, std::shared_ptr<RTC::RtpPacket>, RTC::SeqManager<uint16_t>::SeqLowerThan>>
|
|
89
|
+
mapRtpStreamTargetLayerRetransmissionBuffer;
|
|
78
90
|
};
|
|
79
91
|
} // namespace RTC
|
|
80
92
|
|
|
@@ -11,7 +11,7 @@ namespace RTC
|
|
|
11
11
|
class RtpPacket
|
|
12
12
|
{
|
|
13
13
|
public:
|
|
14
|
-
enum class
|
|
14
|
+
enum class DiscardReason : uint8_t
|
|
15
15
|
{
|
|
16
16
|
NONE = 0,
|
|
17
17
|
PRODUCER_NOT_FOUND,
|
|
@@ -23,18 +23,18 @@ namespace RTC
|
|
|
23
23
|
NOT_A_KEYFRAME,
|
|
24
24
|
EMPTY_PAYLOAD,
|
|
25
25
|
SPATIAL_LAYER_MISMATCH,
|
|
26
|
-
TOO_HIGH_TIMESTAMP_EXTRA_NEEDED,
|
|
27
26
|
PACKET_PREVIOUS_TO_SPATIAL_LAYER_SWITCH,
|
|
28
27
|
DROPPED_BY_CODEC,
|
|
29
|
-
|
|
28
|
+
TOO_HIGH_TIMESTAMP_EXTRA_NEEDED,
|
|
29
|
+
SEND_RTP_STREAM_DISCARDED
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
static absl::flat_hash_map<
|
|
32
|
+
static absl::flat_hash_map<DiscardReason, std::string> discardReason2String;
|
|
33
33
|
|
|
34
34
|
RtpPacket() = default;
|
|
35
35
|
~RtpPacket() = default;
|
|
36
36
|
void Sent();
|
|
37
|
-
void
|
|
37
|
+
void Discarded(DiscardReason discardReason);
|
|
38
38
|
|
|
39
39
|
private:
|
|
40
40
|
void Log() const;
|
|
@@ -51,8 +51,8 @@ namespace RTC
|
|
|
51
51
|
uint32_t sendRtpTimestamp{};
|
|
52
52
|
uint16_t recvSeqNumber{};
|
|
53
53
|
uint16_t sendSeqNumber{};
|
|
54
|
-
bool
|
|
55
|
-
|
|
54
|
+
bool discarded{};
|
|
55
|
+
DiscardReason discardReason{ DiscardReason::NONE };
|
|
56
56
|
};
|
|
57
57
|
}; // namespace RtcLogger
|
|
58
58
|
} // namespace RTC
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
#include "RTC/Consumer.hpp"
|
|
6
6
|
#include "RTC/SeqManager.hpp"
|
|
7
7
|
#include "RTC/Shared.hpp"
|
|
8
|
+
#include <map>
|
|
8
9
|
|
|
9
10
|
namespace RTC
|
|
10
11
|
{
|
|
@@ -72,6 +73,8 @@ namespace RTC
|
|
|
72
73
|
void UserOnResumed() override;
|
|
73
74
|
void CreateRtpStream();
|
|
74
75
|
void RequestKeyFrame();
|
|
76
|
+
void StorePacketInTargetLayerRetransmissionBuffer(
|
|
77
|
+
RTC::RtpPacket* packet, std::shared_ptr<RTC::RtpPacket>& sharedPacket);
|
|
75
78
|
void EmitScore() const;
|
|
76
79
|
|
|
77
80
|
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
|
|
@@ -90,6 +93,10 @@ namespace RTC
|
|
|
90
93
|
std::unique_ptr<RTC::SeqManager<uint16_t>> rtpSeqManager;
|
|
91
94
|
bool managingBitrate{ false };
|
|
92
95
|
std::unique_ptr<RTC::Codecs::EncodingContext> encodingContext;
|
|
96
|
+
// Buffer to store packets that arrive earlier than the first packet of the
|
|
97
|
+
// video key frame.
|
|
98
|
+
std::map<uint16_t, std::shared_ptr<RTC::RtpPacket>, RTC::SeqManager<uint16_t>::SeqLowerThan>
|
|
99
|
+
targetLayerRetransmissionBuffer;
|
|
93
100
|
};
|
|
94
101
|
} // namespace RTC
|
|
95
102
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
#include "RTC/Consumer.hpp"
|
|
7
7
|
#include "RTC/SeqManager.hpp"
|
|
8
8
|
#include "RTC/Shared.hpp"
|
|
9
|
+
#include <map>
|
|
9
10
|
|
|
10
11
|
namespace RTC
|
|
11
12
|
{
|
|
@@ -95,6 +96,8 @@ namespace RTC
|
|
|
95
96
|
void UpdateTargetLayers(int16_t newTargetSpatialLayer, int16_t newTargetTemporalLayer);
|
|
96
97
|
bool CanSwitchToSpatialLayer(int16_t spatialLayer) const;
|
|
97
98
|
void EmitScore() const;
|
|
99
|
+
void StorePacketInTargetLayerRetransmissionBuffer(
|
|
100
|
+
RTC::RtpPacket* packet, std::shared_ptr<RTC::RtpPacket>& sharedPacket);
|
|
98
101
|
void EmitLayersChange() const;
|
|
99
102
|
RTC::RtpStreamRecv* GetProducerCurrentRtpStream() const;
|
|
100
103
|
RTC::RtpStreamRecv* GetProducerTargetRtpStream() const;
|
|
@@ -129,7 +132,12 @@ namespace RTC
|
|
|
129
132
|
std::unique_ptr<RTC::Codecs::EncodingContext> encodingContext;
|
|
130
133
|
uint32_t tsOffset{ 0u }; // RTP Timestamp offset.
|
|
131
134
|
bool keyFrameForTsOffsetRequested{ false };
|
|
132
|
-
|
|
135
|
+
// Last time we moved to lower spatial layer due to BWE.
|
|
136
|
+
uint64_t lastBweDowngradeAtMs{ 0u };
|
|
137
|
+
// Buffer to store packets that arrive earlier than the first packet of the
|
|
138
|
+
// video key frame.
|
|
139
|
+
std::map<uint16_t, std::shared_ptr<RTC::RtpPacket>, RTC::SeqManager<uint16_t>::SeqLowerThan>
|
|
140
|
+
targetLayerRetransmissionBuffer;
|
|
133
141
|
};
|
|
134
142
|
} // namespace RTC
|
|
135
143
|
|
|
@@ -86,6 +86,8 @@ namespace RTC
|
|
|
86
86
|
bool RecalculateTargetLayers(int16_t& newTargetSpatialLayer, int16_t& newTargetTemporalLayer) const;
|
|
87
87
|
void UpdateTargetLayers(int16_t newTargetSpatialLayer, int16_t newTargetTemporalLayer);
|
|
88
88
|
void EmitScore() const;
|
|
89
|
+
void StorePacketInTargetLayerRetransmissionBuffer(
|
|
90
|
+
RTC::RtpPacket* packet, std::shared_ptr<RTC::RtpPacket>& sharedPacket);
|
|
89
91
|
void EmitLayersChange() const;
|
|
90
92
|
|
|
91
93
|
/* Pure virtual methods inherited from RtpStreamSend::Listener. */
|
|
@@ -106,7 +108,12 @@ namespace RTC
|
|
|
106
108
|
int16_t provisionalTargetSpatialLayer{ -1 };
|
|
107
109
|
int16_t provisionalTargetTemporalLayer{ -1 };
|
|
108
110
|
std::unique_ptr<RTC::Codecs::EncodingContext> encodingContext;
|
|
109
|
-
|
|
111
|
+
// Last time we moved to lower spatial layer due to BWE.
|
|
112
|
+
uint64_t lastBweDowngradeAtMs{ 0u };
|
|
113
|
+
// Buffer to store packets that arrive earlier than the first packet of the
|
|
114
|
+
// video key frame.
|
|
115
|
+
std::map<uint16_t, std::shared_ptr<RTC::RtpPacket>, RTC::SeqManager<uint16_t>::SeqLowerThan>
|
|
116
|
+
targetLayerRetransmissionBuffer;
|
|
110
117
|
};
|
|
111
118
|
} // namespace RTC
|
|
112
119
|
|
package/worker/meson.build
CHANGED
|
@@ -259,8 +259,8 @@ libuv_proj = subproject(
|
|
|
259
259
|
],
|
|
260
260
|
)
|
|
261
261
|
|
|
262
|
-
|
|
263
|
-
'
|
|
262
|
+
libsrtp3_proj = subproject(
|
|
263
|
+
'libsrtp3',
|
|
264
264
|
default_options: [
|
|
265
265
|
'warning_level=0',
|
|
266
266
|
'crypto-library=openssl',
|
|
@@ -310,7 +310,7 @@ dependencies = [
|
|
|
310
310
|
abseil_cpp_proj.get_variable('absl_container_dep'),
|
|
311
311
|
openssl_proj.get_variable('openssl_dep'),
|
|
312
312
|
libuv_proj.get_variable('libuv_dep'),
|
|
313
|
-
|
|
313
|
+
libsrtp3_proj.get_variable('libsrtp3_dep'),
|
|
314
314
|
usrsctp_proj.get_variable('usrsctp_dep'),
|
|
315
315
|
flatbuffers_proj.get_variable('flatbuffers_dep'),
|
|
316
316
|
flatbuffers_generator_dep,
|
|
@@ -322,7 +322,7 @@ link_whole = [
|
|
|
322
322
|
openssl_proj.get_variable('libcrypto_lib'),
|
|
323
323
|
openssl_proj.get_variable('libssl_lib'),
|
|
324
324
|
libuv_proj.get_variable('libuv'),
|
|
325
|
-
|
|
325
|
+
libsrtp3_proj.get_variable('libsrtp3'),
|
|
326
326
|
usrsctp_proj.get_variable('usrsctp'),
|
|
327
327
|
flatbuffers_proj.get_variable('flatbuffers_lib'),
|
|
328
328
|
libwebrtc,
|
package/worker/meson_options.txt
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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
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')
|
|
3
|
+
option('ms_rtc_logger_rtp', type : 'boolean', value : false, description : 'When set to true, prints a line with information for each processed RTP packet')
|
|
4
4
|
option('ms_disable_liburing', type : 'boolean', value : false, description : 'When set to true, disables liburing integration despite current host supports it')
|
|
5
5
|
option('ms_sctp_stack', type : 'boolean', value : false, description : 'When set to true, uses mediasoup SCTP stack instead of usrsctp library')
|
|
@@ -121,9 +121,10 @@
|
|
|
121
121
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
|
122
122
|
},
|
|
123
123
|
"node_modules/brace-expansion": {
|
|
124
|
-
"version": "2.0.
|
|
125
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.
|
|
126
|
-
"integrity": "sha512-
|
|
124
|
+
"version": "2.0.2",
|
|
125
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
|
126
|
+
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
|
127
|
+
"license": "MIT",
|
|
127
128
|
"dependencies": {
|
|
128
129
|
"balanced-match": "^1.0.0"
|
|
129
130
|
}
|
|
@@ -144,9 +145,10 @@
|
|
|
144
145
|
}
|
|
145
146
|
},
|
|
146
147
|
"node_modules/clang-format/node_modules/brace-expansion": {
|
|
147
|
-
"version": "1.1.
|
|
148
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.
|
|
149
|
-
"integrity": "sha512-
|
|
148
|
+
"version": "1.1.12",
|
|
149
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
|
150
|
+
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
|
151
|
+
"license": "MIT",
|
|
150
152
|
"dependencies": {
|
|
151
153
|
"balanced-match": "^1.0.0",
|
|
152
154
|
"concat-map": "0.0.1"
|
|
@@ -674,9 +676,9 @@
|
|
|
674
676
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
|
675
677
|
},
|
|
676
678
|
"brace-expansion": {
|
|
677
|
-
"version": "2.0.
|
|
678
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.
|
|
679
|
-
"integrity": "sha512-
|
|
679
|
+
"version": "2.0.2",
|
|
680
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
|
|
681
|
+
"integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
|
|
680
682
|
"requires": {
|
|
681
683
|
"balanced-match": "^1.0.0"
|
|
682
684
|
}
|
|
@@ -692,9 +694,9 @@
|
|
|
692
694
|
},
|
|
693
695
|
"dependencies": {
|
|
694
696
|
"brace-expansion": {
|
|
695
|
-
"version": "1.1.
|
|
696
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.
|
|
697
|
-
"integrity": "sha512-
|
|
697
|
+
"version": "1.1.12",
|
|
698
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
|
|
699
|
+
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
|
|
698
700
|
"requires": {
|
|
699
701
|
"balanced-match": "^1.0.0",
|
|
700
702
|
"concat-map": "0.0.1"
|