mediasoup 3.15.8 → 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.
Files changed (89) hide show
  1. package/node/lib/Worker.d.ts.map +1 -1
  2. package/node/lib/Worker.js +27 -13
  3. package/node/lib/fbs/consumer/degrade-request.d.ts +30 -0
  4. package/node/lib/fbs/consumer/degrade-request.d.ts.map +1 -0
  5. package/node/lib/fbs/consumer/degrade-request.js +91 -0
  6. package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts +24 -0
  7. package/node/lib/fbs/consumer/enable-delay-and-loss-request.d.ts.map +1 -0
  8. package/node/lib/fbs/consumer/enable-delay-and-loss-request.js +69 -0
  9. package/node/lib/fbs/rtp-parameters/rtp-header-extension-uri.d.ts +2 -1
  10. package/node/lib/fbs/rtp-parameters/rtp-header-extension-uri.d.ts.map +1 -1
  11. package/node/lib/fbs/rtp-parameters/rtp-header-extension-uri.js +1 -0
  12. package/node/lib/fbs/worker/close-request.d.ts +18 -0
  13. package/node/lib/fbs/worker/close-request.d.ts.map +1 -0
  14. package/node/lib/fbs/worker/close-request.js +45 -0
  15. package/node/lib/rtpParametersFbsUtils.d.ts.map +1 -1
  16. package/node/lib/rtpParametersFbsUtils.js +6 -0
  17. package/node/lib/rtpParametersTypes.d.ts +1 -1
  18. package/node/lib/rtpParametersTypes.d.ts.map +1 -1
  19. package/node/lib/supportedRtpCapabilities.d.ts.map +1 -1
  20. package/node/lib/supportedRtpCapabilities.js +20 -0
  21. package/node/lib/test/test-PipeTransport.js +21 -0
  22. package/node/lib/test/test-Worker.js +10 -9
  23. package/package.json +16 -15
  24. package/worker/Makefile +129 -0
  25. package/worker/fbs/rtpParameters.fbs +1 -1
  26. package/worker/fuzzer/include/RTC/Codecs/FuzzerAV1.hpp +20 -0
  27. package/worker/fuzzer/include/RTC/Codecs/FuzzerDependencyDescriptor.hpp +20 -0
  28. package/worker/fuzzer/src/RTC/Codecs/FuzzerAV1.cpp +21 -0
  29. package/worker/fuzzer/src/RTC/Codecs/FuzzerDependencyDescriptor.cpp +17 -0
  30. package/worker/fuzzer/src/RTC/Codecs/FuzzerH264.cpp +4 -1
  31. package/worker/fuzzer/src/fuzzer.cpp +4 -0
  32. package/worker/include/Logger.hpp +13 -0
  33. package/worker/include/RTC/Codecs/AV1.hpp +142 -0
  34. package/worker/include/RTC/Codecs/DependencyDescriptor.hpp +63 -0
  35. package/worker/include/RTC/Codecs/H264.hpp +16 -21
  36. package/worker/include/RTC/Codecs/H264_SVC.hpp +4 -3
  37. package/worker/include/RTC/Codecs/Opus.hpp +4 -3
  38. package/worker/include/RTC/Codecs/PayloadDescriptorHandler.hpp +12 -8
  39. package/worker/include/RTC/Codecs/Tools.hpp +18 -2
  40. package/worker/include/RTC/Codecs/VP8.hpp +4 -3
  41. package/worker/include/RTC/Codecs/VP9.hpp +4 -3
  42. package/worker/include/RTC/PipeConsumer.hpp +12 -0
  43. package/worker/include/RTC/RtcLogger.hpp +7 -7
  44. package/worker/include/RTC/RtpDictionaries.hpp +2 -0
  45. package/worker/include/RTC/RtpHeaderExtensionIds.hpp +1 -0
  46. package/worker/include/RTC/RtpPacket.hpp +32 -0
  47. package/worker/include/RTC/RtpStreamRecv.hpp +2 -0
  48. package/worker/include/RTC/SimpleConsumer.hpp +7 -0
  49. package/worker/include/RTC/SimulcastConsumer.hpp +9 -1
  50. package/worker/include/RTC/SvcConsumer.hpp +8 -1
  51. package/worker/include/Utils.hpp +23 -0
  52. package/worker/meson.build +10 -4
  53. package/worker/meson_options.txt +1 -1
  54. package/worker/scripts/package-lock.json +14 -12
  55. package/worker/src/RTC/Codecs/AV1.cpp +314 -0
  56. package/worker/src/RTC/Codecs/DependencyDescriptor.cpp +243 -0
  57. package/worker/src/RTC/Codecs/H264.cpp +79 -150
  58. package/worker/src/RTC/Codecs/H264_SVC.cpp +1 -1
  59. package/worker/src/RTC/Codecs/Opus.cpp +1 -1
  60. package/worker/src/RTC/Codecs/VP8.cpp +7 -6
  61. package/worker/src/RTC/Codecs/VP9.cpp +1 -1
  62. package/worker/src/RTC/PipeConsumer.cpp +144 -26
  63. package/worker/src/RTC/Producer.cpp +33 -5
  64. package/worker/src/RTC/RtcLogger.cpp +28 -23
  65. package/worker/src/RTC/RtpDictionaries/RtpCodecMimeType.cpp +2 -0
  66. package/worker/src/RTC/RtpDictionaries/RtpHeaderExtensionUri.cpp +10 -0
  67. package/worker/src/RTC/RtpPacket.cpp +25 -23
  68. package/worker/src/RTC/RtpStreamRecv.cpp +2 -2
  69. package/worker/src/RTC/SCTP/association/Socket.cpp +2 -2
  70. package/worker/src/RTC/SimpleConsumer.cpp +122 -34
  71. package/worker/src/RTC/SimulcastConsumer.cpp +171 -44
  72. package/worker/src/RTC/SrtpSession.cpp +56 -11
  73. package/worker/src/RTC/SvcConsumer.cpp +116 -29
  74. package/worker/src/RTC/Transport.cpp +4 -1
  75. package/worker/src/Utils/BitStream.cpp +105 -0
  76. package/worker/src/Worker.cpp +3 -1
  77. package/worker/src/lib.cpp +6 -0
  78. package/worker/subprojects/libsrtp3.wrap +8 -0
  79. package/worker/subprojects/libuv.wrap +9 -9
  80. package/worker/test/include/helpers.hpp +2 -0
  81. package/worker/test/src/RTC/Codecs/TestDependencyDescriptor.cpp +123 -0
  82. package/worker/test/src/RTC/Codecs/TestH264.cpp +3 -1
  83. package/worker/test/src/RTC/Codecs/TestVP8.cpp +21 -10
  84. package/worker/test/src/RTC/Codecs/TestVP9.cpp +3 -1
  85. package/worker/test/src/RTC/TestNackGenerator.cpp +3 -3
  86. package/worker/test/src/RTC/TestRtpStreamSend.cpp +5 -5
  87. package/worker/test/src/RTC/TestSeqManager.cpp +1 -1
  88. package/worker/test/src/helpers.cpp +30 -1
  89. package/worker/subprojects/libsrtp2.wrap +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"Worker.d.ts","sourceRoot":"","sources":["../src/Worker.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MA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BZ"}
@@ -41,7 +41,7 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
41
41
  #closed = false;
42
42
  // Died dlag.
43
43
  #died = false;
44
- // Worker subprocess closed flag.
44
+ // Worker process closed flag.
45
45
  #subprocessClosed = false;
46
46
  // Custom app data.
47
47
  #appData;
@@ -130,8 +130,8 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
130
130
  }
131
131
  });
132
132
  this.#child.on('exit', (code, signal) => {
133
- // If killed by ourselves, do nothing.
134
- if (this.#child.killed) {
133
+ // If closed by ourselves, do nothing.
134
+ if (this.#closed) {
135
135
  return;
136
136
  }
137
137
  if (!spawnDone) {
@@ -153,8 +153,8 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
153
153
  }
154
154
  });
155
155
  this.#child.on('error', error => {
156
- // If killed by ourselves, do nothing.
157
- if (this.#child.killed) {
156
+ // If closed by ourselves, do nothing.
157
+ if (this.#closed) {
158
158
  return;
159
159
  }
160
160
  if (!spawnDone) {
@@ -169,9 +169,12 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
169
169
  }
170
170
  });
171
171
  this.#child.on('close', (code, signal) => {
172
- logger.debug(`worker subprocess closed [pid:${this.#pid}, code:${code}, signal:${signal}]`);
173
- this.#subprocessClosed = true;
174
- this.safeEmit('subprocessclose');
172
+ logger.debug(`worker process closed [pid:${this.#pid}, code:${code}, signal:${signal}]`);
173
+ if (!this.#subprocessClosed) {
174
+ this.#subprocessClosed = true;
175
+ logger.debug(`emitting 'subprocessclose' event`);
176
+ this.safeEmit('subprocessclose');
177
+ }
175
178
  });
176
179
  // Be ready for 3rd party worker libraries logging to stdout.
177
180
  this.#child.stdout.on('data', buffer => {
@@ -230,10 +233,6 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
230
233
  }
231
234
  logger.debug('close()');
232
235
  this.#closed = true;
233
- // Kill the worker process.
234
- this.#child.kill('SIGTERM');
235
- // Close the Channel instance.
236
- this.#channel.close();
237
236
  // Close every Router.
238
237
  for (const router of this.#routers) {
239
238
  router.workerClosed();
@@ -244,6 +243,18 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
244
243
  webRtcServer.workerClosed();
245
244
  }
246
245
  this.#webRtcServers.clear();
246
+ /* Send Request. */
247
+ this.#channel
248
+ .request(FbsRequest.Method.WORKER_CLOSE)
249
+ .then(() => {
250
+ // Close the Channel instance now.
251
+ this.#channel.close();
252
+ })
253
+ .catch(error => {
254
+ logger.error('close() | worker process failed to process the close request:', error);
255
+ // Close the Channel instance anyway.
256
+ this.#channel.close();
257
+ });
247
258
  // Emit observer event.
248
259
  this.#observer.safeEmit('close');
249
260
  }
@@ -346,8 +357,9 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
346
357
  if (this.#closed) {
347
358
  return;
348
359
  }
349
- logger.debug(`died() [error:${error.toString()}]`);
360
+ logger.debug(`workerDied() [error:${error.toString()}]`);
350
361
  this.#closed = true;
362
+ this.#subprocessClosed = true;
351
363
  this.#died = true;
352
364
  // Close the Channel instance.
353
365
  this.#channel.close();
@@ -361,7 +373,9 @@ class WorkerImpl extends enhancedEvents_1.EnhancedEventEmitter {
361
373
  webRtcServer.workerClosed();
362
374
  }
363
375
  this.#webRtcServers.clear();
376
+ logger.debug(`workerDied() | emitting 'died' and 'subprocessclose' events`);
364
377
  this.safeEmit('died', error);
378
+ this.safeEmit('subprocessclose');
365
379
  // Emit observer event.
366
380
  this.#observer.safeEmit('close');
367
381
  }
@@ -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,E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hC,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;
@@ -10,6 +10,7 @@ export declare enum RtpHeaderExtensionUri {
10
10
  TransportWideCcDraft01 = 8,
11
11
  AbsSendTime = 9,
12
12
  AbsCaptureTime = 10,
13
- PlayoutDelay = 11
13
+ PlayoutDelay = 11,
14
+ DependencyDescriptor = 12
14
15
  }
15
16
  //# sourceMappingURL=rtp-header-extension-uri.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rtp-header-extension-uri.d.ts","sourceRoot":"","sources":["../../../src/fbs/rtp-parameters/rtp-header-extension-uri.ts"],"names":[],"mappings":"AAIA,oBAAY,qBAAqB;IAC/B,GAAG,IAAI;IACP,WAAW,IAAI;IACf,iBAAiB,IAAI;IACrB,mBAAmB,IAAI;IACvB,YAAY,IAAI;IAChB,UAAU,IAAI;IACd,gBAAgB,IAAI;IACpB,UAAU,IAAI;IACd,sBAAsB,IAAI;IAC1B,WAAW,IAAI;IACf,cAAc,KAAK;IACnB,YAAY,KAAK;CAClB"}
1
+ {"version":3,"file":"rtp-header-extension-uri.d.ts","sourceRoot":"","sources":["../../../src/fbs/rtp-parameters/rtp-header-extension-uri.ts"],"names":[],"mappings":"AAIA,oBAAY,qBAAqB;IAC/B,GAAG,IAAI;IACP,WAAW,IAAI;IACf,iBAAiB,IAAI;IACrB,mBAAmB,IAAI;IACvB,YAAY,IAAI;IAChB,UAAU,IAAI;IACd,gBAAgB,IAAI;IACpB,UAAU,IAAI;IACd,sBAAsB,IAAI;IAC1B,WAAW,IAAI;IACf,cAAc,KAAK;IACnB,YAAY,KAAK;IACjB,oBAAoB,KAAK;CAC1B"}
@@ -17,4 +17,5 @@ var RtpHeaderExtensionUri;
17
17
  RtpHeaderExtensionUri[RtpHeaderExtensionUri["AbsSendTime"] = 9] = "AbsSendTime";
18
18
  RtpHeaderExtensionUri[RtpHeaderExtensionUri["AbsCaptureTime"] = 10] = "AbsCaptureTime";
19
19
  RtpHeaderExtensionUri[RtpHeaderExtensionUri["PlayoutDelay"] = 11] = "PlayoutDelay";
20
+ RtpHeaderExtensionUri[RtpHeaderExtensionUri["DependencyDescriptor"] = 12] = "DependencyDescriptor";
20
21
  })(RtpHeaderExtensionUri || (exports.RtpHeaderExtensionUri = RtpHeaderExtensionUri = {}));
@@ -0,0 +1,18 @@
1
+ import * as flatbuffers from 'flatbuffers';
2
+ export declare class CloseRequest implements flatbuffers.IUnpackableObject<CloseRequestT> {
3
+ bb: flatbuffers.ByteBuffer | null;
4
+ bb_pos: number;
5
+ __init(i: number, bb: flatbuffers.ByteBuffer): CloseRequest;
6
+ static getRootAsCloseRequest(bb: flatbuffers.ByteBuffer, obj?: CloseRequest): CloseRequest;
7
+ static getSizePrefixedRootAsCloseRequest(bb: flatbuffers.ByteBuffer, obj?: CloseRequest): CloseRequest;
8
+ static startCloseRequest(builder: flatbuffers.Builder): void;
9
+ static endCloseRequest(builder: flatbuffers.Builder): flatbuffers.Offset;
10
+ static createCloseRequest(builder: flatbuffers.Builder): flatbuffers.Offset;
11
+ unpack(): CloseRequestT;
12
+ unpackTo(_o: CloseRequestT): void;
13
+ }
14
+ export declare class CloseRequestT implements flatbuffers.IGeneratedObject {
15
+ constructor();
16
+ pack(builder: flatbuffers.Builder): flatbuffers.Offset;
17
+ }
18
+ //# sourceMappingURL=close-request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"close-request.d.ts","sourceRoot":"","sources":["../../../src/fbs/worker/close-request.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,YAAa,YAAW,WAAW,CAAC,iBAAiB,CAAC,aAAa,CAAC;IAC/E,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,YAAY;IAM1D,MAAM,CAAC,qBAAqB,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,YAAY,GAAE,YAAY;IAIvF,MAAM,CAAC,iCAAiC,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,YAAY,GAAE,YAAY;IAKnG,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO;IAIpD,MAAM,CAAC,eAAe,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAKtE,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAKzE,MAAM,IAAI,aAAa;IAKvB,QAAQ,CAAC,EAAE,EAAE,aAAa,GAAG,IAAI;CAChC;AAED,qBAAa,aAAc,YAAW,WAAW,CAAC,gBAAgB;;IAIlE,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAGpD"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ // automatically generated by the FlatBuffers compiler, do not modify
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.CloseRequestT = exports.CloseRequest = 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 CloseRequest {
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 getRootAsCloseRequest(bb, obj) {
16
+ return (obj || new CloseRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
17
+ }
18
+ static getSizePrefixedRootAsCloseRequest(bb, obj) {
19
+ bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH);
20
+ return (obj || new CloseRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb);
21
+ }
22
+ static startCloseRequest(builder) {
23
+ builder.startObject(0);
24
+ }
25
+ static endCloseRequest(builder) {
26
+ const offset = builder.endObject();
27
+ return offset;
28
+ }
29
+ static createCloseRequest(builder) {
30
+ CloseRequest.startCloseRequest(builder);
31
+ return CloseRequest.endCloseRequest(builder);
32
+ }
33
+ unpack() {
34
+ return new CloseRequestT();
35
+ }
36
+ unpackTo(_o) { }
37
+ }
38
+ exports.CloseRequest = CloseRequest;
39
+ class CloseRequestT {
40
+ constructor() { }
41
+ pack(builder) {
42
+ return CloseRequest.createCloseRequest(builder);
43
+ }
44
+ }
45
+ exports.CloseRequestT = CloseRequestT;
@@ -1 +1 @@
1
- {"version":3,"file":"rtpParametersFbsUtils.d.ts","sourceRoot":"","sources":["../src/rtpParametersFbsUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EACX,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAE5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAON,YAAY,IAAI,eAAe,EAE/B,kBAAkB,IAAI,qBAAqB,EAC3C,qBAAqB,IAAI,wBAAwB,EACjD,4BAA4B,IAAI,+BAA+B,EAC/D,qBAAqB,IAAI,wBAAwB,EACjD,aAAa,IAAI,gBAAgB,EAGjC,MAAM,sBAAsB,CAAC;AAE9B,wBAAgB,sBAAsB,CACrC,OAAO,EAAE,WAAW,CAAC,OAAO,EAC5B,aAAa,EAAE,aAAa,GAC1B,MAAM,CAgGR;AAED,wBAAgB,8BAA8B,CA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AgB,sBAAsB,CACrC,OAAO,EAAE,WAAW,CAAC,OAAO,EAC5B,aAAa,EAAE,aAAa,GAC1B,MAAM,CAgGR;AAED,wBAAgB,8BAA8B,CAC7C,OAAO,EAAE,WAAW,CAAC,OAAO,EAC5B,qBAAqB,GAAE,qBAAqB,EAAO,GACjD,MAAM,CAoER;AAED,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,WAAW,CAAC,OAAO,EAC5B,UAAU,EAAE,GAAG,GACb,MAAM,EAAE,CAmEV;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,YAAY,CAKrE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAuD9C;AAED,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,qBAAqB,GACzB,kBAAkB,CAqBpB;AAED,wBAAgB,4BAA4B,CAC3C,GAAG,EAAE,wBAAwB,GAC3B,qBAAqB,CAsDvB;AAED,wBAAgB,0BAA0B,CACzC,GAAG,EAAE,qBAAqB,GACxB,wBAAwB,CA0D1B;AAED,wBAAgB,iCAAiC,CAChD,IAAI,EAAE,+BAA+B,GACnC,4BAA4B,CAO9B;AAED,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,wBAAwB,GAC5B,qBAAqB,CAWvB;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,aAAa,CAyCxE"}
@@ -235,6 +235,9 @@ function rtpHeaderExtensionUriFromFbs(uri) {
235
235
  case rtp_parameters_1.RtpHeaderExtensionUri.PlayoutDelay: {
236
236
  return 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay';
237
237
  }
238
+ case rtp_parameters_1.RtpHeaderExtensionUri.DependencyDescriptor: {
239
+ return 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension';
240
+ }
238
241
  }
239
242
  }
240
243
  function rtpHeaderExtensionUriToFbs(uri) {
@@ -275,6 +278,9 @@ function rtpHeaderExtensionUriToFbs(uri) {
275
278
  case 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay': {
276
279
  return rtp_parameters_1.RtpHeaderExtensionUri.PlayoutDelay;
277
280
  }
281
+ case 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension': {
282
+ return rtp_parameters_1.RtpHeaderExtensionUri.DependencyDescriptor;
283
+ }
278
284
  default: {
279
285
  throw new TypeError(`invalid RtpHeaderExtensionUri: ${uri}`);
280
286
  }
@@ -249,7 +249,7 @@ export type RtpEncodingParameters = {
249
249
  scaleResolutionDownBy?: number;
250
250
  maxBitrate?: number;
251
251
  };
252
- export type RtpHeaderExtensionUri = 'urn:ietf:params:rtp-hdrext:sdes:mid' | 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id' | 'urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id' | 'http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07' | 'urn:ietf:params:rtp-hdrext:framemarking' | 'urn:ietf:params:rtp-hdrext:ssrc-audio-level' | 'urn:3gpp:video-orientation' | 'urn:ietf:params:rtp-hdrext:toffset' | 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01' | 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time' | 'http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time' | 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay';
252
+ export type RtpHeaderExtensionUri = 'urn:ietf:params:rtp-hdrext:sdes:mid' | 'urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id' | 'urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id' | 'http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07' | 'urn:ietf:params:rtp-hdrext:framemarking' | 'urn:ietf:params:rtp-hdrext:ssrc-audio-level' | 'urn:3gpp:video-orientation' | 'urn:ietf:params:rtp-hdrext:toffset' | 'http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01' | 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time' | 'http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time' | 'http://www.webrtc.org/experiments/rtp-hdrext/playout-delay' | 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension';
253
253
  /**
254
254
  * Defines a RTP header extension within the RTP parameters. The list of RTP
255
255
  * header extensions supported by mediasoup is defined in the
@@ -1 +1 @@
1
- {"version":3,"file":"rtpParametersTypes.d.ts","sourceRoot":"","sources":["../src/rtpParametersTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAE9B;;OAEG;IACH,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACxC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IAEjB;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,2BAA2B,GACpC,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEd;;;;;;;;;GASG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAChC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAKhB,GAAG,EAAE,qBAAqB,CAAC;IAE3B;;;OAGG;IACH,WA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IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"supportedRtpCapabilities.d.ts","sourceRoot":"","sources":["../src/supportedRtpCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,QAAA,MAAM,wBAAwB,EAAE,eAuV/B,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"supportedRtpCapabilities.d.ts","sourceRoot":"","sources":["../src/supportedRtpCapabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,QAAA,MAAM,wBAAwB,EAAE,eA2W/B,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
@@ -219,6 +219,19 @@ const supportedRtpCapabilities = {
219
219
  { type: 'transport-cc' },
220
220
  ],
221
221
  },
222
+ {
223
+ kind: 'video',
224
+ mimeType: 'video/AV1',
225
+ clockRate: 90000,
226
+ parameters: {},
227
+ rtcpFeedback: [
228
+ { type: 'nack' },
229
+ { type: 'nack', parameter: 'pli' },
230
+ { type: 'ccm', parameter: 'fir' },
231
+ { type: 'goog-remb' },
232
+ { type: 'transport-cc' },
233
+ ],
234
+ },
222
235
  ],
223
236
  headerExtensions: [
224
237
  {
@@ -293,6 +306,13 @@ const supportedRtpCapabilities = {
293
306
  preferredEncrypt: false,
294
307
  direction: 'sendrecv',
295
308
  },
309
+ {
310
+ kind: 'video',
311
+ uri: 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension',
312
+ preferredId: 8,
313
+ preferredEncrypt: false,
314
+ direction: 'recvonly',
315
+ },
296
316
  {
297
317
  kind: 'audio',
298
318
  uri: 'urn:ietf:params:rtp-hdrext:ssrc-audio-level',
@@ -324,6 +324,13 @@ test('router.pipeToRouter() succeeds with video', async () => {
324
324
  encrypt: false,
325
325
  parameters: {},
326
326
  },
327
+ // TODO: Enable when DD is sendrecv.
328
+ // {
329
+ // uri: 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension',
330
+ // id: 8,
331
+ // encrypt: false,
332
+ // parameters: {},
333
+ // },
327
334
  {
328
335
  uri: 'urn:3gpp:video-orientation',
329
336
  id: 11,
@@ -389,6 +396,13 @@ test('router.pipeToRouter() succeeds with video', async () => {
389
396
  encrypt: false,
390
397
  parameters: {},
391
398
  },
399
+ // TODO: Enable when DD is sendrecv.
400
+ // {
401
+ // uri: 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension',
402
+ // id: 8,
403
+ // encrypt: false,
404
+ // parameters: {},
405
+ // },
392
406
  {
393
407
  uri: 'urn:3gpp:video-orientation',
394
408
  id: 11,
@@ -491,6 +505,13 @@ test('router.createPipeTransport() with enableRtx succeeds', async () => {
491
505
  encrypt: false,
492
506
  parameters: {},
493
507
  },
508
+ // TODO: Enable when DD is sendrecv.
509
+ // {
510
+ // uri: 'https://aomediacodec.github.io/av1-rtp-spec/#dependency-descriptor-rtp-header-extension',
511
+ // id: 8,
512
+ // encrypt: false,
513
+ // parameters: {},
514
+ // },
494
515
  {
495
516
  uri: 'urn:3gpp:video-orientation',
496
517
  id: 11,
@@ -23,10 +23,12 @@ test('mediasoup.createWorker() succeeds', async () => {
23
23
  expect(worker1.constructor.name).toBe('WorkerImpl');
24
24
  expect(typeof worker1.pid).toBe('number');
25
25
  expect(worker1.closed).toBe(false);
26
+ expect(worker1.subprocessClosed).toBe(false);
26
27
  expect(worker1.died).toBe(false);
27
28
  worker1.close();
28
29
  await (0, enhancedEvents_1.enhancedOnce)(worker1, 'subprocessclose');
29
30
  expect(worker1.closed).toBe(true);
31
+ expect(worker1.subprocessClosed).toBe(true);
30
32
  expect(worker1.died).toBe(false);
31
33
  const worker2 = await mediasoup.createWorker({
32
34
  logLevel: 'debug',
@@ -42,11 +44,13 @@ test('mediasoup.createWorker() succeeds', async () => {
42
44
  expect(worker2.constructor.name).toBe('WorkerImpl');
43
45
  expect(typeof worker2.pid).toBe('number');
44
46
  expect(worker2.closed).toBe(false);
47
+ expect(worker2.subprocessClosed).toBe(false);
45
48
  expect(worker2.died).toBe(false);
46
49
  expect(worker2.appData).toEqual({ foo: 456 });
47
50
  worker2.close();
48
51
  await (0, enhancedEvents_1.enhancedOnce)(worker2, 'subprocessclose');
49
52
  expect(worker2.closed).toBe(true);
53
+ expect(worker2.subprocessClosed).toBe(true);
50
54
  expect(worker2.died).toBe(false);
51
55
  }, 2000);
52
56
  test('mediasoup.createWorker() with wrong settings rejects with TypeError', async () => {
@@ -113,6 +117,7 @@ test('worker.close() succeeds', async () => {
113
117
  await (0, enhancedEvents_1.enhancedOnce)(worker, 'subprocessclose');
114
118
  expect(onObserverClose).toHaveBeenCalledTimes(1);
115
119
  expect(worker.closed).toBe(true);
120
+ expect(worker.subprocessClosed).toBe(true);
116
121
  expect(worker.died).toBe(false);
117
122
  }, 2000);
118
123
  test('Worker emits "died" if mediasoup-worker process died unexpectedly', async () => {
@@ -137,12 +142,10 @@ test('Worker emits "died" if mediasoup-worker process died unexpectedly', async
137
142
  });
138
143
  process.kill(worker1.pid, 'SIGINT');
139
144
  });
140
- if (!worker1.subprocessClosed) {
141
- await (0, enhancedEvents_1.enhancedOnce)(worker1, 'subprocessclose');
142
- }
143
145
  expect(onDied).toHaveBeenCalledTimes(1);
144
146
  expect(onObserverClose).toHaveBeenCalledTimes(1);
145
147
  expect(worker1.closed).toBe(true);
148
+ expect(worker1.subprocessClosed).toBe(true);
146
149
  expect(worker1.died).toBe(true);
147
150
  const worker2 = await mediasoup.createWorker({ logLevel: 'warn' });
148
151
  onDied = jest.fn();
@@ -163,12 +166,10 @@ test('Worker emits "died" if mediasoup-worker process died unexpectedly', async
163
166
  });
164
167
  process.kill(worker2.pid, 'SIGTERM');
165
168
  });
166
- if (!worker2.subprocessClosed) {
167
- await (0, enhancedEvents_1.enhancedOnce)(worker2, 'subprocessclose');
168
- }
169
169
  expect(onDied).toHaveBeenCalledTimes(1);
170
170
  expect(onObserverClose).toHaveBeenCalledTimes(1);
171
171
  expect(worker2.closed).toBe(true);
172
+ expect(worker2.subprocessClosed).toBe(true);
172
173
  expect(worker2.died).toBe(true);
173
174
  const worker3 = await mediasoup.createWorker({ logLevel: 'warn' });
174
175
  onDied = jest.fn();
@@ -189,12 +190,10 @@ test('Worker emits "died" if mediasoup-worker process died unexpectedly', async
189
190
  });
190
191
  process.kill(worker3.pid, 'SIGKILL');
191
192
  });
192
- if (!worker3.subprocessClosed) {
193
- await (0, enhancedEvents_1.enhancedOnce)(worker3, 'subprocessclose');
194
- }
195
193
  expect(onDied).toHaveBeenCalledTimes(1);
196
194
  expect(onObserverClose).toHaveBeenCalledTimes(1);
197
195
  expect(worker3.closed).toBe(true);
196
+ expect(worker3.subprocessClosed).toBe(true);
198
197
  expect(worker3.died).toBe(true);
199
198
  }, 5000);
200
199
  // Windows doesn't have some signals such as SIGPIPE, SIGALRM, SIGUSR1, SIGUSR2
@@ -211,6 +210,8 @@ if (os.platform() !== 'win32') {
211
210
  process.kill(worker.pid, 'SIGUSR2');
212
211
  setTimeout(() => {
213
212
  expect(worker.closed).toBe(false);
213
+ expect(worker.subprocessClosed).toBe(false);
214
+ expect(worker.died).toBe(false);
214
215
  worker.on('subprocessclose', resolve);
215
216
  worker.close();
216
217
  }, 2000);