@blockcast/mmt-container 0.3.0-main.5bb7058c73ff → 0.3.0-main.dd5b3a8dcbc8
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/README.md +22 -8
- package/dist/browser-runtime.js +780 -894
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +22 -6
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +19 -6
- package/dist/carp-catalog.js.map +2 -2
- package/dist/catalog-fec-params.d.ts +68 -28
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +39 -11
- package/dist/catalog-fec-params.js.map +3 -3
- package/dist/catalog-network-source.js +0 -1
- package/dist/catalog-network-source.js.map +2 -2
- package/dist/fec-manager.d.ts +17 -11
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +106 -165
- package/dist/fec-manager.js.map +2 -2
- package/dist/fec-state.d.ts +20 -11
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +1 -2
- package/dist/fec-state.js.map +2 -2
- package/dist/fec-worker-setup.d.ts +9 -3
- package/dist/fec-worker-setup.d.ts.map +1 -1
- package/dist/fec-worker-setup.js +5 -7
- package/dist/fec-worker-setup.js.map +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.js +0 -1
- package/dist/iso-block-locator.js.map +2 -2
- package/dist/mfu-reassembler.js +0 -1
- package/dist/mfu-reassembler.js.map +2 -2
- package/dist/mmtp-container-parser.d.ts +5 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +22 -1
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +33 -4
- package/dist/mmtp-container-parser.no-modules.js.map +2 -2
- package/dist/mmtp-decode-pipeline.js +22 -1
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-router.d.ts +12 -5
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +88 -194
- package/dist/mmtp-router.js.map +2 -2
- package/dist/multicast-input.js +0 -1
- package/dist/multicast-input.js.map +2 -2
- package/dist/multicast-manager.d.ts +31 -2
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +363 -366
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.js +0 -2
- package/dist/multicast-transport.js.map +2 -2
- package/dist/multicast-unwrap.js +0 -1
- package/dist/multicast-unwrap.js.map +2 -2
- package/dist/no-modules.js +33 -4
- package/dist/no-modules.js.map +2 -2
- package/dist/repair-fetch.d.ts +28 -17
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +26 -16
- package/dist/repair-fetch.js.map +3 -3
- package/dist/repair-layers.d.ts +18 -7
- package/dist/repair-layers.d.ts.map +1 -1
- package/dist/repair-layers.js +11 -4
- package/dist/repair-layers.js.map +2 -2
- package/dist/signaling.js +0 -4
- package/dist/signaling.js.map +2 -2
- package/dist/timestamp-codec.js +0 -1
- package/dist/timestamp-codec.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js +0 -1
- package/dist/wasm-mfu-reassembler.js.map +2 -2
- package/dist/wasm-mmtp-container-parser.js +22 -1
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/node_modules/@blockcast/fec-worker/README.md +6 -6
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +3 -19
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +1 -1
- package/node_modules/@blockcast/fec-worker/dist/block-order.js +3 -33
- package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +1 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +2 -3
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +1 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +2 -3
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +1 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +31 -38
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +1 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +22 -117
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +2 -2
- package/node_modules/@blockcast/fec-worker/src/block-order.ts +3 -37
- package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +2 -3
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +31 -38
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +41 -157
- package/node_modules/@blockcast/mmt-base/README.md +2 -2
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +7 -7
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +22 -18
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -29
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -54
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +26 -24
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.js +16 -16
- package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -1
- package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +24 -24
- package/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -58
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +27 -29
- package/node_modules/@blockcast/mmt-fec/README.md +4 -4
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +19 -20
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +26 -92
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +1 -1
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +16 -72
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +17 -96
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +1 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +1 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.js +1 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.js.map +1 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +2 -2
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +7 -7
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +22 -18
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -29
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -54
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +26 -24
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +16 -16
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +24 -24
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -58
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +27 -29
- package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +30 -109
- package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +23 -108
- package/node_modules/@blockcast/mmt-fec/src/index.ts +0 -1
- package/package.json +6 -6
- package/schemas/catalog.schema.json +2 -2
- package/src/carp-catalog.ts +30 -9
- package/src/catalog-fec-params.ts +128 -54
- package/src/fec-manager.ts +156 -213
- package/src/fec-state.ts +20 -11
- package/src/fec-worker-setup.ts +15 -7
- package/src/index.ts +2 -0
- package/src/mmtp-container-parser.ts +26 -0
- package/src/mmtp-router.ts +99 -269
- package/src/multicast-manager.ts +136 -25
- package/src/repair-fetch.ts +36 -22
- package/src/repair-layers.ts +28 -8
- package/test-vectors/catalog/README.md +34 -17
- package/test-vectors/catalog/negative/fec-block-profile-retired.json +52 -0
- package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +1 -1
- package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +1 -1
- package/test-vectors/catalog/negative/multicast-network-source-empty.json +1 -1
- package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +1 -1
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +1 -1
- package/test-vectors/catalog/positive/fec-layered-repair.json +2 -2
- package/test-vectors/catalog/positive/fec-multicast.json +2 -1
- package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +2 -1
- package/test-vectors/catalog-validation.json +40 -5
package/README.md
CHANGED
|
@@ -180,12 +180,13 @@ type FecAlgorithm = "none" | "raptorq" | "reed-solomon"
|
|
|
180
180
|
|
|
181
181
|
interface FecCatalogConfig {
|
|
182
182
|
algorithm: FecAlgorithm // §3.1
|
|
183
|
-
|
|
183
|
+
blockProfile?: "iso-ssbg1-v1" // REQUIRED unless algorithm is "none"; never defaulted (BLO-35597)
|
|
184
|
+
sourceSymbols: number // K (REQUIRED): K_max, the largest SSB_length of any block
|
|
184
185
|
repairSymbols: number // P (REQUIRED)
|
|
185
186
|
symbolSize: number // T, 8-byte aligned (REQUIRED)
|
|
186
187
|
interleaveDepthMs?: number // FEC block span in MILLISECONDS, default 0 (single-group blocks)
|
|
187
188
|
repairTrack: string // §6.1 — required
|
|
188
|
-
mode?: "interleaved" | "object"
|
|
189
|
+
mode?: "interleaved" | "object" // extension; "object" (per-frame object blocks) is retired: @blockcast/mmt-fec refuses it
|
|
189
190
|
uep?: { keyRatio: number; deltaRatio: number } // §9.1 — Unequal Error Protection
|
|
190
191
|
deltaFailWindowBlocks?: number // D-11, base track only
|
|
191
192
|
deltaProbeIntervalMs?: number // D-13, base track only
|
|
@@ -292,7 +293,8 @@ Codec-agnostic FEC decode service. Owns per-track decoder instances (sync WASM v
|
|
|
292
293
|
|
|
293
294
|
```ts
|
|
294
295
|
interface FECManagerConfig {
|
|
295
|
-
|
|
296
|
+
blockProfile?: FecBlockProfile // "iso-ssbg1-v1"; required for every FEC track, validated with parseFecBlockProfile
|
|
297
|
+
k?: number // K_max (largest SSB_length), never a block stride
|
|
296
298
|
symbolSize?: number // T (bytes per symbol). NOT repair count.
|
|
297
299
|
interleaveDepthMs?: number // FEC block span in MILLISECONDS — see MIN_INTERLEAVE_DEPTH_MS in fec-manager.ts
|
|
298
300
|
fps?: number
|
|
@@ -314,6 +316,15 @@ class FECManager {
|
|
|
314
316
|
|
|
315
317
|
`FECManager.configure()` takes `symbolSize` (bytes per symbol, T). Repair count is a distinct parameter and must never be passed in its place.
|
|
316
318
|
|
|
319
|
+
FEC blocks follow one block profile, `iso-ssbg1-v1` (ISO/IEC 23008-1 Annex C ssbg_mode1, BLO-35597):
|
|
320
|
+
|
|
321
|
+
- A source symbol is `u16 length || packet || 00h` padding to T.
|
|
322
|
+
- A block is K' = SSB_length symbols keyed by its 32-bit SS_Start, and SS_ID increments by one per FEC source packet, wrapping at 2^32 (RFC 1982 serial arithmetic). Blocks are variable-length (SSB_length ≤ K), so K is an upper bound and never a stride: no block number is computed from an SS_ID.
|
|
323
|
+
- A source symbol is placed in a block only once a repair symbol states that block's (SS_Start, SSB_length); until then it is held. Repair ESI = SSB_length + RS_ID.
|
|
324
|
+
- The `sbn` in `getBlockStates()`, the block callbacks, and `RepairFetchRequest` is that SS_Start block key (the name is historical). The MoQ repair group id is the 62-bit wrap-epoch-extended SS_Start (`extSsStart` in `@blockcast/mmt-fec`), never the 32-bit key itself.
|
|
325
|
+
|
|
326
|
+
`blockProfile` is never defaulted and never inferred from the wire. The retired Blockcast-private token `k-padded-v1` (zero-padded K-symbol blocks) is refused wherever a profile is read: `parseFecBlockProfile` throws for it (and for an absent token), and `FECManager` track configuration, `setupFecWorkerForTrack`, and `wireRepairFetch` all validate through it.
|
|
327
|
+
|
|
317
328
|
`interleaveDepthMs` is the full FEC block span in **milliseconds** per CARP §5.1, valid range 33 ms (interactive / gaming, `MIN_INTERLEAVE_DEPTH_MS`) to 10 000 ms (broadcast ATSC 3.0). `configure()` warns if a positive value below `MIN_INTERLEAVE_DEPTH_MS` (33) is passed — that is almost certainly a raw frame count, not milliseconds — and such sub-floor values never drive the block timeout (the established timeout is preserved instead of collapsing to ~0).
|
|
318
329
|
|
|
319
330
|
### Keyframe-protected repair (`./block-policy`, `./conceal-timeline`)
|
|
@@ -325,9 +336,10 @@ Every FEC block still gets in-band FEC decode. On top of that:
|
|
|
325
336
|
DU-header sample position) against catalog geometry (framerate,
|
|
326
337
|
`interleaveDepthMs`, keyframe interval). Geometry that cannot be derived
|
|
327
338
|
exactly, or any violated invariant, runs the track `all-protected` (every
|
|
328
|
-
video block `unknown`).
|
|
329
|
-
|
|
330
|
-
|
|
339
|
+
video block `unknown`). A block every symbol of which vanished is
|
|
340
|
+
materialised from the surrounding block evidence. A frame split across
|
|
341
|
+
ADJACENT blocks (a block closing at K symbols) is expected; only source
|
|
342
|
+
packets whose authored order and block order disagree (a round-robin
|
|
331
343
|
interleave) trip `block-not-contiguous`. Pass the catalog track name to
|
|
332
344
|
`configureTrackFec(packetId, config, catalogTrackName)` so ABR rungs that
|
|
333
345
|
share a packetId each classify with their own framerate and GOP; a rung on
|
|
@@ -336,8 +348,10 @@ Every FEC block still gets in-band FEC decode. On top of that:
|
|
|
336
348
|
and P1 (`audio`) immediately; P2 (`delta`) only while no P0/P1 is queued or
|
|
337
349
|
in flight, earliest deadline first, preempted by any new P0/P1. No timers.
|
|
338
350
|
- **FETCH priority (draft-ramadan-moq-fec §11.4.5).** The transport gets one
|
|
339
|
-
`RepairFetchRequest { repairTrack, sbn, packetId, signal,
|
|
340
|
-
subscriberPriority }
|
|
351
|
+
`RepairFetchRequest { repairTrack, sbn, blockProfile, packetId, signal,
|
|
352
|
+
subscriberPriority }`, FETCHes the block's repair group (MoQ group id
|
|
353
|
+
`extSsStart(wrapEpoch, sbn)`, never `sbn` itself), and puts
|
|
354
|
+
`subscriberPriority` on the FETCH
|
|
341
355
|
(`undefined` = omit the parameter; the publisher then uses 128,
|
|
342
356
|
draft-ietf-moq-transport-16 §9.2.2.3). P0 requests carry
|
|
343
357
|
`min(sourcePriority, 191)`; P1/P2 carry `max(repairPriority, 192)`. Both
|