mediasoup 3.23.1 → 3.24.0
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/CHANGELOG.md +9 -1
- package/node/lib/DataConsumerTypes.d.ts +0 -2
- package/node/lib/DataConsumerTypes.d.ts.map +1 -1
- package/node/lib/DataProducer.d.ts +1 -1
- package/node/lib/DataProducer.d.ts.map +1 -1
- package/node/lib/DataProducer.js +2 -2
- package/node/lib/DataProducerTypes.d.ts +1 -1
- package/node/lib/DataProducerTypes.d.ts.map +1 -1
- package/node/lib/fbs/data-producer/send-notification.d.ts +5 -2
- package/node/lib/fbs/data-producer/send-notification.d.ts.map +1 -1
- package/node/lib/fbs/data-producer/send-notification.js +17 -5
- package/node/lib/test/test-PipeTransport.js +59 -14
- package/package.json +4 -4
- package/worker/fbs/dataProducer.fbs +1 -0
- package/worker/include/RTC/DataConsumer.hpp +1 -0
- package/worker/include/RTC/DataProducer.hpp +4 -2
- package/worker/include/RTC/RateCalculator.hpp +5 -5
- package/worker/include/RTC/Router.hpp +2 -1
- package/worker/include/RTC/SubchannelsCodec.hpp +27 -17
- package/worker/include/RTC/Transport.hpp +4 -2
- package/worker/src/Channel/ChannelMessageRegistrator.cpp +2 -0
- package/worker/src/Channel/ChannelRequest.cpp +2 -0
- package/worker/src/Channel/ChannelSocket.cpp +4 -0
- package/worker/src/DepLibUV.cpp +6 -3
- package/worker/src/RTC/ActiveSpeakerObserver.cpp +8 -0
- package/worker/src/RTC/AudioLevelObserver.cpp +4 -0
- package/worker/src/RTC/DataConsumer.cpp +51 -8
- package/worker/src/RTC/DataProducer.cpp +11 -4
- package/worker/src/RTC/DirectTransport.cpp +4 -0
- package/worker/src/RTC/DtlsTransport.cpp +16 -0
- package/worker/src/RTC/ICE/IceCandidate.cpp +8 -0
- package/worker/src/RTC/ICE/StunPacket.cpp +2 -0
- package/worker/src/RTC/NackGenerator.cpp +2 -0
- package/worker/src/RTC/PipeTransport.cpp +4 -0
- package/worker/src/RTC/PlainTransport.cpp +10 -0
- package/worker/src/RTC/PortManager.cpp +8 -0
- package/worker/src/RTC/Producer.cpp +4 -0
- package/worker/src/RTC/RTCP/CompoundPacket.cpp +8 -0
- package/worker/src/RTC/RTCP/Feedback.cpp +8 -0
- package/worker/src/RTC/RTCP/FeedbackPsRemb.cpp +2 -0
- package/worker/src/RTC/RTCP/FeedbackPsSli.cpp +2 -0
- package/worker/src/RTC/RTCP/FeedbackPsVbcm.cpp +2 -0
- package/worker/src/RTC/RTCP/FeedbackRtpNack.cpp +2 -0
- package/worker/src/RTC/RTCP/FeedbackRtpTllei.cpp +2 -0
- package/worker/src/RTC/RTCP/FeedbackRtpTmmb.cpp +5 -0
- package/worker/src/RTC/RTCP/FeedbackRtpTransport.cpp +8 -0
- package/worker/src/RTC/RTCP/Sdes.cpp +2 -0
- package/worker/src/RTC/RTP/Codecs/AV1.cpp +2 -0
- package/worker/src/RTC/RTP/Codecs/DependencyDescriptor.cpp +6 -0
- package/worker/src/RTC/RTP/Codecs/VP8.cpp +2 -0
- package/worker/src/RTC/RateCalculator.cpp +42 -37
- package/worker/src/RTC/Router.cpp +12 -3
- package/worker/src/RTC/RtpDictionaries/RtpHeaderExtensionUri.cpp +5 -0
- package/worker/src/RTC/RtpDictionaries/RtpParameters.cpp +2 -0
- package/worker/src/RTC/SCTP/association/Association.cpp +2 -0
- package/worker/src/RTC/SCTP/rx/DataTracker.cpp +2 -0
- package/worker/src/RTC/SeqManager.cpp +12 -0
- package/worker/src/RTC/SrtpSession.cpp +6 -0
- package/worker/src/RTC/SubchannelsCodec.cpp +38 -6
- package/worker/src/RTC/Transport.cpp +12 -6
- package/worker/src/RTC/TransportCongestionControlClient.cpp +12 -0
- package/worker/src/RTC/TransportCongestionControlServer.cpp +2 -0
- package/worker/src/Utils/BitStream.cpp +2 -0
- package/worker/src/Worker.cpp +2 -0
- package/worker/src/handles/SignalHandle.cpp +4 -0
- package/worker/src/handles/TcpConnectionHandle.cpp +12 -0
- package/worker/src/handles/TcpServerHandle.cpp +6 -0
- package/worker/src/handles/TimerHandle.cpp +4 -0
- package/worker/src/handles/UdpSocketHandle.cpp +10 -0
- package/worker/src/handles/UnixStreamSocketHandle.cpp +10 -0
- package/worker/test/src/RTC/TestRateCalculator.cpp +45 -45
- package/worker/test/src/RTC/TestSubchannelsCodec.cpp +161 -19
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
### NEXT
|
|
4
4
|
|
|
5
|
+
### 3.24.0
|
|
6
|
+
|
|
7
|
+
- `DataProducer.send()`: Add `ignoredSubchannel` optional argument ([PR #1877](https://github.com/versatica/mediasoup/pull/1877)).
|
|
8
|
+
|
|
9
|
+
### 3.23.2
|
|
10
|
+
|
|
11
|
+
- Handle subchannels in pipe `DataConsumers` ([PR #1875](https://github.com/versatica/mediasoup/pull/1875)).
|
|
12
|
+
|
|
5
13
|
### 3.23.1
|
|
6
14
|
|
|
7
|
-
Worker: Fix, use `thread_local` buffer on `MS_ABORT()` ([PR#1873](https://github.com/versatica/mediasoup/pull/1873)).
|
|
15
|
+
- Worker: Fix, use `thread_local` buffer on `MS_ABORT()` ([PR#1873](https://github.com/versatica/mediasoup/pull/1873)).
|
|
8
16
|
|
|
9
17
|
### 3.23.0
|
|
10
18
|
|
|
@@ -33,8 +33,6 @@ export type DataConsumerOptions<DataConsumerAppData extends AppData = AppData> =
|
|
|
33
33
|
paused?: boolean;
|
|
34
34
|
/**
|
|
35
35
|
* Subchannels this data consumer initially subscribes to.
|
|
36
|
-
* Only used in case this data consumer receives messages from a local data
|
|
37
|
-
* producer that specifies subchannel(s) when calling send().
|
|
38
36
|
*/
|
|
39
37
|
subchannels?: number[];
|
|
40
38
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataConsumerTypes.d.ts","sourceRoot":"","sources":["../src/DataConsumerTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAo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C;IAEhE;;OAEG;IACH,iBAAiB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAErC;;;OAGG;IACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/D;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErD;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD;;OAEG;IACH,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD"}
|
|
@@ -39,7 +39,7 @@ export declare class DataProducerImpl<DataProducerAppData extends AppData = AppD
|
|
|
39
39
|
getStats(): Promise<DataProducerStat[]>;
|
|
40
40
|
pause(): Promise<void>;
|
|
41
41
|
resume(): Promise<void>;
|
|
42
|
-
send(message: string | Buffer, ppid?: number, subchannels?: number[], requiredSubchannel?: number): void;
|
|
42
|
+
send(message: string | Buffer, ppid?: number, subchannels?: number[], requiredSubchannel?: number, ignoredSubchannel?: number): void;
|
|
43
43
|
private handleWorkerNotifications;
|
|
44
44
|
private handleListenerError;
|
|
45
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataProducer.d.ts","sourceRoot":"","sources":["../src/DataProducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EACX,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK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,CAC5C,IAAI,EAAE,eAAe,CAAC,YAAY,GAChC,gBAAgB,CAYlB"}
|
package/node/lib/DataProducer.js
CHANGED
|
@@ -166,7 +166,7 @@ class DataProducerImpl extends enhancedEvents_1.EnhancedEventEmitter {
|
|
|
166
166
|
this.#observer.safeEmit('resume');
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
send(message, ppid, subchannels, requiredSubchannel) {
|
|
169
|
+
send(message, ppid, subchannels, requiredSubchannel, ignoredSubchannel) {
|
|
170
170
|
if (typeof message !== 'string' && !Buffer.isBuffer(message)) {
|
|
171
171
|
throw new TypeError('message must be a string or a Buffer');
|
|
172
172
|
}
|
|
@@ -208,7 +208,7 @@ class DataProducerImpl extends enhancedEvents_1.EnhancedEventEmitter {
|
|
|
208
208
|
message = Buffer.from(message);
|
|
209
209
|
}
|
|
210
210
|
const dataOffset = FbsDataProducer.SendNotification.createDataVector(builder, message);
|
|
211
|
-
const notificationOffset = FbsDataProducer.SendNotification.createSendNotification(builder, ppid, dataOffset, subchannelsOffset, requiredSubchannel ?? null);
|
|
211
|
+
const notificationOffset = FbsDataProducer.SendNotification.createSendNotification(builder, ppid, dataOffset, subchannelsOffset, requiredSubchannel ?? null, ignoredSubchannel ?? null);
|
|
212
212
|
this.#channel.notify(FbsNotification.Event.DATAPRODUCER_SEND, FbsNotification.Body.DataProducer_SendNotification, notificationOffset, this.#internal.dataProducerId);
|
|
213
213
|
}
|
|
214
214
|
handleWorkerNotifications() {
|
|
@@ -128,6 +128,6 @@ export interface DataProducer<DataProducerAppData extends AppData = AppData> ext
|
|
|
128
128
|
/**
|
|
129
129
|
* Send data (just valid for DataProducers created on a DirectTransport).
|
|
130
130
|
*/
|
|
131
|
-
send(message: string | Buffer, ppid?: number, subchannels?: number[], requiredSubchannel?: number): void;
|
|
131
|
+
send(message: string | Buffer, ppid?: number, subchannels?: number[], requiredSubchannel?: number, ignoredSubchannel?: number): void;
|
|
132
132
|
}
|
|
133
133
|
//# sourceMappingURL=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CAAC,gBAAgB,CAAC,CAAC;IAElC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAExC;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;OAEG;IACH,IAAI,CACH,OAAO,EAAE,MAAM,GAAG,MAAM,EACxB,IAAI,CAAC,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,EAAE,EACtB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,iBAAiB,CAAC,EAAE,MAAM,GACxB,IAAI,CAAC;CACR"}
|
|
@@ -13,6 +13,7 @@ export declare class SendNotification implements flatbuffers.IUnpackableObject<S
|
|
|
13
13
|
subchannelsLength(): number;
|
|
14
14
|
subchannelsArray(): Uint16Array | null;
|
|
15
15
|
requiredSubchannel(): number | null;
|
|
16
|
+
ignoredSubchannel(): number | null;
|
|
16
17
|
static startSendNotification(builder: flatbuffers.Builder): void;
|
|
17
18
|
static addPpid(builder: flatbuffers.Builder, ppid: number): void;
|
|
18
19
|
static addData(builder: flatbuffers.Builder, dataOffset: flatbuffers.Offset): void;
|
|
@@ -26,8 +27,9 @@ export declare class SendNotification implements flatbuffers.IUnpackableObject<S
|
|
|
26
27
|
static createSubchannelsVector(builder: flatbuffers.Builder, data: number[] | Uint8Array): flatbuffers.Offset;
|
|
27
28
|
static startSubchannelsVector(builder: flatbuffers.Builder, numElems: number): void;
|
|
28
29
|
static addRequiredSubchannel(builder: flatbuffers.Builder, requiredSubchannel: number): void;
|
|
30
|
+
static addIgnoredSubchannel(builder: flatbuffers.Builder, ignoredSubchannel: number): void;
|
|
29
31
|
static endSendNotification(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
30
|
-
static createSendNotification(builder: flatbuffers.Builder, ppid: number, dataOffset: flatbuffers.Offset, subchannelsOffset: flatbuffers.Offset, requiredSubchannel: number | null): flatbuffers.Offset;
|
|
32
|
+
static createSendNotification(builder: flatbuffers.Builder, ppid: number, dataOffset: flatbuffers.Offset, subchannelsOffset: flatbuffers.Offset, requiredSubchannel: number | null, ignoredSubchannel: number | null): flatbuffers.Offset;
|
|
31
33
|
unpack(): SendNotificationT;
|
|
32
34
|
unpackTo(_o: SendNotificationT): void;
|
|
33
35
|
}
|
|
@@ -36,7 +38,8 @@ export declare class SendNotificationT implements flatbuffers.IGeneratedObject {
|
|
|
36
38
|
data: (number)[];
|
|
37
39
|
subchannels: (number)[];
|
|
38
40
|
requiredSubchannel: number | null;
|
|
39
|
-
|
|
41
|
+
ignoredSubchannel: number | null;
|
|
42
|
+
constructor(ppid?: number, data?: (number)[], subchannels?: (number)[], requiredSubchannel?: number | null, ignoredSubchannel?: number | null);
|
|
40
43
|
pack(builder: flatbuffers.Builder): flatbuffers.Offset;
|
|
41
44
|
}
|
|
42
45
|
//# sourceMappingURL=send-notification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-notification.d.ts","sourceRoot":"","sources":["../../../src/fbs/data-producer/send-notification.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,WAAW,MAAM,aAAa,CAAC;AAI3C,qBAAa,gBAAiB,YAAW,WAAW,CAAC,iBAAiB,CAAC,iBAAiB,CAAC;IACvF,EAAE,EAAE,WAAW,CAAC,UAAU,GAAC,IAAI,CAAQ;IACvC,MAAM,SAAK;IACX,MAAM,CAAC,CAAC,EAAC,MAAM,EAAE,EAAE,EAAC,WAAW,CAAC,UAAU,GAAE,gBAAgB;IAM9D,MAAM,CAAC,yBAAyB,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,gBAAgB,GAAE,gBAAgB;IAInG,MAAM,CAAC,qCAAqC,CAAC,EAAE,EAAC,WAAW,CAAC,UAAU,EAAE,GAAG,CAAC,EAAC,gBAAgB,GAAE,gBAAgB;IAK/G,IAAI,IAAG,MAAM;IAKb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AAW,CAAC,OAAO,GAAE,WAAW,CAAC,MAAM;IAM1E,MAAM,CAAC,sBAAsB,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,EAAE,IAAI,EAAC,MAAM,EAAE,UAAU,EAAC,WAAW,CAAC,MAAM,EAAE,iBAAiB,EAAC,WAAW,CAAC,MAAM,EAAE,kBAAkB,EAAC,MAAM,GAAC,IAAI,EAAE,iBAAiB,EAAC,MAAM,GAAC,IAAI,GAAE,WAAW,CAAC,MAAM;IAY9N,MAAM,IAAI,iBAAiB;IAW3B,QAAQ,CAAC,EAAE,EAAE,iBAAiB,GAAG,IAAI;CAOpC;AAED,qBAAa,iBAAkB,YAAW,WAAW,CAAC,gBAAgB;IAE7D,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE;IAChB,WAAW,EAAE,CAAC,MAAM,CAAC,EAAE;IACvB,kBAAkB,EAAE,MAAM,GAAC,IAAI;IAC/B,iBAAiB,EAAE,MAAM,GAAC,IAAI;gBAJ9B,IAAI,GAAE,MAAU,EAChB,IAAI,GAAE,CAAC,MAAM,CAAC,EAAO,EACrB,WAAW,GAAE,CAAC,MAAM,CAAC,EAAO,EAC5B,kBAAkB,GAAE,MAAM,GAAC,IAAW,EACtC,iBAAiB,GAAE,MAAM,GAAC,IAAW;IAI9C,IAAI,CAAC,OAAO,EAAC,WAAW,CAAC,OAAO,GAAG,WAAW,CAAC,MAAM;CAYpD"}
|
|
@@ -84,8 +84,12 @@ class SendNotification {
|
|
|
84
84
|
const offset = this.bb.__offset(this.bb_pos, 10);
|
|
85
85
|
return offset ? this.bb.readUint16(this.bb_pos + offset) : null;
|
|
86
86
|
}
|
|
87
|
+
ignoredSubchannel() {
|
|
88
|
+
const offset = this.bb.__offset(this.bb_pos, 12);
|
|
89
|
+
return offset ? this.bb.readUint16(this.bb_pos + offset) : null;
|
|
90
|
+
}
|
|
87
91
|
static startSendNotification(builder) {
|
|
88
|
-
builder.startObject(
|
|
92
|
+
builder.startObject(5);
|
|
89
93
|
}
|
|
90
94
|
static addPpid(builder, ppid) {
|
|
91
95
|
builder.addFieldInt32(0, ppid, 0);
|
|
@@ -119,28 +123,34 @@ class SendNotification {
|
|
|
119
123
|
static addRequiredSubchannel(builder, requiredSubchannel) {
|
|
120
124
|
builder.addFieldInt16(3, requiredSubchannel, null);
|
|
121
125
|
}
|
|
126
|
+
static addIgnoredSubchannel(builder, ignoredSubchannel) {
|
|
127
|
+
builder.addFieldInt16(4, ignoredSubchannel, null);
|
|
128
|
+
}
|
|
122
129
|
static endSendNotification(builder) {
|
|
123
130
|
const offset = builder.endObject();
|
|
124
131
|
builder.requiredField(offset, 6); // data
|
|
125
132
|
return offset;
|
|
126
133
|
}
|
|
127
|
-
static createSendNotification(builder, ppid, dataOffset, subchannelsOffset, requiredSubchannel) {
|
|
134
|
+
static createSendNotification(builder, ppid, dataOffset, subchannelsOffset, requiredSubchannel, ignoredSubchannel) {
|
|
128
135
|
SendNotification.startSendNotification(builder);
|
|
129
136
|
SendNotification.addPpid(builder, ppid);
|
|
130
137
|
SendNotification.addData(builder, dataOffset);
|
|
131
138
|
SendNotification.addSubchannels(builder, subchannelsOffset);
|
|
132
139
|
if (requiredSubchannel !== null)
|
|
133
140
|
SendNotification.addRequiredSubchannel(builder, requiredSubchannel);
|
|
141
|
+
if (ignoredSubchannel !== null)
|
|
142
|
+
SendNotification.addIgnoredSubchannel(builder, ignoredSubchannel);
|
|
134
143
|
return SendNotification.endSendNotification(builder);
|
|
135
144
|
}
|
|
136
145
|
unpack() {
|
|
137
|
-
return new SendNotificationT(this.ppid(), this.bb.createScalarList(this.data.bind(this), this.dataLength()), this.bb.createScalarList(this.subchannels.bind(this), this.subchannelsLength()), this.requiredSubchannel());
|
|
146
|
+
return new SendNotificationT(this.ppid(), this.bb.createScalarList(this.data.bind(this), this.dataLength()), this.bb.createScalarList(this.subchannels.bind(this), this.subchannelsLength()), this.requiredSubchannel(), this.ignoredSubchannel());
|
|
138
147
|
}
|
|
139
148
|
unpackTo(_o) {
|
|
140
149
|
_o.ppid = this.ppid();
|
|
141
150
|
_o.data = this.bb.createScalarList(this.data.bind(this), this.dataLength());
|
|
142
151
|
_o.subchannels = this.bb.createScalarList(this.subchannels.bind(this), this.subchannelsLength());
|
|
143
152
|
_o.requiredSubchannel = this.requiredSubchannel();
|
|
153
|
+
_o.ignoredSubchannel = this.ignoredSubchannel();
|
|
144
154
|
}
|
|
145
155
|
}
|
|
146
156
|
exports.SendNotification = SendNotification;
|
|
@@ -149,16 +159,18 @@ class SendNotificationT {
|
|
|
149
159
|
data;
|
|
150
160
|
subchannels;
|
|
151
161
|
requiredSubchannel;
|
|
152
|
-
|
|
162
|
+
ignoredSubchannel;
|
|
163
|
+
constructor(ppid = 0, data = [], subchannels = [], requiredSubchannel = null, ignoredSubchannel = null) {
|
|
153
164
|
this.ppid = ppid;
|
|
154
165
|
this.data = data;
|
|
155
166
|
this.subchannels = subchannels;
|
|
156
167
|
this.requiredSubchannel = requiredSubchannel;
|
|
168
|
+
this.ignoredSubchannel = ignoredSubchannel;
|
|
157
169
|
}
|
|
158
170
|
pack(builder) {
|
|
159
171
|
const data = SendNotification.createDataVector(builder, this.data);
|
|
160
172
|
const subchannels = SendNotification.createSubchannelsVector(builder, this.subchannels);
|
|
161
|
-
return SendNotification.createSendNotification(builder, this.ppid, data, subchannels, this.requiredSubchannel);
|
|
173
|
+
return SendNotification.createSendNotification(builder, this.ppid, data, subchannels, this.requiredSubchannel, this.ignoredSubchannel);
|
|
162
174
|
}
|
|
163
175
|
}
|
|
164
176
|
exports.SendNotificationT = SendNotificationT;
|
|
@@ -926,31 +926,76 @@ test('transport.consumeData() for a pipe DataProducer succeeds with subchannels'
|
|
|
926
926
|
label: 'foo',
|
|
927
927
|
protocol: 'bar',
|
|
928
928
|
});
|
|
929
|
-
await ctx.router1.pipeToRouter({
|
|
929
|
+
const { pipeDataConsumer } = await ctx.router1.pipeToRouter({
|
|
930
930
|
dataProducerId: directDataProducer.id,
|
|
931
931
|
router: ctx.router2,
|
|
932
932
|
});
|
|
933
933
|
const directTransport2 = await ctx.router2.createDirectTransport();
|
|
934
934
|
const directDataConsumer = await directTransport2.consumeData({
|
|
935
935
|
dataProducerId: directDataProducer.id,
|
|
936
|
-
subchannels: [123, 666],
|
|
936
|
+
subchannels: [123, 666, 777],
|
|
937
937
|
});
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
938
|
+
const receivedMessages = [];
|
|
939
|
+
directDataConsumer.on('message', message => {
|
|
940
|
+
const receivedMessage = message.toString('utf8');
|
|
941
|
+
receivedMessages.push(receivedMessage);
|
|
942
|
+
});
|
|
943
|
+
// The `pipeDataConsumer` is not subscribed to any subchannel, so it must allow
|
|
944
|
+
// the message to pass through and reach the final `directDataConsumer`.
|
|
945
|
+
directDataProducer.send('hello1',
|
|
946
|
+
/* ppid */ undefined,
|
|
947
|
+
/* subchannels */ [123, 124],
|
|
948
|
+
/* requiredSubchannel */ 666);
|
|
949
|
+
// Subscribe `pipeDataConsumer` to subchannels 123, 124 and 666.
|
|
950
|
+
await pipeDataConsumer.setSubchannels([123, 124, 666]);
|
|
951
|
+
// The `pipeDataConsumer` is subscribed to subchannels 123 and 666 so it must
|
|
952
|
+
// allow the message to pass through and reach the final `directDataConsumer`.
|
|
953
|
+
directDataProducer.send('hello2',
|
|
954
|
+
/* ppid */ undefined,
|
|
955
|
+
/* subchannels */ [123],
|
|
956
|
+
/* requiredSubchannel */ 666);
|
|
957
|
+
// The `pipeDataConsumer` is subscribed to subchannels 124 and 666 so it must
|
|
958
|
+
// allow the message to pass through, however the final `directDataConsumer`
|
|
959
|
+
// is not subscribed to subchannel 124 so the message must not reach it.
|
|
960
|
+
directDataProducer.send('hello3',
|
|
961
|
+
/* ppid */ undefined,
|
|
962
|
+
/* subchannels */ [124],
|
|
963
|
+
/* requiredSubchannel */ 666);
|
|
964
|
+
// The `pipeDataConsumer` is not subscribed to subchannel 125 so it must not
|
|
965
|
+
// allow the message to pass through.
|
|
966
|
+
directDataProducer.send('hello4',
|
|
967
|
+
/* ppid */ undefined,
|
|
968
|
+
/* subchannels */ [125],
|
|
969
|
+
/* requiredSubchannel */ 666);
|
|
970
|
+
// The `pipeDataConsumer` is subscribed to subchannel 666 so it must not
|
|
971
|
+
// allow the message to pass through.
|
|
972
|
+
directDataProducer.send('hello5',
|
|
973
|
+
/* ppid */ undefined,
|
|
974
|
+
/* subchannels */ [123],
|
|
975
|
+
/* requiredSubchannel */ undefined,
|
|
976
|
+
/* ignoredSubchannel */ 666);
|
|
977
|
+
// The final `directDataConsumer` is subscribed to subchannel 777 so it must
|
|
978
|
+
// not receive the message.
|
|
979
|
+
directDataProducer.send('hello6',
|
|
980
|
+
/* ppid */ undefined,
|
|
981
|
+
/* subchannels */ undefined,
|
|
982
|
+
/* requiredSubchannel */ undefined,
|
|
983
|
+
/* ignoredSubchannel */ 777);
|
|
984
|
+
// Send a message without subchannels so it's guaranteed that it will reach
|
|
985
|
+
// the final `directDataConsumer`. And wait for reception of this message so
|
|
986
|
+
// at this time we know that previous ones already reached the final
|
|
987
|
+
// `directDataConsumer`.
|
|
988
|
+
await new Promise(resolve => {
|
|
989
|
+
directDataConsumer.on('message', message => {
|
|
990
|
+
const receivedMessage = message.toString('utf8');
|
|
991
|
+
// Resolve once the last sent message is received.
|
|
992
|
+
if (receivedMessage === 'bye') {
|
|
943
993
|
resolve();
|
|
944
994
|
}
|
|
945
|
-
catch (error) {
|
|
946
|
-
reject(error);
|
|
947
|
-
}
|
|
948
995
|
});
|
|
949
|
-
directDataProducer.send('
|
|
950
|
-
/* ppid */ undefined,
|
|
951
|
-
/* subchannels */ [123, 124],
|
|
952
|
-
/* requiredSubchannel */ 666);
|
|
996
|
+
directDataProducer.send('bye');
|
|
953
997
|
});
|
|
998
|
+
expect(receivedMessages).toStrictEqual(['hello1', 'hello2', 'bye']);
|
|
954
999
|
}, 2000);
|
|
955
1000
|
test('dataProducer.close() is transmitted to pipe DataConsumer', async () => {
|
|
956
1001
|
const { pipeDataProducer } = await ctx.router1.pipeToRouter({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.24.0",
|
|
4
4
|
"description": "Cutting Edge WebRTC Video Conferencing",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -121,15 +121,15 @@
|
|
|
121
121
|
"@types/debug": "^4.1.13",
|
|
122
122
|
"@types/ini": "^4.1.1",
|
|
123
123
|
"@types/jest": "^30.0.0",
|
|
124
|
-
"@types/node": "^26.1.
|
|
124
|
+
"@types/node": "^26.1.2",
|
|
125
125
|
"eslint": "^10.8.0",
|
|
126
126
|
"eslint-config-prettier": "^10.1.8",
|
|
127
127
|
"eslint-plugin-jest": "^29.16.0",
|
|
128
128
|
"eslint-plugin-prettier": "^5.5.6",
|
|
129
|
-
"globals": "^17.
|
|
129
|
+
"globals": "^17.9.0",
|
|
130
130
|
"ini": "^7.0.0",
|
|
131
131
|
"jest": "^30.4.2",
|
|
132
|
-
"knip": "^6.
|
|
132
|
+
"knip": "^6.31.0",
|
|
133
133
|
"marked": "^18.0.7",
|
|
134
134
|
"open-cli": "^9.0.0",
|
|
135
135
|
"pick-port": "^2.2.1",
|
|
@@ -97,6 +97,7 @@ namespace RTC
|
|
|
97
97
|
RTC::SCTP::Message message,
|
|
98
98
|
std::vector<uint16_t>& subchannels,
|
|
99
99
|
std::optional<uint16_t> requiredSubchannel,
|
|
100
|
+
std::optional<uint16_t> ignoredSubchannel,
|
|
100
101
|
const onQueuedCallback* cb = nullptr);
|
|
101
102
|
|
|
102
103
|
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
|
|
@@ -27,7 +27,8 @@ namespace RTC
|
|
|
27
27
|
RTC::DataProducer* dataProducer,
|
|
28
28
|
RTC::SCTP::Message message,
|
|
29
29
|
std::vector<uint16_t>& subchannels,
|
|
30
|
-
std::optional<uint16_t> requiredSubchannel
|
|
30
|
+
std::optional<uint16_t> requiredSubchannel,
|
|
31
|
+
std::optional<uint16_t> ignoredSubchannel) = 0;
|
|
31
32
|
virtual void OnDataProducerPaused(RTC::DataProducer* dataProducer) = 0;
|
|
32
33
|
virtual void OnDataProducerResumed(RTC::DataProducer* dataProducer) = 0;
|
|
33
34
|
};
|
|
@@ -68,7 +69,8 @@ namespace RTC
|
|
|
68
69
|
void ReceiveMessage(
|
|
69
70
|
RTC::SCTP::Message message,
|
|
70
71
|
std::vector<uint16_t>& subchannels,
|
|
71
|
-
std::optional<uint16_t> requiredSubchannel
|
|
72
|
+
std::optional<uint16_t> requiredSubchannel,
|
|
73
|
+
std::optional<uint16_t> ignoredSubchannel);
|
|
72
74
|
|
|
73
75
|
/* Methods inherited from Channel::ChannelSocket::RequestHandler. */
|
|
74
76
|
public:
|
|
@@ -41,7 +41,7 @@ namespace RTC
|
|
|
41
41
|
struct BufferItem
|
|
42
42
|
{
|
|
43
43
|
size_t count{ 0u };
|
|
44
|
-
uint64_t
|
|
44
|
+
uint64_t timeMs{ 0u };
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
private:
|
|
@@ -56,11 +56,11 @@ namespace RTC
|
|
|
56
56
|
// Buffer to keep data.
|
|
57
57
|
std::vector<BufferItem> buffer;
|
|
58
58
|
// Time (in milliseconds) for last item in the time window.
|
|
59
|
-
std::optional<uint64_t>
|
|
59
|
+
std::optional<uint64_t> newestItemStartTimeMs{ std::nullopt };
|
|
60
60
|
// Index for the last item in the time window.
|
|
61
61
|
int32_t newestItemIndex{ -1 };
|
|
62
62
|
// Time (in milliseconds) for oldest item in the time window.
|
|
63
|
-
std::optional<uint64_t>
|
|
63
|
+
std::optional<uint64_t> oldestItemStartTimeMs{ std::nullopt };
|
|
64
64
|
// Index for the oldest item in the time window.
|
|
65
65
|
int32_t oldestItemIndex{ -1 };
|
|
66
66
|
// Total count in the time window.
|
|
@@ -70,7 +70,7 @@ namespace RTC
|
|
|
70
70
|
// Last value calculated by GetRate().
|
|
71
71
|
uint32_t lastRate{ 0u };
|
|
72
72
|
// Last time GetRate() was called.
|
|
73
|
-
std::optional<uint64_t>
|
|
73
|
+
std::optional<uint64_t> lastTimeMs{ std::nullopt };
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
class RtpDataCounter
|
|
@@ -103,7 +103,7 @@ namespace RTC
|
|
|
103
103
|
private:
|
|
104
104
|
SharedInterface* shared{ nullptr };
|
|
105
105
|
// Whether the size of padding only RTP packets should not be taken into
|
|
106
|
-
// account
|
|
106
|
+
// account.
|
|
107
107
|
bool ignorePaddingOnlyPackets{ false };
|
|
108
108
|
RateCalculator rate;
|
|
109
109
|
size_t packets{ 0u };
|
|
@@ -100,7 +100,8 @@ namespace RTC
|
|
|
100
100
|
RTC::DataProducer* dataProducer,
|
|
101
101
|
RTC::SCTP::Message message,
|
|
102
102
|
std::vector<uint16_t>& subchannels,
|
|
103
|
-
std::optional<uint16_t> requiredSubchannel
|
|
103
|
+
std::optional<uint16_t> requiredSubchannel,
|
|
104
|
+
std::optional<uint16_t> ignoredSubchannel) override;
|
|
104
105
|
void OnTransportNewDataConsumer(
|
|
105
106
|
RTC::Transport* transport,
|
|
106
107
|
RTC::DataConsumer* dataConsumer,
|
|
@@ -8,30 +8,34 @@
|
|
|
8
8
|
namespace RTC
|
|
9
9
|
{
|
|
10
10
|
/**
|
|
11
|
-
* Helper to (optionally) encode/decode subchannels
|
|
12
|
-
* the beginning of an SCTP message payload so that this
|
|
13
|
-
* within the SCTP message itself.
|
|
11
|
+
* Helper to (optionally) encode/decode subchannels, required subchannel and
|
|
12
|
+
* ignored subchannel at the beginning of an SCTP message payload so that this
|
|
13
|
+
* information travels within the SCTP message itself.
|
|
14
14
|
*/
|
|
15
15
|
class SubchannelsCodec
|
|
16
16
|
{
|
|
17
17
|
/**
|
|
18
18
|
* Wire layout of the encoded header prepended to the message payload (all
|
|
19
|
-
* fields in network byte order). `R` is the `requiredSubchannelFlag
|
|
20
|
-
*
|
|
21
|
-
*
|
|
19
|
+
* fields in network byte order). `R` is the `requiredSubchannelFlag` (second
|
|
20
|
+
* least significant bit of the Magic Token) and `I` is the
|
|
21
|
+
* `ignoredSubchannelFlag` (least significant bit of the Magic Token). The
|
|
22
|
+
* `requiredSubchannel` field is only present when `R` is 1. The
|
|
23
|
+
* `ignoredSubchannel` field is only present when `I` is 1.
|
|
22
24
|
*
|
|
23
25
|
* 0 1 2 3
|
|
24
26
|
* 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
|
|
25
27
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
26
28
|
* | Magic Token (1/2) |
|
|
27
29
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
28
|
-
* |
|
|
30
|
+
* | Magic Token (2/2) |R|I|
|
|
29
31
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
30
32
|
* | subchannelsCount | Subchannel 0 |
|
|
31
33
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
32
34
|
* | ... |
|
|
33
35
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
34
|
-
* | Subchannel N-
|
|
36
|
+
* | Subchannel N-2 | Subchannel N-1 |
|
|
37
|
+
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
38
|
+
* | requiredSubchannel (if R=1) | ignoredSubchannel (if I=1) |
|
|
35
39
|
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
|
36
40
|
*/
|
|
37
41
|
|
|
@@ -41,35 +45,41 @@ namespace RTC
|
|
|
41
45
|
* made of non-printable high bytes and starts with a byte that is not a valid
|
|
42
46
|
* UTF-8 leading byte (0x80-0xBF), so a real string message (valid UTF-8) can
|
|
43
47
|
* never begin with it and the chance of colliding with a binary message is
|
|
44
|
-
* negligible. Its least significant
|
|
45
|
-
* `requiredSubchannelFlag`, so
|
|
48
|
+
* negligible. Its least significant bits are reserved for the
|
|
49
|
+
* `requiredSubchannelFlag` and `ignoredSubchannelFlag`, so they are always 0
|
|
50
|
+
* in the token constant itself.
|
|
46
51
|
*/
|
|
47
52
|
static constexpr uint64_t MagicToken{ 0xA5F09CB3D6E1F28C };
|
|
48
|
-
static constexpr uint64_t RequiredSubchannelFlagMask{
|
|
53
|
+
static constexpr uint64_t RequiredSubchannelFlagMask{ 0x2 };
|
|
54
|
+
static constexpr uint64_t IgnoredSubchannelFlagMask{ 0x1 };
|
|
55
|
+
static constexpr uint64_t FlagsMask{ RequiredSubchannelFlagMask | IgnoredSubchannelFlagMask };
|
|
49
56
|
|
|
50
57
|
public:
|
|
51
58
|
/**
|
|
52
|
-
* If `subchannels` is not empty or `requiredSubchannel`
|
|
53
|
-
* them at the beginning of the given message payload.
|
|
59
|
+
* If `subchannels` is not empty or `requiredSubchannel` or `ignoredSubchannel`
|
|
60
|
+
* has value, encodes them at the beginning of the given message payload.
|
|
54
61
|
*
|
|
55
62
|
* @returns true if the message was encoded, false otherwise.
|
|
56
63
|
*/
|
|
57
64
|
static bool EncodeSubchannels(
|
|
58
65
|
RTC::SCTP::Message& message,
|
|
59
66
|
const std::vector<uint16_t>& subchannels,
|
|
60
|
-
std::optional<uint16_t> requiredSubchannel
|
|
67
|
+
std::optional<uint16_t> requiredSubchannel,
|
|
68
|
+
std::optional<uint16_t> ignoredSubchannel);
|
|
61
69
|
|
|
62
70
|
/**
|
|
63
71
|
* If the given message payload starts with the Magic Token, extracts the
|
|
64
|
-
* encoded subchannels and (optionally) the required subchannel,
|
|
65
|
-
* given arguments and removes the encoded header from the message
|
|
72
|
+
* encoded subchannels and (optionally) the required and/or ignored subchannel,
|
|
73
|
+
* fills the given arguments and removes the encoded header from the message
|
|
74
|
+
* payload.
|
|
66
75
|
*
|
|
67
76
|
* @returns true if the message was successfully decoded, false otherwise.
|
|
68
77
|
*/
|
|
69
78
|
static bool DecodeSubchannels(
|
|
70
79
|
RTC::SCTP::Message& message,
|
|
71
80
|
std::vector<uint16_t>& subchannels,
|
|
72
|
-
std::optional<uint16_t>& requiredSubchannel
|
|
81
|
+
std::optional<uint16_t>& requiredSubchannel,
|
|
82
|
+
std::optional<uint16_t>& ignoredSubchannel);
|
|
73
83
|
};
|
|
74
84
|
} // namespace RTC
|
|
75
85
|
|
|
@@ -108,7 +108,8 @@ namespace RTC
|
|
|
108
108
|
RTC::DataProducer* dataProducer,
|
|
109
109
|
RTC::SCTP::Message message,
|
|
110
110
|
std::vector<uint16_t>& subchannels,
|
|
111
|
-
std::optional<uint16_t> requiredSubchannel
|
|
111
|
+
std::optional<uint16_t> requiredSubchannel,
|
|
112
|
+
std::optional<uint16_t> ignoredSubchannel) = 0;
|
|
112
113
|
virtual void OnTransportNewDataConsumer(
|
|
113
114
|
RTC::Transport* transport,
|
|
114
115
|
RTC::DataConsumer* dataConsumer,
|
|
@@ -285,7 +286,8 @@ namespace RTC
|
|
|
285
286
|
RTC::DataProducer* dataProducer,
|
|
286
287
|
RTC::SCTP::Message message,
|
|
287
288
|
std::vector<uint16_t>& subchannels,
|
|
288
|
-
std::optional<uint16_t> requiredSubchannel
|
|
289
|
+
std::optional<uint16_t> requiredSubchannel,
|
|
290
|
+
std::optional<uint16_t> ignoredSubchannel) override;
|
|
289
291
|
void OnDataProducerPaused(RTC::DataProducer* dataProducer) override;
|
|
290
292
|
void OnDataProducerResumed(RTC::DataProducer* dataProducer) override;
|
|
291
293
|
|
|
@@ -24,6 +24,8 @@ namespace Channel
|
|
|
24
24
|
flatbuffers::Offset<FBS::Worker::ChannelMessageHandlers> ChannelMessageRegistrator::FillBuffer(
|
|
25
25
|
flatbuffers::FlatBufferBuilder& builder)
|
|
26
26
|
{
|
|
27
|
+
MS_TRACE();
|
|
28
|
+
|
|
27
29
|
// Add channelRequestHandlerIds.
|
|
28
30
|
std::vector<flatbuffers::Offset<flatbuffers::String>> channelRequestHandlerIds;
|
|
29
31
|
|
|
@@ -16,6 +16,8 @@ namespace Channel
|
|
|
16
16
|
|
|
17
17
|
inline static void onAsync(uv_handle_t* handle)
|
|
18
18
|
{
|
|
19
|
+
MS_TRACE_STD();
|
|
20
|
+
|
|
19
21
|
while (static_cast<ChannelSocket*>(handle->data)->CallbackRead())
|
|
20
22
|
{
|
|
21
23
|
// Read while there are new messages.
|
|
@@ -24,6 +26,8 @@ namespace Channel
|
|
|
24
26
|
|
|
25
27
|
inline static void onCloseAsync(uv_handle_t* handle)
|
|
26
28
|
{
|
|
29
|
+
MS_TRACE_STD();
|
|
30
|
+
|
|
27
31
|
delete reinterpret_cast<uv_async_t*>(handle);
|
|
28
32
|
}
|
|
29
33
|
|
package/worker/src/DepLibUV.cpp
CHANGED
|
@@ -12,12 +12,14 @@ thread_local uv_loop_t* DepLibUV::loop{ nullptr };
|
|
|
12
12
|
|
|
13
13
|
inline static void onCloseLoop(uv_handle_t* handle)
|
|
14
14
|
{
|
|
15
|
+
MS_TRACE_STD();
|
|
16
|
+
|
|
15
17
|
delete reinterpret_cast<uv_loop_t*>(handle);
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
inline static void onWalk(uv_handle_t* handle, void* /*arg*/)
|
|
19
21
|
{
|
|
20
|
-
// Must use MS_ERROR_STD since at this point the Channel is already closed.
|
|
22
|
+
// Must use MS_ERROR_STD() since at this point the Channel is already closed.
|
|
21
23
|
MS_ERROR_STD(
|
|
22
24
|
"alive UV handle found (this shouldn't happen) [type:%s, active:%d, closing:%d, has_ref:%d]",
|
|
23
25
|
uv_handle_type_name(handle->type),
|
|
@@ -35,7 +37,8 @@ inline static void onWalk(uv_handle_t* handle, void* /*arg*/)
|
|
|
35
37
|
|
|
36
38
|
void DepLibUV::ClassInit()
|
|
37
39
|
{
|
|
38
|
-
//
|
|
40
|
+
// Must use MS_TRACE_STD() since the Channel is not yet created.
|
|
41
|
+
MS_TRACE_STD();
|
|
39
42
|
|
|
40
43
|
DepLibUV::loop = new uv_loop_t;
|
|
41
44
|
|
|
@@ -49,7 +52,7 @@ void DepLibUV::ClassInit()
|
|
|
49
52
|
|
|
50
53
|
void DepLibUV::ClassDestroy()
|
|
51
54
|
{
|
|
52
|
-
|
|
55
|
+
MS_TRACE_STD();
|
|
53
56
|
|
|
54
57
|
// Here we should not have any UV handle left. All them should have been
|
|
55
58
|
// already closed+freed. However, in order to not introduce regressions
|