node-av-lgpl 0.0.0 → 7.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +22 -0
- package/README.md +711 -0
- package/dist/api/audio-frame-buffer.d.ts +636 -0
- package/dist/api/audio-frame-buffer.js +1027 -0
- package/dist/api/audio-frame-buffer.js.map +1 -0
- package/dist/api/bitstream-filter.d.ts +938 -0
- package/dist/api/bitstream-filter.js +1427 -0
- package/dist/api/bitstream-filter.js.map +1 -0
- package/dist/api/constants.d.ts +44 -0
- package/dist/api/constants.js +45 -0
- package/dist/api/constants.js.map +1 -0
- package/dist/api/data/test_av1.ivf +0 -0
- package/dist/api/data/test_h264.h264 +0 -0
- package/dist/api/data/test_hevc.h265 +0 -0
- package/dist/api/data/test_mjpeg.mjpeg +0 -0
- package/dist/api/data/test_vp8.ivf +0 -0
- package/dist/api/data/test_vp9.ivf +0 -0
- package/dist/api/decoder.d.ts +1413 -0
- package/dist/api/decoder.js +2367 -0
- package/dist/api/decoder.js.map +1 -0
- package/dist/api/demuxer.d.ts +1295 -0
- package/dist/api/demuxer.js +2344 -0
- package/dist/api/demuxer.js.map +1 -0
- package/dist/api/device.d.ts +589 -0
- package/dist/api/device.js +964 -0
- package/dist/api/device.js.map +1 -0
- package/dist/api/encoder-pool.d.ts +262 -0
- package/dist/api/encoder-pool.js +397 -0
- package/dist/api/encoder-pool.js.map +1 -0
- package/dist/api/encoder.d.ts +1509 -0
- package/dist/api/encoder.js +2619 -0
- package/dist/api/encoder.js.map +1 -0
- package/dist/api/filter-complex.d.ts +828 -0
- package/dist/api/filter-complex.js +1661 -0
- package/dist/api/filter-complex.js.map +1 -0
- package/dist/api/filter-presets.d.ts +800 -0
- package/dist/api/filter-presets.js +1554 -0
- package/dist/api/filter-presets.js.map +1 -0
- package/dist/api/filter.d.ts +1339 -0
- package/dist/api/filter.js +2075 -0
- package/dist/api/filter.js.map +1 -0
- package/dist/api/fmp4-stream.d.ts +797 -0
- package/dist/api/fmp4-stream.js +1428 -0
- package/dist/api/fmp4-stream.js.map +1 -0
- package/dist/api/hardware.d.ts +677 -0
- package/dist/api/hardware.js +1300 -0
- package/dist/api/hardware.js.map +1 -0
- package/dist/api/index.d.ts +21 -0
- package/dist/api/index.js +38 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/io-stream.d.ts +308 -0
- package/dist/api/io-stream.js +358 -0
- package/dist/api/io-stream.js.map +1 -0
- package/dist/api/muxer.d.ts +1311 -0
- package/dist/api/muxer.js +2672 -0
- package/dist/api/muxer.js.map +1 -0
- package/dist/api/pipeline.d.ts +801 -0
- package/dist/api/pipeline.js +1344 -0
- package/dist/api/pipeline.js.map +1 -0
- package/dist/api/probe.d.ts +128 -0
- package/dist/api/probe.js +227 -0
- package/dist/api/probe.js.map +1 -0
- package/dist/api/rtp-stream.d.ts +497 -0
- package/dist/api/rtp-stream.js +1131 -0
- package/dist/api/rtp-stream.js.map +1 -0
- package/dist/api/scaler.d.ts +561 -0
- package/dist/api/scaler.js +918 -0
- package/dist/api/scaler.js.map +1 -0
- package/dist/api/types.d.ts +17 -0
- package/dist/api/types.js +2 -0
- package/dist/api/types.js.map +1 -0
- package/dist/api/utilities/async-queue.d.ts +149 -0
- package/dist/api/utilities/async-queue.js +254 -0
- package/dist/api/utilities/async-queue.js.map +1 -0
- package/dist/api/utilities/audio-sample.d.ts +117 -0
- package/dist/api/utilities/audio-sample.js +112 -0
- package/dist/api/utilities/audio-sample.js.map +1 -0
- package/dist/api/utilities/audio-transcode.d.ts +20 -0
- package/dist/api/utilities/audio-transcode.js +27 -0
- package/dist/api/utilities/audio-transcode.js.map +1 -0
- package/dist/api/utilities/channel-layout.d.ts +76 -0
- package/dist/api/utilities/channel-layout.js +80 -0
- package/dist/api/utilities/channel-layout.js.map +1 -0
- package/dist/api/utilities/codec-format.d.ts +87 -0
- package/dist/api/utilities/codec-format.js +117 -0
- package/dist/api/utilities/codec-format.js.map +1 -0
- package/dist/api/utilities/context-options.d.ts +25 -0
- package/dist/api/utilities/context-options.js +23 -0
- package/dist/api/utilities/context-options.js.map +1 -0
- package/dist/api/utilities/electron-shared-texture.d.ts +368 -0
- package/dist/api/utilities/electron-shared-texture.js +540 -0
- package/dist/api/utilities/electron-shared-texture.js.map +1 -0
- package/dist/api/utilities/image.d.ts +207 -0
- package/dist/api/utilities/image.js +213 -0
- package/dist/api/utilities/image.js.map +1 -0
- package/dist/api/utilities/index.d.ts +14 -0
- package/dist/api/utilities/index.js +27 -0
- package/dist/api/utilities/index.js.map +1 -0
- package/dist/api/utilities/live-decoding.d.ts +15 -0
- package/dist/api/utilities/live-decoding.js +32 -0
- package/dist/api/utilities/live-decoding.js.map +1 -0
- package/dist/api/utilities/media-type.d.ts +49 -0
- package/dist/api/utilities/media-type.js +53 -0
- package/dist/api/utilities/media-type.js.map +1 -0
- package/dist/api/utilities/packet-age-watchdog.d.ts +198 -0
- package/dist/api/utilities/packet-age-watchdog.js +594 -0
- package/dist/api/utilities/packet-age-watchdog.js.map +1 -0
- package/dist/api/utilities/pixel-format.d.ts +89 -0
- package/dist/api/utilities/pixel-format.js +97 -0
- package/dist/api/utilities/pixel-format.js.map +1 -0
- package/dist/api/utilities/sample-format.d.ts +129 -0
- package/dist/api/utilities/sample-format.js +141 -0
- package/dist/api/utilities/sample-format.js.map +1 -0
- package/dist/api/utilities/scale-size.d.ts +51 -0
- package/dist/api/utilities/scale-size.js +55 -0
- package/dist/api/utilities/scale-size.js.map +1 -0
- package/dist/api/utilities/scheduler.d.ts +138 -0
- package/dist/api/utilities/scheduler.js +98 -0
- package/dist/api/utilities/scheduler.js.map +1 -0
- package/dist/api/utilities/streaming.d.ts +186 -0
- package/dist/api/utilities/streaming.js +309 -0
- package/dist/api/utilities/streaming.js.map +1 -0
- package/dist/api/utilities/timestamp.d.ts +193 -0
- package/dist/api/utilities/timestamp.js +206 -0
- package/dist/api/utilities/timestamp.js.map +1 -0
- package/dist/api/utilities/video-transcode.d.ts +218 -0
- package/dist/api/utilities/video-transcode.js +624 -0
- package/dist/api/utilities/video-transcode.js.map +1 -0
- package/dist/api/utilities/whisper-model.d.ts +330 -0
- package/dist/api/utilities/whisper-model.js +587 -0
- package/dist/api/utilities/whisper-model.js.map +1 -0
- package/dist/api/utils.d.ts +19 -0
- package/dist/api/utils.js +39 -0
- package/dist/api/utils.js.map +1 -0
- package/dist/api/webrtc-stream.d.ts +294 -0
- package/dist/api/webrtc-stream.js +546 -0
- package/dist/api/webrtc-stream.js.map +1 -0
- package/dist/api/whisper.d.ts +326 -0
- package/dist/api/whisper.js +402 -0
- package/dist/api/whisper.js.map +1 -0
- package/dist/constants/bsf-options.d.ts +364 -0
- package/dist/constants/bsf-options.js +7 -0
- package/dist/constants/bsf-options.js.map +1 -0
- package/dist/constants/channel-layouts.d.ts +53 -0
- package/dist/constants/channel-layouts.js +57 -0
- package/dist/constants/channel-layouts.js.map +1 -0
- package/dist/constants/constants.d.ts +2435 -0
- package/dist/constants/constants.js +1989 -0
- package/dist/constants/constants.js.map +1 -0
- package/dist/constants/decoders.d.ts +651 -0
- package/dist/constants/decoders.js +641 -0
- package/dist/constants/decoders.js.map +1 -0
- package/dist/constants/encoders.d.ts +314 -0
- package/dist/constants/encoders.js +309 -0
- package/dist/constants/encoders.js.map +1 -0
- package/dist/constants/filter-options.d.ts +12099 -0
- package/dist/constants/filter-options.js +7 -0
- package/dist/constants/filter-options.js.map +1 -0
- package/dist/constants/format-options.d.ts +4319 -0
- package/dist/constants/format-options.js +7 -0
- package/dist/constants/format-options.js.map +1 -0
- package/dist/constants/formats.d.ts +18 -0
- package/dist/constants/formats.js +7 -0
- package/dist/constants/formats.js.map +1 -0
- package/dist/constants/hardware.d.ts +26 -0
- package/dist/constants/hardware.js +27 -0
- package/dist/constants/hardware.js.map +1 -0
- package/dist/constants/index.d.ts +10 -0
- package/dist/constants/index.js +6 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/options.d.ts +6217 -0
- package/dist/constants/options.js +7 -0
- package/dist/constants/options.js.map +1 -0
- package/dist/ffmpeg/index.d.ts +101 -0
- package/dist/ffmpeg/index.js +161 -0
- package/dist/ffmpeg/index.js.map +1 -0
- package/dist/ffmpeg/version.d.ts +6 -0
- package/dist/ffmpeg/version.js +7 -0
- package/dist/ffmpeg/version.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/audio-fifo.d.ts +399 -0
- package/dist/lib/audio-fifo.js +431 -0
- package/dist/lib/audio-fifo.js.map +1 -0
- package/dist/lib/binding.d.ts +242 -0
- package/dist/lib/binding.js +102 -0
- package/dist/lib/binding.js.map +1 -0
- package/dist/lib/bitstream-filter-context.d.ts +381 -0
- package/dist/lib/bitstream-filter-context.js +443 -0
- package/dist/lib/bitstream-filter-context.js.map +1 -0
- package/dist/lib/bitstream-filter.d.ts +140 -0
- package/dist/lib/bitstream-filter.js +154 -0
- package/dist/lib/bitstream-filter.js.map +1 -0
- package/dist/lib/codec-context.d.ts +1069 -0
- package/dist/lib/codec-context.js +1336 -0
- package/dist/lib/codec-context.js.map +1 -0
- package/dist/lib/codec-parameters.d.ts +664 -0
- package/dist/lib/codec-parameters.js +813 -0
- package/dist/lib/codec-parameters.js.map +1 -0
- package/dist/lib/codec-parser.d.ts +201 -0
- package/dist/lib/codec-parser.js +213 -0
- package/dist/lib/codec-parser.js.map +1 -0
- package/dist/lib/codec.d.ts +617 -0
- package/dist/lib/codec.js +746 -0
- package/dist/lib/codec.js.map +1 -0
- package/dist/lib/device.d.ts +294 -0
- package/dist/lib/device.js +326 -0
- package/dist/lib/device.js.map +1 -0
- package/dist/lib/dictionary.d.ts +333 -0
- package/dist/lib/dictionary.js +372 -0
- package/dist/lib/dictionary.js.map +1 -0
- package/dist/lib/error.d.ts +311 -0
- package/dist/lib/error.js +395 -0
- package/dist/lib/error.js.map +1 -0
- package/dist/lib/fifo.d.ts +416 -0
- package/dist/lib/fifo.js +453 -0
- package/dist/lib/fifo.js.map +1 -0
- package/dist/lib/filter-context.d.ts +714 -0
- package/dist/lib/filter-context.js +783 -0
- package/dist/lib/filter-context.js.map +1 -0
- package/dist/lib/filter-graph-segment.d.ts +161 -0
- package/dist/lib/filter-graph-segment.js +172 -0
- package/dist/lib/filter-graph-segment.js.map +1 -0
- package/dist/lib/filter-graph.d.ts +641 -0
- package/dist/lib/filter-graph.js +704 -0
- package/dist/lib/filter-graph.js.map +1 -0
- package/dist/lib/filter-inout.d.ts +202 -0
- package/dist/lib/filter-inout.js +261 -0
- package/dist/lib/filter-inout.js.map +1 -0
- package/dist/lib/filter.d.ts +243 -0
- package/dist/lib/filter.js +272 -0
- package/dist/lib/filter.js.map +1 -0
- package/dist/lib/format-context.d.ts +1335 -0
- package/dist/lib/format-context.js +1455 -0
- package/dist/lib/format-context.js.map +1 -0
- package/dist/lib/frame-utils.d.ts +116 -0
- package/dist/lib/frame-utils.js +98 -0
- package/dist/lib/frame-utils.js.map +1 -0
- package/dist/lib/frame.d.ts +1315 -0
- package/dist/lib/frame.js +1535 -0
- package/dist/lib/frame.js.map +1 -0
- package/dist/lib/hardware-device-context.d.ts +362 -0
- package/dist/lib/hardware-device-context.js +383 -0
- package/dist/lib/hardware-device-context.js.map +1 -0
- package/dist/lib/hardware-frames-context.d.ts +418 -0
- package/dist/lib/hardware-frames-context.js +471 -0
- package/dist/lib/hardware-frames-context.js.map +1 -0
- package/dist/lib/index.d.ts +35 -0
- package/dist/lib/index.js +60 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/input-format.d.ts +249 -0
- package/dist/lib/input-format.js +306 -0
- package/dist/lib/input-format.js.map +1 -0
- package/dist/lib/io-context.d.ts +698 -0
- package/dist/lib/io-context.js +771 -0
- package/dist/lib/io-context.js.map +1 -0
- package/dist/lib/log.d.ts +174 -0
- package/dist/lib/log.js +184 -0
- package/dist/lib/log.js.map +1 -0
- package/dist/lib/native-types.d.ts +1024 -0
- package/dist/lib/native-types.js +2 -0
- package/dist/lib/native-types.js.map +1 -0
- package/dist/lib/option.d.ts +953 -0
- package/dist/lib/option.js +1607 -0
- package/dist/lib/option.js.map +1 -0
- package/dist/lib/output-format.d.ts +222 -0
- package/dist/lib/output-format.js +259 -0
- package/dist/lib/output-format.js.map +1 -0
- package/dist/lib/packet.d.ts +521 -0
- package/dist/lib/packet.js +613 -0
- package/dist/lib/packet.js.map +1 -0
- package/dist/lib/rational.d.ts +251 -0
- package/dist/lib/rational.js +278 -0
- package/dist/lib/rational.js.map +1 -0
- package/dist/lib/software-resample-context.d.ts +552 -0
- package/dist/lib/software-resample-context.js +592 -0
- package/dist/lib/software-resample-context.js.map +1 -0
- package/dist/lib/software-scale-context.d.ts +344 -0
- package/dist/lib/software-scale-context.js +366 -0
- package/dist/lib/software-scale-context.js.map +1 -0
- package/dist/lib/stream.d.ts +383 -0
- package/dist/lib/stream.js +524 -0
- package/dist/lib/stream.js.map +1 -0
- package/dist/lib/sync-queue.d.ts +179 -0
- package/dist/lib/sync-queue.js +197 -0
- package/dist/lib/sync-queue.js.map +1 -0
- package/dist/lib/types.d.ts +34 -0
- package/dist/lib/types.js +2 -0
- package/dist/lib/types.js.map +1 -0
- package/dist/lib/utilities.d.ts +1198 -0
- package/dist/lib/utilities.js +1302 -0
- package/dist/lib/utilities.js.map +1 -0
- package/dist/utils/electron.d.ts +49 -0
- package/dist/utils/electron.js +63 -0
- package/dist/utils/electron.js.map +1 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/libc.d.ts +11 -0
- package/dist/utils/libc.js +35 -0
- package/dist/utils/libc.js.map +1 -0
- package/dist/utils/variant.d.ts +26 -0
- package/dist/utils/variant.js +31 -0
- package/dist/utils/variant.js.map +1 -0
- package/dist/webrtc/index.d.ts +4 -0
- package/dist/webrtc/index.js +7 -0
- package/dist/webrtc/index.js.map +1 -0
- package/install/check.js +124 -0
- package/install/ffmpeg.js +66 -0
- package/package.json +165 -3
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Box types (big-endian fourcc) the watchdog reads from the fMP4 output.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
const BOX = {
|
|
7
|
+
moof: 0x6d6f6f66,
|
|
8
|
+
moov: 0x6d6f6f76,
|
|
9
|
+
traf: 0x74726166,
|
|
10
|
+
tfhd: 0x74666864,
|
|
11
|
+
trun: 0x7472756e,
|
|
12
|
+
trak: 0x7472616b,
|
|
13
|
+
tkhd: 0x746b6864,
|
|
14
|
+
mdia: 0x6d646961,
|
|
15
|
+
minf: 0x6d696e66,
|
|
16
|
+
stbl: 0x7374626c,
|
|
17
|
+
stsz: 0x7374737a,
|
|
18
|
+
stz2: 0x73747a32,
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Largest moof/moov collected across output chunks; anything larger is treated as corrupt framing.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
const MAX_COLLECTED_BOX = 32 * 1024 * 1024;
|
|
26
|
+
/**
|
|
27
|
+
* Longest time between two packets (ms) that counts towards packet ages; a longer pause of the whole input counts as this much.
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
const MAX_COUNTED_GAP_MS = 2000;
|
|
32
|
+
/**
|
|
33
|
+
* FIFO of packet arrival times (ms on the watchdog's input clock) for one output stream, kept in a growable ring buffer.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
class ArrivalQueue {
|
|
38
|
+
ring = new Float64Array(256);
|
|
39
|
+
head = 0;
|
|
40
|
+
_count = 0;
|
|
41
|
+
/**
|
|
42
|
+
* Number of packets waiting for a fragment.
|
|
43
|
+
*
|
|
44
|
+
* @returns Pending packet count
|
|
45
|
+
*
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
get count() {
|
|
49
|
+
return this._count;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Arrival time of the oldest pending packet.
|
|
53
|
+
*
|
|
54
|
+
* @returns Time in ms, or NaN when nothing is pending
|
|
55
|
+
*
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
oldest() {
|
|
59
|
+
return this._count > 0 ? this.ring[this.head] : NaN;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Append the arrival time of a packet the muxer accepted.
|
|
63
|
+
*
|
|
64
|
+
* @param time - Arrival time in ms
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
push(time) {
|
|
69
|
+
if (this._count === this.ring.length) {
|
|
70
|
+
// Doubling keeps pushes amortised O(1); the ring only grows while a
|
|
71
|
+
// stream is held back, which the watchdog bounds.
|
|
72
|
+
const grown = new Float64Array(this.ring.length * 2);
|
|
73
|
+
const tail = this.ring.subarray(this.head);
|
|
74
|
+
grown.set(tail);
|
|
75
|
+
grown.set(this.ring.subarray(0, this.head), tail.length);
|
|
76
|
+
this.ring = grown;
|
|
77
|
+
this.head = 0;
|
|
78
|
+
}
|
|
79
|
+
this.ring[(this.head + this._count) & (this.ring.length - 1)] = time;
|
|
80
|
+
this._count++;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Remove the most recent arrival (a packet the muxer dropped).
|
|
84
|
+
*
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
dropNewest() {
|
|
88
|
+
if (this._count > 0) {
|
|
89
|
+
this._count--;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Remove the oldest arrivals (packets emitted in a fragment).
|
|
94
|
+
*
|
|
95
|
+
* Removes at most what is pending: more emitted samples than recorded
|
|
96
|
+
* packets cannot be credited to later packets.
|
|
97
|
+
*
|
|
98
|
+
* @param n - Number of emitted samples
|
|
99
|
+
*
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
dropOldest(n) {
|
|
103
|
+
const k = Math.min(n, this._count);
|
|
104
|
+
this.head = (this.head + k) & (this.ring.length - 1);
|
|
105
|
+
this._count -= k;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Bounds how long an fMP4 muxer may hold a packet before emitting it in a fragment.
|
|
110
|
+
*
|
|
111
|
+
* Remembers when each packet reached the muxer, per output stream and in order, and
|
|
112
|
+
* forgets packets as the fragments carrying them are written. When the oldest pending
|
|
113
|
+
* packet of any stream is older than the limit, the next packet write fails with a
|
|
114
|
+
* descriptive error. The age does not depend on packet timestamps, so it also bounds
|
|
115
|
+
* retention caused by missing, constant or runaway timestamps. It counts the time
|
|
116
|
+
* while packets arrive: a pause of the whole input counts at most 2 s, so a source
|
|
117
|
+
* that goes quiet and resumes is not mistaken for a stalled muxer.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* const watchdog = new PacketAgeWatchdog(60, (index) => `stream ${index}`);
|
|
122
|
+
* const output = await Muxer.open(
|
|
123
|
+
* {
|
|
124
|
+
* write: (chunk) => {
|
|
125
|
+
* watchdog.consumeChunk(chunk);
|
|
126
|
+
* return chunk.length;
|
|
127
|
+
* },
|
|
128
|
+
* },
|
|
129
|
+
* { format: 'mp4', options: { movflags: '+frag_keyframe+empty_moov' } },
|
|
130
|
+
* );
|
|
131
|
+
* output.setPacketObserver(watchdog);
|
|
132
|
+
* ```
|
|
133
|
+
*
|
|
134
|
+
* @see {@link Muxer.setPacketObserver} For registering it with a muxer
|
|
135
|
+
*
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
export class PacketAgeWatchdog {
|
|
139
|
+
limitMs;
|
|
140
|
+
limitSeconds;
|
|
141
|
+
describeStream;
|
|
142
|
+
queues = [];
|
|
143
|
+
// Input clock (ms): advances with performance.now() between packets, by at
|
|
144
|
+
// most MAX_COUNTED_GAP_MS per gap. Arrival times and ages are on this clock.
|
|
145
|
+
clock = 0;
|
|
146
|
+
lastArrival = performance.now();
|
|
147
|
+
// Chunk mode framing: header bytes of the current top-level box, bytes left to
|
|
148
|
+
// skip in a box nobody needs (mdat), and a moof/moov collected across chunks.
|
|
149
|
+
header = Buffer.alloc(16);
|
|
150
|
+
headerFill = 0;
|
|
151
|
+
skipRemaining = 0;
|
|
152
|
+
partialBox = null;
|
|
153
|
+
partialFill = 0;
|
|
154
|
+
blind = false;
|
|
155
|
+
/**
|
|
156
|
+
* @param limitSeconds - Maximum age of a pending packet in seconds (> 0)
|
|
157
|
+
*
|
|
158
|
+
* @param describeStream - Label for an output stream in the error message (e.g. its media type)
|
|
159
|
+
*
|
|
160
|
+
* @internal
|
|
161
|
+
*/
|
|
162
|
+
constructor(limitSeconds, describeStream) {
|
|
163
|
+
this.limitSeconds = limitSeconds;
|
|
164
|
+
this.limitMs = limitSeconds * 1000;
|
|
165
|
+
this.describeStream = describeStream;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Number of packets of a stream that have not been emitted in a fragment yet.
|
|
169
|
+
*
|
|
170
|
+
* @param streamIndex - Output stream index
|
|
171
|
+
*
|
|
172
|
+
* @returns Pending packet count
|
|
173
|
+
*
|
|
174
|
+
* @internal
|
|
175
|
+
*/
|
|
176
|
+
pendingPackets(streamIndex) {
|
|
177
|
+
return this.queues[streamIndex]?.count ?? 0;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Age of the oldest pending packet of a stream, as the next packet would see it.
|
|
181
|
+
*
|
|
182
|
+
* @param streamIndex - Output stream index
|
|
183
|
+
*
|
|
184
|
+
* @param now - Current time in ms (performance.now() clock)
|
|
185
|
+
*
|
|
186
|
+
* @returns Age in ms of input time, or 0 when nothing is pending
|
|
187
|
+
*
|
|
188
|
+
* @internal
|
|
189
|
+
*/
|
|
190
|
+
pendingAge(streamIndex, now = performance.now()) {
|
|
191
|
+
const queue = this.queues[streamIndex];
|
|
192
|
+
if (!queue || queue.count === 0) {
|
|
193
|
+
return 0;
|
|
194
|
+
}
|
|
195
|
+
return this.clock + Math.min(now - this.lastArrival, MAX_COUNTED_GAP_MS) - queue.oldest();
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Record a packet the muxer accepted.
|
|
199
|
+
*
|
|
200
|
+
* Checks every stream first, so a stream that is held back is caught by the
|
|
201
|
+
* packets of the streams that still flow.
|
|
202
|
+
*
|
|
203
|
+
* @param streamIndex - Output stream index
|
|
204
|
+
*
|
|
205
|
+
* @throws {Error} If a pending packet of any stream is older than the limit
|
|
206
|
+
*
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
onPacket(streamIndex) {
|
|
210
|
+
if (this.blind) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
// Ages count input time, not wall-clock time. mux.c keeps the last packet
|
|
214
|
+
// of each stream until the next one arrives and movenc emits a sample only
|
|
215
|
+
// when a later packet closes its fragment, so a few packets are always
|
|
216
|
+
// pending. Across a pause of the whole input (a stalled source, host
|
|
217
|
+
// suspend) they would otherwise age and fail the first packet after it,
|
|
218
|
+
// although nothing piled up. Packets pile up only while packets flow, with
|
|
219
|
+
// gaps far below the cap, so capping each gap does not delay detection.
|
|
220
|
+
const now = performance.now();
|
|
221
|
+
this.clock += Math.min(now - this.lastArrival, MAX_COUNTED_GAP_MS);
|
|
222
|
+
this.lastArrival = now;
|
|
223
|
+
const clock = this.clock;
|
|
224
|
+
for (let i = 0; i < this.queues.length; i++) {
|
|
225
|
+
const queue = this.queues[i];
|
|
226
|
+
if (queue && queue.count > 0 && clock - queue.oldest() > this.limitMs) {
|
|
227
|
+
throw this.violation(i, clock - queue.oldest(), queue.count);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
(this.queues[streamIndex] ??= new ArrivalQueue()).push(clock);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Forget a packet of a stream that the muxer accepted but dropped.
|
|
234
|
+
*
|
|
235
|
+
* @param streamIndex - Output stream index
|
|
236
|
+
*
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
onPacketRejected(streamIndex) {
|
|
240
|
+
// Usually the dropped packet is the newest one, but libavformat can reject a
|
|
241
|
+
// packet while later ones already wait behind it. Removing the newest keeps
|
|
242
|
+
// the count exact and errs towards older arrival times, by no more than the
|
|
243
|
+
// packets queued behind it.
|
|
244
|
+
// A failed av_interleaved_write_frame() is reported against the packet the
|
|
245
|
+
// muxer submitted, but mux.c also returns the error of writing out an
|
|
246
|
+
// earlier buffered packet, possibly of another stream. The total stays
|
|
247
|
+
// exact; per stream one entry can land in the wrong queue, which skews
|
|
248
|
+
// ages by about one packet interval and leaves one entry that ages if the
|
|
249
|
+
// stream that really lost the packet then goes quiet. movenc fails that
|
|
250
|
+
// late only on I/O and allocation errors and a few packet checks (a PTS
|
|
251
|
+
// 2^31 or more ticks from its DTS, a malformed first AAC packet). An AVIO
|
|
252
|
+
// error is sticky and fails every later write, so the age limit ending such
|
|
253
|
+
// a session is wanted, not a false alarm.
|
|
254
|
+
this.queues[streamIndex]?.dropNewest();
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Stop judging packet ages for the rest of the session.
|
|
258
|
+
*
|
|
259
|
+
* For a caller that frames the output itself and lost the box boundaries:
|
|
260
|
+
* emitted samples can no longer be counted, and pending packets would
|
|
261
|
+
* otherwise look stalled. Drops what it has recorded and records nothing
|
|
262
|
+
* more, so a blind session holds no state.
|
|
263
|
+
*
|
|
264
|
+
* @internal
|
|
265
|
+
*/
|
|
266
|
+
onFramingLost() {
|
|
267
|
+
this.blind = true;
|
|
268
|
+
this.queues = [];
|
|
269
|
+
this.partialBox = null;
|
|
270
|
+
this.skipRemaining = 0;
|
|
271
|
+
this.headerFill = 0;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Account for one complete top-level box of the muxer output.
|
|
275
|
+
*
|
|
276
|
+
* Only `moof` (fragment samples) and `moov` (samples of a first fragment
|
|
277
|
+
* written without `empty_moov`) matter; other boxes are ignored.
|
|
278
|
+
*
|
|
279
|
+
* @param box - The whole box including its header
|
|
280
|
+
*
|
|
281
|
+
* @internal
|
|
282
|
+
*/
|
|
283
|
+
consumeBox(box) {
|
|
284
|
+
if (box.length < 8) {
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
const type = box.readUInt32BE(4);
|
|
288
|
+
if (type !== BOX.moof && type !== BOX.moov) {
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const headerSize = box.readUInt32BE(0) === 1 ? 16 : 8;
|
|
292
|
+
if (type === BOX.moof) {
|
|
293
|
+
this.drainFragment(box, headerSize, box.length);
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
this.drainInitSegment(box, headerSize, box.length);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Account for a raw chunk of the muxer output.
|
|
301
|
+
*
|
|
302
|
+
* Frames top-level boxes across chunk boundaries without buffering media
|
|
303
|
+
* data: only `moof`/`moov` boxes are collected, everything else is skipped.
|
|
304
|
+
* If the framing breaks (a size the muxer never writes), the watchdog stops
|
|
305
|
+
* judging ages for the rest of the session instead of guessing.
|
|
306
|
+
*
|
|
307
|
+
* @param chunk - Output chunk in stream order
|
|
308
|
+
*
|
|
309
|
+
* @internal
|
|
310
|
+
*/
|
|
311
|
+
consumeChunk(chunk) {
|
|
312
|
+
let offset = 0;
|
|
313
|
+
while (offset < chunk.length && !this.blind) {
|
|
314
|
+
if (this.skipRemaining > 0) {
|
|
315
|
+
const n = Math.min(this.skipRemaining, chunk.length - offset);
|
|
316
|
+
this.skipRemaining -= n;
|
|
317
|
+
offset += n;
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
320
|
+
if (this.partialBox) {
|
|
321
|
+
const n = Math.min(this.partialBox.length - this.partialFill, chunk.length - offset);
|
|
322
|
+
chunk.copy(this.partialBox, this.partialFill, offset, offset + n);
|
|
323
|
+
this.partialFill += n;
|
|
324
|
+
offset += n;
|
|
325
|
+
if (this.partialFill === this.partialBox.length) {
|
|
326
|
+
const box = this.partialBox;
|
|
327
|
+
this.partialBox = null;
|
|
328
|
+
this.consumeBox(box);
|
|
329
|
+
}
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
// The header itself may straddle chunks: 8 bytes, 16 for a 64-bit size.
|
|
333
|
+
let need = this.headerFill < 8 ? 8 : this.header.readUInt32BE(0) === 1 ? 16 : 8;
|
|
334
|
+
if (this.headerFill < need) {
|
|
335
|
+
const n = Math.min(need - this.headerFill, chunk.length - offset);
|
|
336
|
+
chunk.copy(this.header, this.headerFill, offset, offset + n);
|
|
337
|
+
this.headerFill += n;
|
|
338
|
+
offset += n;
|
|
339
|
+
if (this.headerFill < need) {
|
|
340
|
+
continue;
|
|
341
|
+
}
|
|
342
|
+
need = this.header.readUInt32BE(0) === 1 ? 16 : 8;
|
|
343
|
+
if (this.headerFill < need) {
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
const size32 = this.header.readUInt32BE(0);
|
|
348
|
+
const size = size32 === 1 ? Number(this.header.readBigUInt64BE(8)) : size32;
|
|
349
|
+
const type = this.header.readUInt32BE(4);
|
|
350
|
+
this.headerFill = 0;
|
|
351
|
+
// size 0 ("to the end of the file") cannot be framed in a live stream;
|
|
352
|
+
// movenc writes it only when it could not seek back to patch a box.
|
|
353
|
+
if (size < need) {
|
|
354
|
+
this.onFramingLost();
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (type === BOX.moof || type === BOX.moov) {
|
|
358
|
+
if (size > MAX_COLLECTED_BOX) {
|
|
359
|
+
this.onFramingLost();
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
this.partialBox = Buffer.allocUnsafe(size);
|
|
363
|
+
this.header.copy(this.partialBox, 0, 0, need);
|
|
364
|
+
this.partialFill = need;
|
|
365
|
+
if (this.partialFill === size) {
|
|
366
|
+
const box = this.partialBox;
|
|
367
|
+
this.partialBox = null;
|
|
368
|
+
this.consumeBox(box);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
else {
|
|
372
|
+
this.skipRemaining = size - need;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Drain the samples of every track fragment in a moof.
|
|
378
|
+
*
|
|
379
|
+
* @param buf - Buffer holding the moof
|
|
380
|
+
*
|
|
381
|
+
* @param start - Offset of the moof payload
|
|
382
|
+
*
|
|
383
|
+
* @param end - End offset of the moof
|
|
384
|
+
*
|
|
385
|
+
* @internal
|
|
386
|
+
*/
|
|
387
|
+
drainFragment(buf, start, end) {
|
|
388
|
+
for (let offset = start; offset + 8 <= end;) {
|
|
389
|
+
const size = childSize(buf, offset, end);
|
|
390
|
+
if (size === 0) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
if (buf.readUInt32BE(offset + 4) === BOX.traf) {
|
|
394
|
+
this.drainTrackFragment(buf, offset + headerSizeAt(buf, offset), offset + size);
|
|
395
|
+
}
|
|
396
|
+
offset += size;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Drain the samples of one traf: its tfhd names the track, each trun counts samples.
|
|
401
|
+
*
|
|
402
|
+
* movenc writes several truns per traf when the sample data is not contiguous.
|
|
403
|
+
*
|
|
404
|
+
* @param buf - Buffer holding the traf
|
|
405
|
+
*
|
|
406
|
+
* @param start - Offset of the traf payload
|
|
407
|
+
*
|
|
408
|
+
* @param end - End offset of the traf
|
|
409
|
+
*
|
|
410
|
+
* @internal
|
|
411
|
+
*/
|
|
412
|
+
drainTrackFragment(buf, start, end) {
|
|
413
|
+
let trackId = 0;
|
|
414
|
+
let samples = 0;
|
|
415
|
+
for (let offset = start; offset + 8 <= end;) {
|
|
416
|
+
const size = childSize(buf, offset, end);
|
|
417
|
+
if (size === 0) {
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
const type = buf.readUInt32BE(offset + 4);
|
|
421
|
+
const payload = offset + headerSizeAt(buf, offset);
|
|
422
|
+
// Both start with version/flags (4 bytes), then track_ID resp. sample_count.
|
|
423
|
+
if ((type === BOX.tfhd || type === BOX.trun) && payload + 8 <= offset + size) {
|
|
424
|
+
if (type === BOX.tfhd) {
|
|
425
|
+
trackId = buf.readUInt32BE(payload + 4);
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
samples += buf.readUInt32BE(payload + 4);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
offset += size;
|
|
432
|
+
}
|
|
433
|
+
this.drain(trackId, samples);
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Drain samples a moov carries in its sample tables.
|
|
437
|
+
*
|
|
438
|
+
* With `empty_moov` the tables are empty. Without it movenc writes the first
|
|
439
|
+
* fragment's samples into the moov instead of a moof.
|
|
440
|
+
*
|
|
441
|
+
* @param buf - Buffer holding the moov
|
|
442
|
+
*
|
|
443
|
+
* @param start - Offset of the moov payload
|
|
444
|
+
*
|
|
445
|
+
* @param end - End offset of the moov
|
|
446
|
+
*
|
|
447
|
+
* @internal
|
|
448
|
+
*/
|
|
449
|
+
drainInitSegment(buf, start, end) {
|
|
450
|
+
for (let offset = start; offset + 8 <= end;) {
|
|
451
|
+
const size = childSize(buf, offset, end);
|
|
452
|
+
if (size === 0) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
if (buf.readUInt32BE(offset + 4) === BOX.trak) {
|
|
456
|
+
const trakEnd = offset + size;
|
|
457
|
+
let trackId = 0;
|
|
458
|
+
let samples = 0;
|
|
459
|
+
for (let child = offset + headerSizeAt(buf, offset); child + 8 <= trakEnd;) {
|
|
460
|
+
const childBoxSize = childSize(buf, child, trakEnd);
|
|
461
|
+
if (childBoxSize === 0) {
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
const type = buf.readUInt32BE(child + 4);
|
|
465
|
+
const payload = child + headerSizeAt(buf, child);
|
|
466
|
+
if (type === BOX.tkhd && payload + 24 <= child + childBoxSize) {
|
|
467
|
+
// track_ID follows creation/modification time: 32-bit in version 0, 64-bit in version 1
|
|
468
|
+
trackId = buf.readUInt32BE(payload + (buf[payload] === 1 ? 20 : 12));
|
|
469
|
+
}
|
|
470
|
+
else if (type === BOX.mdia) {
|
|
471
|
+
samples = sampleTableCount(buf, payload, child + childBoxSize);
|
|
472
|
+
}
|
|
473
|
+
child += childBoxSize;
|
|
474
|
+
}
|
|
475
|
+
this.drain(trackId, samples);
|
|
476
|
+
}
|
|
477
|
+
offset += size;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Remove emitted samples from the queue of the stream behind a track.
|
|
482
|
+
*
|
|
483
|
+
* movenc numbers the tracks of the muxer's streams stream index + 1; tracks
|
|
484
|
+
* it adds itself (chapters, timecode) have no queue and are ignored.
|
|
485
|
+
*
|
|
486
|
+
* @param trackId - mp4 track_ID
|
|
487
|
+
*
|
|
488
|
+
* @param samples - Number of emitted samples
|
|
489
|
+
*
|
|
490
|
+
* @internal
|
|
491
|
+
*/
|
|
492
|
+
drain(trackId, samples) {
|
|
493
|
+
if (trackId > 0 && samples > 0) {
|
|
494
|
+
this.queues[trackId - 1]?.dropOldest(samples);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Build the error for a stream whose oldest pending packet is too old.
|
|
499
|
+
*
|
|
500
|
+
* @param streamIndex - Output stream index
|
|
501
|
+
*
|
|
502
|
+
* @param ageMs - Age of its oldest pending packet in ms
|
|
503
|
+
*
|
|
504
|
+
* @param pending - Number of its pending packets
|
|
505
|
+
*
|
|
506
|
+
* @returns Error describing the stalled stream
|
|
507
|
+
*
|
|
508
|
+
* @internal
|
|
509
|
+
*/
|
|
510
|
+
violation(streamIndex, ageMs, pending) {
|
|
511
|
+
const type = this.describeStream(streamIndex);
|
|
512
|
+
const label = type ? ` (${type})` : '';
|
|
513
|
+
const what = `the oldest of ${pending} pending packets has waited ${(ageMs / 1000).toFixed(1)}s without being emitted in a fragment`;
|
|
514
|
+
return new Error(`Muxer stall on output stream ${streamIndex}${label}: ${what}, more than maxPacketAge (${this.limitSeconds}s)`);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Header size of the box at an offset: 16 for a 64-bit size, else 8.
|
|
519
|
+
*
|
|
520
|
+
* @param buf - Buffer holding the box
|
|
521
|
+
*
|
|
522
|
+
* @param offset - Box start
|
|
523
|
+
*
|
|
524
|
+
* @returns Header size in bytes
|
|
525
|
+
*
|
|
526
|
+
* @internal
|
|
527
|
+
*/
|
|
528
|
+
function headerSizeAt(buf, offset) {
|
|
529
|
+
return buf.readUInt32BE(offset) === 1 ? 16 : 8;
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Size of a child box that must end within its parent.
|
|
533
|
+
*
|
|
534
|
+
* @param buf - Buffer holding the box
|
|
535
|
+
*
|
|
536
|
+
* @param offset - Box start (at least 8 bytes before end)
|
|
537
|
+
*
|
|
538
|
+
* @param end - End offset of the parent
|
|
539
|
+
*
|
|
540
|
+
* @returns Box size, or 0 when the box is malformed or overruns the parent
|
|
541
|
+
*
|
|
542
|
+
* @internal
|
|
543
|
+
*/
|
|
544
|
+
function childSize(buf, offset, end) {
|
|
545
|
+
let size = buf.readUInt32BE(offset);
|
|
546
|
+
let header = 8;
|
|
547
|
+
if (size === 1) {
|
|
548
|
+
if (offset + 16 > end) {
|
|
549
|
+
return 0;
|
|
550
|
+
}
|
|
551
|
+
size = Number(buf.readBigUInt64BE(offset + 8));
|
|
552
|
+
header = 16;
|
|
553
|
+
}
|
|
554
|
+
return size >= header && offset + size <= end ? size : 0;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Sample count of a track's sample table (mdia > minf > stbl > stsz/stz2).
|
|
558
|
+
*
|
|
559
|
+
* @param buf - Buffer holding the mdia
|
|
560
|
+
*
|
|
561
|
+
* @param start - Offset of the mdia payload
|
|
562
|
+
*
|
|
563
|
+
* @param end - End offset of the mdia
|
|
564
|
+
*
|
|
565
|
+
* @returns Number of samples, 0 if absent
|
|
566
|
+
*
|
|
567
|
+
* @internal
|
|
568
|
+
*/
|
|
569
|
+
function sampleTableCount(buf, start, end) {
|
|
570
|
+
const path = [BOX.minf, BOX.stbl];
|
|
571
|
+
let level = 0;
|
|
572
|
+
for (let offset = start; offset + 8 <= end;) {
|
|
573
|
+
const size = childSize(buf, offset, end);
|
|
574
|
+
if (size === 0) {
|
|
575
|
+
return 0;
|
|
576
|
+
}
|
|
577
|
+
const type = buf.readUInt32BE(offset + 4);
|
|
578
|
+
const payload = offset + headerSizeAt(buf, offset);
|
|
579
|
+
if (level < path.length && type === path[level]) {
|
|
580
|
+
// Descend: continue with the children of this box.
|
|
581
|
+
level++;
|
|
582
|
+
end = offset + size;
|
|
583
|
+
offset = payload;
|
|
584
|
+
continue;
|
|
585
|
+
}
|
|
586
|
+
// stsz and stz2 both keep sample_count after version/flags and one 32-bit field.
|
|
587
|
+
if (level === path.length && (type === BOX.stsz || type === BOX.stz2) && payload + 12 <= offset + size) {
|
|
588
|
+
return buf.readUInt32BE(payload + 8);
|
|
589
|
+
}
|
|
590
|
+
offset += size;
|
|
591
|
+
}
|
|
592
|
+
return 0;
|
|
593
|
+
}
|
|
594
|
+
//# sourceMappingURL=packet-age-watchdog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packet-age-watchdog.js","sourceRoot":"","sources":["../../../src/api/utilities/packet-age-watchdog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,GAAG,GAAG;IACV,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI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