mediasoup 3.13.6 → 3.13.7
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/Worker.d.ts +5 -0
- package/node/lib/Worker.d.ts.map +1 -1
- package/node/lib/Worker.js +10 -1
- package/node/lib/fbs/lib-uring/dump.d.ts +27 -0
- package/node/lib/fbs/lib-uring/dump.d.ts.map +1 -0
- package/node/lib/fbs/lib-uring/dump.js +79 -0
- package/node/lib/fbs/lib-uring.d.ts +2 -0
- package/node/lib/fbs/lib-uring.d.ts.map +1 -0
- package/node/lib/fbs/lib-uring.js +7 -0
- package/node/lib/fbs/worker/dump-response.d.ts +5 -1
- package/node/lib/fbs/worker/dump-response.d.ts.map +1 -1
- package/node/lib/fbs/worker/dump-response.js +16 -3
- package/node/lib/tests/test-Router.js +1 -1
- package/node/lib/tests/test-WebRtcServer.js +3 -3
- package/node/lib/tests/test-Worker.js +1 -1
- package/npm-scripts.mjs +4 -12
- package/package.json +14 -15
- package/worker/fbs/liburing.fbs +8 -0
- package/worker/fbs/meson.build +1 -0
- package/worker/fbs/worker.fbs +2 -0
- package/worker/include/DepLibUring.hpp +104 -0
- package/worker/include/handles/TcpConnectionHandle.hpp +4 -0
- package/worker/include/handles/UdpSocketHandle.hpp +4 -0
- package/worker/meson.build +23 -0
- package/worker/src/Channel/ChannelNotification.cpp +1 -6
- package/worker/src/Channel/ChannelRequest.cpp +1 -6
- package/worker/src/DepLibUring.cpp +449 -0
- package/worker/src/RTC/Router.cpp +13 -0
- package/worker/src/RTC/RtpStreamSend.cpp +13 -0
- package/worker/src/RTC/Transport.cpp +14 -1
- package/worker/src/Worker.cpp +23 -1
- package/worker/src/handles/TcpConnectionHandle.cpp +40 -3
- package/worker/src/handles/UdpSocketHandle.cpp +37 -0
- package/worker/src/lib.cpp +9 -0
- package/worker/subprojects/abseil-cpp.wrap +87 -8
- package/worker/subprojects/liburing.wrap +13 -0
- package/worker/subprojects/libuv.wrap +9 -9
- package/worker/subprojects/openssl.wrap +5 -5
- package/worker/subprojects/usrsctp.wrap +4 -4
- package/worker/tasks.py +1 -1
- package/worker/Makefile +0 -122
package/node/lib/Worker.d.ts
CHANGED
|
@@ -130,6 +130,11 @@ export type WorkerDump = {
|
|
|
130
130
|
channelRequestHandlers: string[];
|
|
131
131
|
channelNotificationHandlers: string[];
|
|
132
132
|
};
|
|
133
|
+
liburing?: {
|
|
134
|
+
sqeProcessCount: number;
|
|
135
|
+
sqeMissCount: number;
|
|
136
|
+
userDataMissCount: number;
|
|
137
|
+
};
|
|
133
138
|
};
|
|
134
139
|
export type WorkerEvents = {
|
|
135
140
|
died: [Error];
|
package/node/lib/Worker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Worker.d.ts","sourceRoot":"","sources":["../src/Worker.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,OAAO,KAAK,SAAS,MAAM,cAAc,CAAC;AAI1C,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjE,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,KAAK,GACL,MAAM,GACN,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,KAAK,GACL,OAAO,GACP,WAAW,GACX,KAAK,GACL,MAAM,GACN,SAAS,CAAC;AAEd,MAAM,MAAM,cAAc,CAAC,aAAa,SAAS,OAAO,GAAG,OAAO,IAClE;IACC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,EAA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AO,EACP,GAAE,aAAa,CAAC,aAAa,CAAM,GAAG,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IA0CtE,OAAO,CAAC,UAAU;CAkClB;AAED,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,SAAS,CAAC,YAAY,GAC5B,UAAU,CAwBZ"}
|
package/node/lib/Worker.js
CHANGED
|
@@ -395,7 +395,7 @@ class Worker extends EnhancedEventEmitter_1.EnhancedEventEmitter {
|
|
|
395
395
|
}
|
|
396
396
|
exports.Worker = Worker;
|
|
397
397
|
function parseWorkerDumpResponse(binary) {
|
|
398
|
-
|
|
398
|
+
const dump = {
|
|
399
399
|
pid: binary.pid(),
|
|
400
400
|
webRtcServerIds: (0, utils_1.parseVector)(binary, 'webRtcServerIds'),
|
|
401
401
|
routerIds: (0, utils_1.parseVector)(binary, 'routerIds'),
|
|
@@ -404,5 +404,14 @@ function parseWorkerDumpResponse(binary) {
|
|
|
404
404
|
channelNotificationHandlers: (0, utils_1.parseVector)(binary.channelMessageHandlers(), 'channelNotificationHandlers')
|
|
405
405
|
}
|
|
406
406
|
};
|
|
407
|
+
if (binary.liburing()) {
|
|
408
|
+
dump.liburing =
|
|
409
|
+
{
|
|
410
|
+
sqeProcessCount: Number(binary.liburing().sqeProcessCount()),
|
|
411
|
+
sqeMissCount: Number(binary.liburing().sqeMissCount()),
|
|
412
|
+
userDataMissCount: Number(binary.liburing().userDataMissCount())
|
|
413
|
+
};
|
|
414
|
+
}
|
|
415
|
+
return dump;
|
|
407
416
|
}
|
|
408
417
|
exports.parseWorkerDumpResponse = parseWorkerDumpResponse;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
export declare class Dump implements flatbuffers.IUnpackableObject<DumpT> {
|
|
3
|
+
bb: flatbuffers.ByteBuffer | null;
|
|
4
|
+
bb_pos: number;
|
|
5
|
+
__init(i: number, bb: flatbuffers.ByteBuffer): Dump;
|
|
6
|
+
static getRootAsDump(bb: flatbuffers.ByteBuffer, obj?: Dump): Dump;
|
|
7
|
+
static getSizePrefixedRootAsDump(bb: flatbuffers.ByteBuffer, obj?: Dump): Dump;
|
|
8
|
+
sqeProcessCount(): bigint;
|
|
9
|
+
sqeMissCount(): bigint;
|
|
10
|
+
userDataMissCount(): bigint;
|
|
11
|
+
static startDump(builder: flatbuffers.Builder): void;
|
|
12
|
+
static addSqeProcessCount(builder: flatbuffers.Builder, sqeProcessCount: bigint): void;
|
|
13
|
+
static addSqeMissCount(builder: flatbuffers.Builder, sqeMissCount: bigint): void;
|
|
14
|
+
static addUserDataMissCount(builder: flatbuffers.Builder, userDataMissCount: bigint): void;
|
|
15
|
+
static endDump(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
16
|
+
static createDump(builder: flatbuffers.Builder, sqeProcessCount: bigint, sqeMissCount: bigint, userDataMissCount: bigint): flatbuffers.Offset;
|
|
17
|
+
unpack(): DumpT;
|
|
18
|
+
unpackTo(_o: DumpT): void;
|
|
19
|
+
}
|
|
20
|
+
export declare class DumpT implements flatbuffers.IGeneratedObject {
|
|
21
|
+
sqeProcessCount: bigint;
|
|
22
|
+
sqeMissCount: bigint;
|
|
23
|
+
userDataMissCount: bigint;
|
|
24
|
+
constructor(sqeProcessCount?: bigint, sqeMissCount?: bigint, userDataMissCount?: bigint);
|
|
25
|
+
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=dump.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dump.d.ts","sourceRoot":"","sources":["../../../src/fbs/lib-uring/dump.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,IAAK,YAAW,WAAW,CAAC,iBAAiB,CAAC,KAAK,CAAC;IAC/D,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MA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C,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAOpD"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DumpT = exports.Dump = void 0;
|
|
5
|
+
const flatbuffers = require("flatbuffers");
|
|
6
|
+
class Dump {
|
|
7
|
+
bb = null;
|
|
8
|
+
bb_pos = 0;
|
|
9
|
+
__init(i, bb) {
|
|
10
|
+
this.bb_pos = i;
|
|
11
|
+
this.bb = bb;
|
|
12
|
+
return this;
|
|
13
|
+
}
|
|
14
|
+
static getRootAsDump(bb, obj) {
|
|
15
|
+
return (obj || new Dump()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
16
|
+
}
|
|
17
|
+
static getSizePrefixedRootAsDump(bb, obj) {
|
|
18
|
+
bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
|
|
19
|
+
return (obj || new Dump()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
|
|
20
|
+
}
|
|
21
|
+
sqeProcessCount() {
|
|
22
|
+
const offset = this.bb.__offset(this.bb_pos, 4);
|
|
23
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
24
|
+
}
|
|
25
|
+
sqeMissCount() {
|
|
26
|
+
const offset = this.bb.__offset(this.bb_pos, 6);
|
|
27
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
28
|
+
}
|
|
29
|
+
userDataMissCount() {
|
|
30
|
+
const offset = this.bb.__offset(this.bb_pos, 8);
|
|
31
|
+
return offset ? this.bb.readUint64(this.bb_pos + offset) : BigInt('0');
|
|
32
|
+
}
|
|
33
|
+
static startDump(builder) {
|
|
34
|
+
builder.startObject(3);
|
|
35
|
+
}
|
|
36
|
+
static addSqeProcessCount(builder, sqeProcessCount) {
|
|
37
|
+
builder.addFieldInt64(0, sqeProcessCount, BigInt('0'));
|
|
38
|
+
}
|
|
39
|
+
static addSqeMissCount(builder, sqeMissCount) {
|
|
40
|
+
builder.addFieldInt64(1, sqeMissCount, BigInt('0'));
|
|
41
|
+
}
|
|
42
|
+
static addUserDataMissCount(builder, userDataMissCount) {
|
|
43
|
+
builder.addFieldInt64(2, userDataMissCount, BigInt('0'));
|
|
44
|
+
}
|
|
45
|
+
static endDump(builder) {
|
|
46
|
+
const offset = builder.endObject();
|
|
47
|
+
return offset;
|
|
48
|
+
}
|
|
49
|
+
static createDump(builder, sqeProcessCount, sqeMissCount, userDataMissCount) {
|
|
50
|
+
Dump.startDump(builder);
|
|
51
|
+
Dump.addSqeProcessCount(builder, sqeProcessCount);
|
|
52
|
+
Dump.addSqeMissCount(builder, sqeMissCount);
|
|
53
|
+
Dump.addUserDataMissCount(builder, userDataMissCount);
|
|
54
|
+
return Dump.endDump(builder);
|
|
55
|
+
}
|
|
56
|
+
unpack() {
|
|
57
|
+
return new DumpT(this.sqeProcessCount(), this.sqeMissCount(), this.userDataMissCount());
|
|
58
|
+
}
|
|
59
|
+
unpackTo(_o) {
|
|
60
|
+
_o.sqeProcessCount = this.sqeProcessCount();
|
|
61
|
+
_o.sqeMissCount = this.sqeMissCount();
|
|
62
|
+
_o.userDataMissCount = this.userDataMissCount();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.Dump = Dump;
|
|
66
|
+
class DumpT {
|
|
67
|
+
sqeProcessCount;
|
|
68
|
+
sqeMissCount;
|
|
69
|
+
userDataMissCount;
|
|
70
|
+
constructor(sqeProcessCount = BigInt('0'), sqeMissCount = BigInt('0'), userDataMissCount = BigInt('0')) {
|
|
71
|
+
this.sqeProcessCount = sqeProcessCount;
|
|
72
|
+
this.sqeMissCount = sqeMissCount;
|
|
73
|
+
this.userDataMissCount = userDataMissCount;
|
|
74
|
+
}
|
|
75
|
+
pack(builder) {
|
|
76
|
+
return Dump.createDump(builder, this.sqeProcessCount, this.sqeMissCount, this.userDataMissCount);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.DumpT = DumpT;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib-uring.d.ts","sourceRoot":"","sources":["../../src/fbs/lib-uring.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// automatically generated by the FlatBuffers compiler, do not modify
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DumpT = exports.Dump = void 0;
|
|
5
|
+
var dump_1 = require("./lib-uring/dump");
|
|
6
|
+
Object.defineProperty(exports, "Dump", { enumerable: true, get: function () { return dump_1.Dump; } });
|
|
7
|
+
Object.defineProperty(exports, "DumpT", { enumerable: true, get: function () { return dump_1.DumpT; } });
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as flatbuffers from 'flatbuffers';
|
|
2
|
+
import { Dump, DumpT } from '../../fbs/lib-uring/dump';
|
|
2
3
|
import { ChannelMessageHandlers, ChannelMessageHandlersT } from '../../fbs/worker/channel-message-handlers';
|
|
3
4
|
export declare class DumpResponse implements flatbuffers.IUnpackableObject<DumpResponseT> {
|
|
4
5
|
bb: flatbuffers.ByteBuffer | null;
|
|
@@ -14,6 +15,7 @@ export declare class DumpResponse implements flatbuffers.IUnpackableObject<DumpR
|
|
|
14
15
|
routerIds(index: number, optionalEncoding: flatbuffers.Encoding): string | Uint8Array;
|
|
15
16
|
routerIdsLength(): number;
|
|
16
17
|
channelMessageHandlers(obj?: ChannelMessageHandlers): ChannelMessageHandlers | null;
|
|
18
|
+
liburing(obj?: Dump): Dump | null;
|
|
17
19
|
static startDumpResponse(builder: flatbuffers.Builder): void;
|
|
18
20
|
static addPid(builder: flatbuffers.Builder, pid: number): void;
|
|
19
21
|
static addWebRtcServerIds(builder: flatbuffers.Builder, webRtcServerIdsOffset: flatbuffers.Offset): void;
|
|
@@ -23,6 +25,7 @@ export declare class DumpResponse implements flatbuffers.IUnpackableObject<DumpR
|
|
|
23
25
|
static createRouterIdsVector(builder: flatbuffers.Builder, data: flatbuffers.Offset[]): flatbuffers.Offset;
|
|
24
26
|
static startRouterIdsVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
25
27
|
static addChannelMessageHandlers(builder: flatbuffers.Builder, channelMessageHandlersOffset: flatbuffers.Offset): void;
|
|
28
|
+
static addLiburing(builder: flatbuffers.Builder, liburingOffset: flatbuffers.Offset): void;
|
|
26
29
|
static endDumpResponse(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
27
30
|
unpack(): DumpResponseT;
|
|
28
31
|
unpackTo(_o: DumpResponseT): void;
|
|
@@ -32,7 +35,8 @@ export declare class DumpResponseT implements flatbuffers.IGeneratedObject {
|
|
|
32
35
|
webRtcServerIds: (string)[];
|
|
33
36
|
routerIds: (string)[];
|
|
34
37
|
channelMessageHandlers: ChannelMessageHandlersT | null;
|
|
35
|
-
|
|
38
|
+
liburing: DumpT | null;
|
|
39
|
+
constructor(pid?: number, webRtcServerIds?: (string)[], routerIds?: (string)[], channelMessageHandlers?: ChannelMessageHandlersT | null, liburing?: DumpT | null);
|
|
36
40
|
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
37
41
|
}
|
|
38
42
|
//# sourceMappingURL=dump-response.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dump-response.d.ts","sourceRoot":"","sources":["../../../src/fbs/worker/dump-response.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAG5G,qBAAa,YAAa,YAAW,WAAW,CAAC,iBAAiB,CAAC,aAAa,CAAC;IAC/E,EAAE,EAAE,WAAW,CAAC,UAAU,GAA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;IAQvG,MAAM,CAAC,oBAAoB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAC,MAAM;IAIxE,MAAM,CAAC,yBAAyB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,4BAA4B,EAAC,WAAW,CAAC,MAAM;IAI7G,MAAM,CAAC,WAAW,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,cAAc,EAAC,WAAW,CAAC,MAAM;IAIjF,MAAM,CAAC,eAAe,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAStE,MAAM,IAAI,aAAa;IAWvB,QAAQ,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;CAOhC;AAED,qBAAa,aAAc,YAAW,WAAW,CAAC,gBAAgB;IAEzD,GAAG,EAAE,MAAM;IACX,eAAe,EAAE,CAAC,MAAM,CAAC,EAAE;IAC3B,SAAS,EAAE,CAAC,MAAM,CAAC,EAAE;IACrB,sBAAsB,EAAE,uBAAuB,GAAC,IAAI;IACpD,QAAQ,EAAE,KAAK,GAAC,IAAI;gBAJpB,GAAG,GAAE,MAAU,EACf,eAAe,GAAE,CAAC,MAAM,CAAC,EAAO,EAChC,SAAS,GAAE,CAAC,MAAM,CAAC,EAAO,EAC1B,sBAAsB,GAAE,uBAAuB,GAAC,IAAW,EAC3D,QAAQ,GAAE,KAAK,GAAC,IAAW;IAIpC,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAepD"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.DumpResponseT = exports.DumpResponse = void 0;
|
|
5
5
|
const flatbuffers = require("flatbuffers");
|
|
6
|
+
const dump_1 = require("../../fbs/lib-uring/dump");
|
|
6
7
|
const channel_message_handlers_1 = require("../../fbs/worker/channel-message-handlers");
|
|
7
8
|
class DumpResponse {
|
|
8
9
|
bb = null;
|
|
@@ -43,8 +44,12 @@ class DumpResponse {
|
|
|
43
44
|
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
44
45
|
return offset ? (obj || new channel_message_handlers_1.ChannelMessageHandlers()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
45
46
|
}
|
|
47
|
+
liburing(obj) {
|
|
48
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
49
|
+
return offset ? (obj || new dump_1.Dump()).__init(this.bb.__indirect(this.bb_pos + offset), this.bb) : null;
|
|
50
|
+
}
|
|
46
51
|
static startDumpResponse(builder) {
|
|
47
|
-
builder.startObject(
|
|
52
|
+
builder.startObject(5);
|
|
48
53
|
}
|
|
49
54
|
static addPid(builder, pid) {
|
|
50
55
|
builder.addFieldInt32(0, pid, 0);
|
|
@@ -78,6 +83,9 @@ class DumpResponse {
|
|
|
78
83
|
static addChannelMessageHandlers(builder, channelMessageHandlersOffset) {
|
|
79
84
|
builder.addFieldOffset(3, channelMessageHandlersOffset, 0);
|
|
80
85
|
}
|
|
86
|
+
static addLiburing(builder, liburingOffset) {
|
|
87
|
+
builder.addFieldOffset(4, liburingOffset, 0);
|
|
88
|
+
}
|
|
81
89
|
static endDumpResponse(builder) {
|
|
82
90
|
const offset = builder.endObject();
|
|
83
91
|
builder.requiredField(offset, 6); // web_rtc_server_ids
|
|
@@ -86,13 +94,14 @@ class DumpResponse {
|
|
|
86
94
|
return offset;
|
|
87
95
|
}
|
|
88
96
|
unpack() {
|
|
89
|
-
return new DumpResponseT(this.pid(), this.bb.createScalarList(this.webRtcServerIds.bind(this), this.webRtcServerIdsLength()), this.bb.createScalarList(this.routerIds.bind(this), this.routerIdsLength()), (this.channelMessageHandlers() !== null ? this.channelMessageHandlers().unpack() : null));
|
|
97
|
+
return new DumpResponseT(this.pid(), this.bb.createScalarList(this.webRtcServerIds.bind(this), this.webRtcServerIdsLength()), this.bb.createScalarList(this.routerIds.bind(this), this.routerIdsLength()), (this.channelMessageHandlers() !== null ? this.channelMessageHandlers().unpack() : null), (this.liburing() !== null ? this.liburing().unpack() : null));
|
|
90
98
|
}
|
|
91
99
|
unpackTo(_o) {
|
|
92
100
|
_o.pid = this.pid();
|
|
93
101
|
_o.webRtcServerIds = this.bb.createScalarList(this.webRtcServerIds.bind(this), this.webRtcServerIdsLength());
|
|
94
102
|
_o.routerIds = this.bb.createScalarList(this.routerIds.bind(this), this.routerIdsLength());
|
|
95
103
|
_o.channelMessageHandlers = (this.channelMessageHandlers() !== null ? this.channelMessageHandlers().unpack() : null);
|
|
104
|
+
_o.liburing = (this.liburing() !== null ? this.liburing().unpack() : null);
|
|
96
105
|
}
|
|
97
106
|
}
|
|
98
107
|
exports.DumpResponse = DumpResponse;
|
|
@@ -101,21 +110,25 @@ class DumpResponseT {
|
|
|
101
110
|
webRtcServerIds;
|
|
102
111
|
routerIds;
|
|
103
112
|
channelMessageHandlers;
|
|
104
|
-
|
|
113
|
+
liburing;
|
|
114
|
+
constructor(pid = 0, webRtcServerIds = [], routerIds = [], channelMessageHandlers = null, liburing = null) {
|
|
105
115
|
this.pid = pid;
|
|
106
116
|
this.webRtcServerIds = webRtcServerIds;
|
|
107
117
|
this.routerIds = routerIds;
|
|
108
118
|
this.channelMessageHandlers = channelMessageHandlers;
|
|
119
|
+
this.liburing = liburing;
|
|
109
120
|
}
|
|
110
121
|
pack(builder) {
|
|
111
122
|
const webRtcServerIds = DumpResponse.createWebRtcServerIdsVector(builder, builder.createObjectOffsetList(this.webRtcServerIds));
|
|
112
123
|
const routerIds = DumpResponse.createRouterIdsVector(builder, builder.createObjectOffsetList(this.routerIds));
|
|
113
124
|
const channelMessageHandlers = (this.channelMessageHandlers !== null ? this.channelMessageHandlers.pack(builder) : 0);
|
|
125
|
+
const liburing = (this.liburing !== null ? this.liburing.pack(builder) : 0);
|
|
114
126
|
DumpResponse.startDumpResponse(builder);
|
|
115
127
|
DumpResponse.addPid(builder, this.pid);
|
|
116
128
|
DumpResponse.addWebRtcServerIds(builder, webRtcServerIds);
|
|
117
129
|
DumpResponse.addRouterIds(builder, routerIds);
|
|
118
130
|
DumpResponse.addChannelMessageHandlers(builder, channelMessageHandlers);
|
|
131
|
+
DumpResponse.addLiburing(builder, liburing);
|
|
119
132
|
return DumpResponse.endDumpResponse(builder);
|
|
120
133
|
}
|
|
121
134
|
}
|
|
@@ -52,7 +52,7 @@ test('worker.createRouter() succeeds', async () => {
|
|
|
52
52
|
expect(() => (router.appData = { foo: 222, bar: 'BBB' })).not.toThrow();
|
|
53
53
|
await expect(worker.dump())
|
|
54
54
|
.resolves
|
|
55
|
-
.
|
|
55
|
+
.toMatchObject({
|
|
56
56
|
pid: worker.pid,
|
|
57
57
|
webRtcServerIds: [],
|
|
58
58
|
routerIds: [router.id],
|
|
@@ -36,7 +36,7 @@ test('worker.createWebRtcServer() succeeds', async () => {
|
|
|
36
36
|
expect(webRtcServer.appData).toEqual({ foo: 123 });
|
|
37
37
|
await expect(worker.dump())
|
|
38
38
|
.resolves
|
|
39
|
-
.
|
|
39
|
+
.toMatchObject({
|
|
40
40
|
pid: worker.pid,
|
|
41
41
|
webRtcServerIds: [webRtcServer.id],
|
|
42
42
|
routerIds: [],
|
|
@@ -91,7 +91,7 @@ test('worker.createWebRtcServer() without specifying port succeeds', async () =>
|
|
|
91
91
|
expect(webRtcServer.appData).toEqual({ foo: 123 });
|
|
92
92
|
await expect(worker.dump())
|
|
93
93
|
.resolves
|
|
94
|
-
.
|
|
94
|
+
.toMatchObject({
|
|
95
95
|
pid: worker.pid,
|
|
96
96
|
webRtcServerIds: [webRtcServer.id],
|
|
97
97
|
routerIds: [],
|
|
@@ -421,7 +421,7 @@ test('router.createWebRtcTransport() with webRtcServer succeeds and webRtcServer
|
|
|
421
421
|
expect(router.transportsForTesting.size).toBe(0);
|
|
422
422
|
await expect(worker.dump())
|
|
423
423
|
.resolves
|
|
424
|
-
.
|
|
424
|
+
.toMatchObject({
|
|
425
425
|
pid: worker.pid,
|
|
426
426
|
webRtcServerIds: [],
|
|
427
427
|
routerIds: [router.id],
|
package/npm-scripts.mjs
CHANGED
|
@@ -11,7 +11,6 @@ const IS_WINDOWS = os.platform() === 'win32';
|
|
|
11
11
|
const MAYOR_VERSION = PKG.version.split('.')[0];
|
|
12
12
|
const PYTHON = getPython();
|
|
13
13
|
const PIP_INVOKE_DIR = path.resolve('worker/pip_invoke');
|
|
14
|
-
const INVOKE_VERSION = process.env.INVOKE_VERSION ?? '2.2.0';
|
|
15
14
|
const FLATBUFFERS_VERSION = '23.3.3';
|
|
16
15
|
const WORKER_RELEASE_DIR = 'worker/out/Release';
|
|
17
16
|
const WORKER_RELEASE_BIN = IS_WINDOWS ? 'mediasoup-worker.exe' : 'mediasoup-worker';
|
|
@@ -318,7 +317,8 @@ function installInvoke()
|
|
|
318
317
|
// Install pip invoke into custom location, so we don't depend on system-wide
|
|
319
318
|
// installation.
|
|
320
319
|
executeCmd(
|
|
321
|
-
`"${PYTHON}" -m pip install --upgrade --target="${PIP_INVOKE_DIR}" invoke
|
|
320
|
+
`"${PYTHON}" -m pip install --upgrade --target="${PIP_INVOKE_DIR}" invoke`,
|
|
321
|
+
/* exitOnError */ true
|
|
322
322
|
);
|
|
323
323
|
}
|
|
324
324
|
|
|
@@ -331,15 +331,7 @@ function deleteNodeLib()
|
|
|
331
331
|
|
|
332
332
|
logInfo('deleteNodeLib()');
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
{
|
|
336
|
-
executeCmd('rm -rf node/lib');
|
|
337
|
-
}
|
|
338
|
-
else
|
|
339
|
-
{
|
|
340
|
-
// NOTE: This command fails in Windows if the dir doesn't exist.
|
|
341
|
-
executeCmd('rmdir /s /q "node/lib"', /* exitOnError */ false);
|
|
342
|
-
}
|
|
334
|
+
fs.rmSync('node/lib', { recursive: true, force: true });
|
|
343
335
|
}
|
|
344
336
|
|
|
345
337
|
function buildTypescript({ force = false } = { force: false })
|
|
@@ -584,7 +576,7 @@ async function downloadPrebuiltWorker()
|
|
|
584
576
|
const resolvedBinPath = path.resolve(WORKER_RELEASE_BIN_PATH);
|
|
585
577
|
|
|
586
578
|
execSync(
|
|
587
|
-
resolvedBinPath
|
|
579
|
+
`"${resolvedBinPath}"`,
|
|
588
580
|
{
|
|
589
581
|
stdio : [ 'ignore', 'ignore', 'ignore' ],
|
|
590
582
|
// Ensure no env is passed to avoid accidents.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.7",
|
|
4
4
|
"description": "Cutting Edge WebRTC Video Conferencing",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -21,23 +21,22 @@
|
|
|
21
21
|
"types": "node/lib/index.d.ts",
|
|
22
22
|
"files": [
|
|
23
23
|
"node/lib",
|
|
24
|
-
"worker/
|
|
25
|
-
"worker/include",
|
|
24
|
+
"worker/deps/libwebrtc",
|
|
26
25
|
"worker/fbs",
|
|
27
|
-
"worker/test/src",
|
|
28
|
-
"worker/test/include",
|
|
29
|
-
"worker/fuzzer/src",
|
|
30
26
|
"worker/fuzzer/include",
|
|
31
|
-
"worker/
|
|
27
|
+
"worker/fuzzer/src",
|
|
28
|
+
"worker/include",
|
|
29
|
+
"worker/src",
|
|
32
30
|
"worker/scripts/*.json",
|
|
31
|
+
"worker/scripts/*.mjs",
|
|
33
32
|
"worker/scripts/*.py",
|
|
34
33
|
"worker/scripts/*.sh",
|
|
35
34
|
"worker/subprojects/*.wrap",
|
|
36
|
-
"worker/
|
|
37
|
-
"worker/
|
|
38
|
-
"worker/Makefile",
|
|
35
|
+
"worker/test/include",
|
|
36
|
+
"worker/test/src",
|
|
39
37
|
"worker/meson.build",
|
|
40
38
|
"worker/meson_options.txt",
|
|
39
|
+
"worker/tasks.py",
|
|
41
40
|
"npm-scripts.mjs"
|
|
42
41
|
],
|
|
43
42
|
"engines": {
|
|
@@ -106,13 +105,13 @@
|
|
|
106
105
|
"@octokit/rest": "^20.0.2",
|
|
107
106
|
"@types/debug": "^4.1.12",
|
|
108
107
|
"@types/jest": "^29.5.10",
|
|
109
|
-
"@types/node": "^20.10.
|
|
110
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
111
|
-
"@typescript-eslint/parser": "^6.
|
|
112
|
-
"eslint": "^8.
|
|
108
|
+
"@types/node": "^20.10.3",
|
|
109
|
+
"@typescript-eslint/eslint-plugin": "^6.13.1",
|
|
110
|
+
"@typescript-eslint/parser": "^6.13.1",
|
|
111
|
+
"eslint": "^8.55.0",
|
|
113
112
|
"eslint-plugin-jest": "^27.6.0",
|
|
114
113
|
"jest": "^29.7.0",
|
|
115
|
-
"marked": "^
|
|
114
|
+
"marked": "^11.0.0",
|
|
116
115
|
"open-cli": "^7.2.0",
|
|
117
116
|
"pick-port": "^1.0.1",
|
|
118
117
|
"sctp": "^1.0.0",
|
package/worker/fbs/meson.build
CHANGED
package/worker/fbs/worker.fbs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
include "liburing.fbs";
|
|
1
2
|
include "transport.fbs";
|
|
2
3
|
|
|
3
4
|
namespace FBS.Worker;
|
|
@@ -12,6 +13,7 @@ table DumpResponse {
|
|
|
12
13
|
web_rtc_server_ids: [string] (required);
|
|
13
14
|
router_ids: [string] (required);
|
|
14
15
|
channel_message_handlers: ChannelMessageHandlers (required);
|
|
16
|
+
liburing: FBS.LibUring.Dump;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
table ResourceUsageResponse {
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
#ifndef MS_DEP_LIBURING_HPP
|
|
2
|
+
#define MS_DEP_LIBURING_HPP
|
|
3
|
+
|
|
4
|
+
#include "DepLibUV.hpp"
|
|
5
|
+
#include "FBS/liburing.h"
|
|
6
|
+
#include <functional>
|
|
7
|
+
#include <liburing.h>
|
|
8
|
+
#include <queue>
|
|
9
|
+
|
|
10
|
+
class DepLibUring
|
|
11
|
+
{
|
|
12
|
+
public:
|
|
13
|
+
using onSendCallback = const std::function<void(bool sent)>;
|
|
14
|
+
|
|
15
|
+
/* Struct for the user data field of SQE and CQE. */
|
|
16
|
+
struct UserData
|
|
17
|
+
{
|
|
18
|
+
uint8_t store[1500]{};
|
|
19
|
+
onSendCallback* cb{ nullptr };
|
|
20
|
+
size_t idx{ 0 };
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/* Number of submission queue entries (SQE). */
|
|
24
|
+
static constexpr size_t QueueDepth{ 1024 * 4 };
|
|
25
|
+
|
|
26
|
+
static bool IsRuntimeSupported();
|
|
27
|
+
static void ClassInit();
|
|
28
|
+
static void ClassDestroy();
|
|
29
|
+
static flatbuffers::Offset<FBS::LibUring::Dump> FillBuffer(flatbuffers::FlatBufferBuilder& builder);
|
|
30
|
+
static void StartPollingCQEs();
|
|
31
|
+
static void StopPollingCQEs();
|
|
32
|
+
static bool PrepareSend(
|
|
33
|
+
int sockfd, const void* data, size_t len, const struct sockaddr* addr, onSendCallback* cb);
|
|
34
|
+
static bool PrepareWrite(
|
|
35
|
+
int sockfd, const void* data1, size_t len1, const void* data2, size_t len2, onSendCallback* cb);
|
|
36
|
+
static void Submit();
|
|
37
|
+
static void SetActive();
|
|
38
|
+
static bool IsActive();
|
|
39
|
+
|
|
40
|
+
class LibUring;
|
|
41
|
+
|
|
42
|
+
thread_local static LibUring* liburing;
|
|
43
|
+
|
|
44
|
+
public:
|
|
45
|
+
class LibUring
|
|
46
|
+
{
|
|
47
|
+
public:
|
|
48
|
+
LibUring();
|
|
49
|
+
~LibUring();
|
|
50
|
+
flatbuffers::Offset<FBS::LibUring::Dump> FillBuffer(flatbuffers::FlatBufferBuilder& builder) const;
|
|
51
|
+
void StartPollingCQEs();
|
|
52
|
+
void StopPollingCQEs();
|
|
53
|
+
bool PrepareSend(
|
|
54
|
+
int sockfd, const void* data, size_t len, const struct sockaddr* addr, onSendCallback* cb);
|
|
55
|
+
bool PrepareWrite(
|
|
56
|
+
int sockfd, const void* data1, size_t len1, const void* data2, size_t len2, onSendCallback* cb);
|
|
57
|
+
void Submit();
|
|
58
|
+
void SetActive()
|
|
59
|
+
{
|
|
60
|
+
this->active = true;
|
|
61
|
+
}
|
|
62
|
+
bool IsActive() const
|
|
63
|
+
{
|
|
64
|
+
return this->active;
|
|
65
|
+
}
|
|
66
|
+
io_uring* GetRing()
|
|
67
|
+
{
|
|
68
|
+
return std::addressof(this->ring);
|
|
69
|
+
}
|
|
70
|
+
int GetEventFd() const
|
|
71
|
+
{
|
|
72
|
+
return this->efd;
|
|
73
|
+
}
|
|
74
|
+
void ReleaseUserDataEntry(size_t idx)
|
|
75
|
+
{
|
|
76
|
+
this->availableUserDataEntries.push(idx);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
private:
|
|
80
|
+
UserData* GetUserData();
|
|
81
|
+
|
|
82
|
+
private:
|
|
83
|
+
// io_uring instance.
|
|
84
|
+
io_uring ring;
|
|
85
|
+
// Event file descriptor to watch for completions.
|
|
86
|
+
int efd;
|
|
87
|
+
// libuv handle used to poll io_uring completions.
|
|
88
|
+
uv_poll_t* uvHandle{ nullptr };
|
|
89
|
+
// Whether we are currently sending RTP over io_uring.
|
|
90
|
+
bool active{ false };
|
|
91
|
+
// Pre-allocated UserData entries.
|
|
92
|
+
UserData userDataBuffer[QueueDepth]{};
|
|
93
|
+
// Indexes of available UserData entries.
|
|
94
|
+
std::queue<size_t> availableUserDataEntries;
|
|
95
|
+
// Submission queue entry process count.
|
|
96
|
+
uint64_t sqeProcessCount{ 0u };
|
|
97
|
+
// Submission queue entry miss count.
|
|
98
|
+
uint64_t sqeMissCount{ 0u };
|
|
99
|
+
// User data miss count.
|
|
100
|
+
uint64_t userDataMissCount{ 0u };
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
#endif
|
|
@@ -143,6 +143,10 @@ 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
|
|
146
150
|
bool closed{ false };
|
|
147
151
|
size_t recvBytes{ 0u };
|
|
148
152
|
size_t sentBytes{ 0u };
|
|
@@ -103,6 +103,10 @@ private:
|
|
|
103
103
|
// Allocated by this (may be passed by argument).
|
|
104
104
|
uv_udp_t* uvHandle{ nullptr };
|
|
105
105
|
// Others.
|
|
106
|
+
#ifdef MS_LIBURING_SUPPORTED
|
|
107
|
+
// Local file descriptor for io_uring.
|
|
108
|
+
uv_os_fd_t fd{ 0u };
|
|
109
|
+
#endif
|
|
106
110
|
bool closed{ false };
|
|
107
111
|
size_t recvBytes{ 0u };
|
|
108
112
|
size_t sentBytes{ 0u };
|
package/worker/meson.build
CHANGED
|
@@ -199,6 +199,7 @@ abseil_cpp_proj = subproject(
|
|
|
199
199
|
'abseil-cpp',
|
|
200
200
|
default_options: [
|
|
201
201
|
'warning_level=0',
|
|
202
|
+
'cpp_std=c++17',
|
|
202
203
|
],
|
|
203
204
|
)
|
|
204
205
|
catch2_proj = subproject(
|
|
@@ -257,6 +258,28 @@ if host_machine.system() == 'windows'
|
|
|
257
258
|
]
|
|
258
259
|
endif
|
|
259
260
|
|
|
261
|
+
if host_machine.system() == 'linux'
|
|
262
|
+
kernel_version = run_command('uname', '-r').stdout().strip()
|
|
263
|
+
|
|
264
|
+
# Enable liburing for kernel versions greather than or equal to 6.
|
|
265
|
+
if kernel_version[0].to_int() >= 6
|
|
266
|
+
liburing_proj = subproject('liburing', default_options: ['default_library=static'], required: true)
|
|
267
|
+
|
|
268
|
+
dependencies += [
|
|
269
|
+
liburing_proj.get_variable('uring'),
|
|
270
|
+
]
|
|
271
|
+
link_whole += [
|
|
272
|
+
liburing_proj.get_variable('liburing')
|
|
273
|
+
]
|
|
274
|
+
common_sources += [
|
|
275
|
+
'src/DepLibUring.cpp',
|
|
276
|
+
]
|
|
277
|
+
cpp_args += [
|
|
278
|
+
'-DMS_LIBURING_SUPPORTED',
|
|
279
|
+
]
|
|
280
|
+
endif
|
|
281
|
+
endif
|
|
282
|
+
|
|
260
283
|
libmediasoup_worker = library(
|
|
261
284
|
'libmediasoup-worker',
|
|
262
285
|
name_prefix: '',
|