@blockcast/mmt-container 0.3.0 → 0.4.0-main.d6f2737828fc
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 +1185 -1049
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +24 -8
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +21 -8
- package/dist/carp-catalog.js.map +2 -2
- package/dist/catalog-fec-params.d.ts +88 -28
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +59 -17
- 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/cmaf-block-assembler.d.ts +0 -2
- package/dist/cmaf-block-assembler.d.ts.map +1 -1
- package/dist/cmaf-block-assembler.js +0 -1
- package/dist/cmaf-block-assembler.js.map +2 -2
- package/dist/delta-fallback-config.d.ts +42 -0
- package/dist/delta-fallback-config.d.ts.map +1 -0
- package/dist/delta-fallback-config.js +59 -0
- package/dist/delta-fallback-config.js.map +7 -0
- package/dist/fec-manager.d.ts +35 -26
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +300 -273
- package/dist/fec-manager.js.map +2 -2
- package/dist/fec-state.d.ts +19 -31
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +3 -4
- package/dist/fec-state.js.map +2 -2
- package/dist/fec-worker-setup.d.ts +16 -6
- package/dist/fec-worker-setup.d.ts.map +1 -1
- package/dist/fec-worker-setup.js +72 -34
- package/dist/fec-worker-setup.js.map +2 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -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/media-router.d.ts +20 -8
- package/dist/media-router.d.ts.map +1 -1
- package/dist/media-router.js +46 -21
- package/dist/media-router.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 +37 -9
- 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 +36 -16
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +126 -213
- 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 +33 -3
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +660 -529
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.d.ts +1 -1
- package/dist/multicast-transport.d.ts.map +1 -1
- package/dist/multicast-transport.js +42 -14
- package/dist/multicast-transport.js.map +3 -3
- package/dist/multicast-unwrap.js +0 -1
- package/dist/multicast-unwrap.js.map +2 -2
- package/dist/no-modules.js +36 -8
- package/dist/no-modules.js.map +2 -2
- package/dist/repair-fetch.d.ts +30 -19
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +32 -18
- 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/track-session.d.ts +7 -0
- package/dist/track-session.d.ts.map +1 -1
- package/dist/track-session.js +15 -8
- package/dist/track-session.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/package.json +8 -14
- package/schemas/catalog.schema.json +3 -3
- package/src/carp-catalog.ts +35 -13
- package/src/catalog-fec-params.ts +173 -64
- package/src/cmaf-block-assembler.ts +1 -4
- package/src/delta-fallback-config.ts +72 -0
- package/src/fec-manager.ts +413 -317
- package/src/fec-state.ts +20 -32
- package/src/fec-worker-setup.ts +105 -55
- package/src/index.ts +10 -0
- package/src/media-router.ts +59 -21
- package/src/mmtp-container-parser.ts +26 -0
- package/src/mmtp-router.ts +145 -303
- package/src/multicast-manager.ts +172 -60
- package/src/multicast-transport.ts +16 -9
- package/src/repair-fetch.ts +46 -27
- package/src/repair-layers.ts +28 -8
- package/src/track-session.ts +28 -9
- 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-timing.json +356 -0
- package/test-vectors/catalog-validation.json +40 -5
- package/node_modules/@blockcast/fec-worker/README.md +0 -223
- package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +0 -38
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/block-order.js +0 -78
- package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +0 -93
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +0 -346
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +0 -380
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +0 -11
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +0 -14
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +0 -859
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +0 -7
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts +0 -10
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/index.js +0 -8
- package/node_modules/@blockcast/fec-worker/dist/index.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +0 -20
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +0 -370
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +0 -7
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +0 -104
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +0 -181
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +0 -194
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +0 -62
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +0 -9
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +0 -1
- package/node_modules/@blockcast/fec-worker/dist/transfer.js +0 -13
- package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +0 -1
- package/node_modules/@blockcast/fec-worker/package.json +0 -59
- package/node_modules/@blockcast/fec-worker/src/block-order.ts +0 -93
- package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +0 -392
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +0 -399
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +0 -1502
- package/node_modules/@blockcast/fec-worker/src/index.ts +0 -35
- package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +0 -589
- package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +0 -222
- package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +0 -209
- package/node_modules/@blockcast/fec-worker/src/transfer.ts +0 -12
- package/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
- package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
- package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
- package/node_modules/@blockcast/mmt-base/README.md +0 -134
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
- package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/package.json +0 -49
- package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
- package/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
- package/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
- package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
- package/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
- package/node_modules/@blockcast/mmt-fec/README.md +0 -271
- package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +0 -82
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +0 -296
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +0 -106
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +0 -288
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +0 -46
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +0 -96
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +0 -33
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +0 -57
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +0 -205
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +0 -240
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +0 -28
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/index.js +0 -28
- package/node_modules/@blockcast/mmt-fec/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +0 -20
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +0 -28
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +0 -258
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +0 -382
- package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +0 -41
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +0 -81
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +0 -82
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +0 -170
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +0 -134
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +0 -49
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
- package/node_modules/@blockcast/mmt-fec/package.json +0 -79
- package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +0 -371
- package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +0 -439
- package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +0 -127
- package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +0 -68
- package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +0 -310
- package/node_modules/@blockcast/mmt-fec/src/index.ts +0 -94
- package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +0 -34
- package/node_modules/@blockcast/mmt-fec/src/oti.ts +0 -463
- package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +0 -101
- package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +0 -195
- package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +0 -28
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +0 -128
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +0 -4
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +0 -4
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +0 -37
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +0 -179
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +0 -99
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +0 -492
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +0 -1
- package/node_modules/@blockcast/mmt-manifest-verify/package.json +0 -45
- package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +0 -171
- package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +0 -3
- package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +0 -230
- package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +0 -669
- package/node_modules/@noble/hashes/LICENSE +0 -21
- package/node_modules/@noble/hashes/README.md +0 -521
- package/node_modules/@noble/hashes/_assert.d.ts +0 -17
- package/node_modules/@noble/hashes/_assert.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_assert.js +0 -18
- package/node_modules/@noble/hashes/_assert.js.map +0 -1
- package/node_modules/@noble/hashes/_blake.d.ts +0 -14
- package/node_modules/@noble/hashes/_blake.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_blake.js +0 -50
- package/node_modules/@noble/hashes/_blake.js.map +0 -1
- package/node_modules/@noble/hashes/_md.d.ts +0 -51
- package/node_modules/@noble/hashes/_md.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_md.js +0 -162
- package/node_modules/@noble/hashes/_md.js.map +0 -1
- package/node_modules/@noble/hashes/_u64.d.ts +0 -55
- package/node_modules/@noble/hashes/_u64.d.ts.map +0 -1
- package/node_modules/@noble/hashes/_u64.js +0 -90
- package/node_modules/@noble/hashes/_u64.js.map +0 -1
- package/node_modules/@noble/hashes/argon2.d.ts +0 -32
- package/node_modules/@noble/hashes/argon2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/argon2.js +0 -401
- package/node_modules/@noble/hashes/argon2.js.map +0 -1
- package/node_modules/@noble/hashes/blake1.d.ts +0 -106
- package/node_modules/@noble/hashes/blake1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake1.js +0 -459
- package/node_modules/@noble/hashes/blake1.js.map +0 -1
- package/node_modules/@noble/hashes/blake2.d.ts +0 -116
- package/node_modules/@noble/hashes/blake2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2.js +0 -420
- package/node_modules/@noble/hashes/blake2.js.map +0 -1
- package/node_modules/@noble/hashes/blake2b.d.ts +0 -11
- package/node_modules/@noble/hashes/blake2b.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2b.js +0 -14
- package/node_modules/@noble/hashes/blake2b.js.map +0 -1
- package/node_modules/@noble/hashes/blake2s.d.ts +0 -20
- package/node_modules/@noble/hashes/blake2s.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake2s.js +0 -24
- package/node_modules/@noble/hashes/blake2s.js.map +0 -1
- package/node_modules/@noble/hashes/blake3.d.ts +0 -54
- package/node_modules/@noble/hashes/blake3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/blake3.js +0 -255
- package/node_modules/@noble/hashes/blake3.js.map +0 -1
- package/node_modules/@noble/hashes/crypto.d.ts +0 -2
- package/node_modules/@noble/hashes/crypto.d.ts.map +0 -1
- package/node_modules/@noble/hashes/crypto.js +0 -5
- package/node_modules/@noble/hashes/crypto.js.map +0 -1
- package/node_modules/@noble/hashes/cryptoNode.d.ts +0 -2
- package/node_modules/@noble/hashes/cryptoNode.d.ts.map +0 -1
- package/node_modules/@noble/hashes/cryptoNode.js +0 -18
- package/node_modules/@noble/hashes/cryptoNode.js.map +0 -1
- package/node_modules/@noble/hashes/eskdf.d.ts +0 -47
- package/node_modules/@noble/hashes/eskdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/eskdf.js +0 -166
- package/node_modules/@noble/hashes/eskdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_assert.d.ts +0 -17
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_assert.js +0 -15
- package/node_modules/@noble/hashes/esm/_assert.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_blake.d.ts +0 -14
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_blake.js +0 -45
- package/node_modules/@noble/hashes/esm/_blake.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_md.d.ts +0 -51
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_md.js +0 -155
- package/node_modules/@noble/hashes/esm/_md.js.map +0 -1
- package/node_modules/@noble/hashes/esm/_u64.d.ts +0 -55
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/_u64.js +0 -67
- package/node_modules/@noble/hashes/esm/_u64.js.map +0 -1
- package/node_modules/@noble/hashes/esm/argon2.d.ts +0 -32
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/argon2.js +0 -392
- package/node_modules/@noble/hashes/esm/argon2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake1.d.ts +0 -106
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake1.js +0 -452
- package/node_modules/@noble/hashes/esm/blake1.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2.d.ts +0 -116
- package/node_modules/@noble/hashes/esm/blake2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2.js +0 -413
- package/node_modules/@noble/hashes/esm/blake2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +0 -11
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2b.js +0 -11
- package/node_modules/@noble/hashes/esm/blake2b.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +0 -20
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake2s.js +0 -21
- package/node_modules/@noble/hashes/esm/blake2s.js.map +0 -1
- package/node_modules/@noble/hashes/esm/blake3.d.ts +0 -54
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/blake3.js +0 -251
- package/node_modules/@noble/hashes/esm/blake3.js.map +0 -1
- package/node_modules/@noble/hashes/esm/crypto.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/crypto.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/crypto.js +0 -2
- package/node_modules/@noble/hashes/esm/crypto.js.map +0 -1
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/cryptoNode.js +0 -15
- package/node_modules/@noble/hashes/esm/cryptoNode.js.map +0 -1
- package/node_modules/@noble/hashes/esm/eskdf.d.ts +0 -47
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/eskdf.js +0 -160
- package/node_modules/@noble/hashes/esm/eskdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +0 -36
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/hkdf.js +0 -82
- package/node_modules/@noble/hashes/esm/hkdf.js.map +0 -1
- package/node_modules/@noble/hashes/esm/hmac.d.ts +0 -35
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/hmac.js +0 -86
- package/node_modules/@noble/hashes/esm/hmac.js.map +0 -1
- package/node_modules/@noble/hashes/esm/index.d.ts +0 -2
- package/node_modules/@noble/hashes/esm/index.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/index.js +0 -33
- package/node_modules/@noble/hashes/esm/index.js.map +0 -1
- package/node_modules/@noble/hashes/esm/legacy.d.ts +0 -71
- package/node_modules/@noble/hashes/esm/legacy.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/legacy.js +0 -281
- package/node_modules/@noble/hashes/esm/legacy.js.map +0 -1
- package/node_modules/@noble/hashes/esm/package.json +0 -10
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +0 -23
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/pbkdf2.js +0 -97
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +0 -13
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/ripemd160.js +0 -13
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +0 -1
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +0 -34
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/scrypt.js +0 -228
- package/node_modules/@noble/hashes/esm/scrypt.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha1.d.ts +0 -11
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha1.js +0 -11
- package/node_modules/@noble/hashes/esm/sha1.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha2.d.ts +0 -159
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha2.js +0 -375
- package/node_modules/@noble/hashes/esm/sha2.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha256.d.ts +0 -20
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha256.js +0 -20
- package/node_modules/@noble/hashes/esm/sha256.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +0 -142
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3-addons.js +0 -393
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3.d.ts +0 -53
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha3.js +0 -234
- package/node_modules/@noble/hashes/esm/sha3.js.map +0 -1
- package/node_modules/@noble/hashes/esm/sha512.d.ts +0 -26
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/sha512.js +0 -26
- package/node_modules/@noble/hashes/esm/sha512.js.map +0 -1
- package/node_modules/@noble/hashes/esm/utils.d.ts +0 -161
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +0 -1
- package/node_modules/@noble/hashes/esm/utils.js +0 -281
- package/node_modules/@noble/hashes/esm/utils.js.map +0 -1
- package/node_modules/@noble/hashes/hkdf.d.ts +0 -36
- package/node_modules/@noble/hashes/hkdf.d.ts.map +0 -1
- package/node_modules/@noble/hashes/hkdf.js +0 -88
- package/node_modules/@noble/hashes/hkdf.js.map +0 -1
- package/node_modules/@noble/hashes/hmac.d.ts +0 -35
- package/node_modules/@noble/hashes/hmac.d.ts.map +0 -1
- package/node_modules/@noble/hashes/hmac.js +0 -91
- package/node_modules/@noble/hashes/hmac.js.map +0 -1
- package/node_modules/@noble/hashes/index.d.ts +0 -1
- package/node_modules/@noble/hashes/index.d.ts.map +0 -1
- package/node_modules/@noble/hashes/index.js +0 -33
- package/node_modules/@noble/hashes/index.js.map +0 -1
- package/node_modules/@noble/hashes/legacy.d.ts +0 -71
- package/node_modules/@noble/hashes/legacy.d.ts.map +0 -1
- package/node_modules/@noble/hashes/legacy.js +0 -287
- package/node_modules/@noble/hashes/legacy.js.map +0 -1
- package/node_modules/@noble/hashes/package.json +0 -266
- package/node_modules/@noble/hashes/pbkdf2.d.ts +0 -23
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/pbkdf2.js +0 -101
- package/node_modules/@noble/hashes/pbkdf2.js.map +0 -1
- package/node_modules/@noble/hashes/ripemd160.d.ts +0 -13
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +0 -1
- package/node_modules/@noble/hashes/ripemd160.js +0 -16
- package/node_modules/@noble/hashes/ripemd160.js.map +0 -1
- package/node_modules/@noble/hashes/scrypt.d.ts +0 -34
- package/node_modules/@noble/hashes/scrypt.d.ts.map +0 -1
- package/node_modules/@noble/hashes/scrypt.js +0 -232
- package/node_modules/@noble/hashes/scrypt.js.map +0 -1
- package/node_modules/@noble/hashes/sha1.d.ts +0 -11
- package/node_modules/@noble/hashes/sha1.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha1.js +0 -14
- package/node_modules/@noble/hashes/sha1.js.map +0 -1
- package/node_modules/@noble/hashes/sha2.d.ts +0 -159
- package/node_modules/@noble/hashes/sha2.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha2.js +0 -384
- package/node_modules/@noble/hashes/sha2.js.map +0 -1
- package/node_modules/@noble/hashes/sha256.d.ts +0 -20
- package/node_modules/@noble/hashes/sha256.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha256.js +0 -23
- package/node_modules/@noble/hashes/sha256.js.map +0 -1
- package/node_modules/@noble/hashes/sha3-addons.d.ts +0 -142
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha3-addons.js +0 -402
- package/node_modules/@noble/hashes/sha3-addons.js.map +0 -1
- package/node_modules/@noble/hashes/sha3.d.ts +0 -53
- package/node_modules/@noble/hashes/sha3.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha3.js +0 -239
- package/node_modules/@noble/hashes/sha3.js.map +0 -1
- package/node_modules/@noble/hashes/sha512.d.ts +0 -26
- package/node_modules/@noble/hashes/sha512.d.ts.map +0 -1
- package/node_modules/@noble/hashes/sha512.js +0 -29
- package/node_modules/@noble/hashes/sha512.js.map +0 -1
- package/node_modules/@noble/hashes/src/_assert.ts +0 -22
- package/node_modules/@noble/hashes/src/_blake.ts +0 -50
- package/node_modules/@noble/hashes/src/_md.ts +0 -176
- package/node_modules/@noble/hashes/src/_u64.ts +0 -91
- package/node_modules/@noble/hashes/src/argon2.ts +0 -497
- package/node_modules/@noble/hashes/src/blake1.ts +0 -534
- package/node_modules/@noble/hashes/src/blake2.ts +0 -486
- package/node_modules/@noble/hashes/src/blake2b.ts +0 -10
- package/node_modules/@noble/hashes/src/blake2s.ts +0 -20
- package/node_modules/@noble/hashes/src/blake3.ts +0 -272
- package/node_modules/@noble/hashes/src/crypto.ts +0 -9
- package/node_modules/@noble/hashes/src/cryptoNode.ts +0 -15
- package/node_modules/@noble/hashes/src/eskdf.ts +0 -187
- package/node_modules/@noble/hashes/src/hkdf.ts +0 -88
- package/node_modules/@noble/hashes/src/hmac.ts +0 -94
- package/node_modules/@noble/hashes/src/index.ts +0 -31
- package/node_modules/@noble/hashes/src/legacy.ts +0 -293
- package/node_modules/@noble/hashes/src/pbkdf2.ts +0 -122
- package/node_modules/@noble/hashes/src/ripemd160.ts +0 -12
- package/node_modules/@noble/hashes/src/scrypt.ts +0 -257
- package/node_modules/@noble/hashes/src/sha1.ts +0 -10
- package/node_modules/@noble/hashes/src/sha2.ts +0 -402
- package/node_modules/@noble/hashes/src/sha256.ts +0 -24
- package/node_modules/@noble/hashes/src/sha3-addons.ts +0 -499
- package/node_modules/@noble/hashes/src/sha3.ts +0 -258
- package/node_modules/@noble/hashes/src/sha512.ts +0 -34
- package/node_modules/@noble/hashes/src/utils.ts +0 -395
- package/node_modules/@noble/hashes/utils.d.ts +0 -161
- package/node_modules/@noble/hashes/utils.d.ts.map +0 -1
- package/node_modules/@noble/hashes/utils.js +0 -313
- package/node_modules/@noble/hashes/utils.js.map +0 -1
package/src/mmtp-router.ts
CHANGED
|
@@ -529,8 +529,9 @@ export interface FECManagerLike {
|
|
|
529
529
|
* Returns recovered block bytes if recovery completes, else null.
|
|
530
530
|
*
|
|
531
531
|
* `symbolData` is the complete MMTP packet without its Source FEC Payload
|
|
532
|
-
* ID, unpadded and possibly a view into the received packet. The
|
|
533
|
-
*
|
|
532
|
+
* ID, unpadded and possibly a view into the received packet. The decoder
|
|
533
|
+
* builds the ssbg_mode1 symbol (`u16 len || packet || 00h`, zero-filled to
|
|
534
|
+
* the packet's own symbol size T) from it; nothing pads it on the way.
|
|
534
535
|
*
|
|
535
536
|
* Optional `alta` carries the detached ALTA authenticator extracted from
|
|
536
537
|
* the MMTP header-extension trailer (08-07 Path 2) — present on signed
|
|
@@ -599,17 +600,14 @@ export interface FECManagerLike {
|
|
|
599
600
|
catalogTrackName?: string,
|
|
600
601
|
): "pending" | "complete" | "failed" | "untracked";
|
|
601
602
|
|
|
602
|
-
/** Highest SBN seen for a stream in the current epoch. */
|
|
603
|
-
highestSbn?(packetId: number, catalogTrackName?: string): number | undefined;
|
|
604
|
-
|
|
605
603
|
/** Catalog/reset epoch of a packet's streams. */
|
|
606
604
|
epochFor?(packetId: number): number;
|
|
607
605
|
|
|
608
606
|
/**
|
|
609
607
|
* Catalog `fec.interleaveDepthMs` (§5.1 full block span) of a packetId; 0
|
|
610
|
-
* when the stream has none.
|
|
608
|
+
* when the stream has none, undefined when the packetId is unconfigured.
|
|
611
609
|
*/
|
|
612
|
-
interleaveDepthMsForPacket?(packetId: number): number;
|
|
610
|
+
interleaveDepthMsForPacket?(packetId: number): number | undefined;
|
|
613
611
|
|
|
614
612
|
/**
|
|
615
613
|
* How long a terminal block stays authoritative before it retires to
|
|
@@ -617,7 +615,7 @@ export interface FECManagerLike {
|
|
|
617
615
|
* scan never reads a retired, delivered block as lost. Required whenever
|
|
618
616
|
* blockResolution is.
|
|
619
617
|
*/
|
|
620
|
-
terminalRetentionMsForPacket?(packetId: number): number;
|
|
618
|
+
terminalRetentionMsForPacket?(packetId: number): number | undefined;
|
|
621
619
|
|
|
622
620
|
/** Configured codec of a packetId. */
|
|
623
621
|
codecFor?(packetId: number): string | undefined;
|
|
@@ -691,20 +689,17 @@ export interface FECManagerLike {
|
|
|
691
689
|
toSsId: number,
|
|
692
690
|
): readonly number[] | null;
|
|
693
691
|
|
|
694
|
-
/** FEC source symbol count K per block. */
|
|
695
|
-
readonly k: number;
|
|
696
|
-
kForPacket?(packetId: number): number;
|
|
697
692
|
|
|
698
693
|
/**
|
|
699
694
|
* The longest a block stays open after its last symbol (inactivity fail
|
|
700
695
|
* bound plus D-28 repair grace). With interleaveDepthMsForPacket it bounds
|
|
701
696
|
* how long the router keeps a stream's duplicate ledgers.
|
|
702
697
|
*/
|
|
703
|
-
blockLifetimeMsForPacket?(packetId: number): number;
|
|
698
|
+
blockLifetimeMsForPacket?(packetId: number): number | undefined;
|
|
704
699
|
|
|
705
700
|
/** FEC symbol size T in bytes (0 = unknown / no FEC). */
|
|
706
701
|
readonly symbolSize: number;
|
|
707
|
-
symbolSizeForPacket?(packetId: number): number;
|
|
702
|
+
symbolSizeForPacket?(packetId: number): number | undefined;
|
|
708
703
|
|
|
709
704
|
/** Update framerate — used to refine FEC block timeout. */
|
|
710
705
|
setFramerate(fps: number): void;
|
|
@@ -977,6 +972,8 @@ export class MmtpRouter {
|
|
|
977
972
|
*/
|
|
978
973
|
#onPublisherRestart: ((packetId: number, catalogTrackName: string) => void) | null;
|
|
979
974
|
#publisherRestarts = 0;
|
|
975
|
+
/** Inits delivered with no onTrackInit handler for their packetId (MOQT-01). */
|
|
976
|
+
#unmappedInitDeliveries = 0;
|
|
980
977
|
// FEC Payload IDs left unread because their (owner) packetId had no
|
|
981
978
|
// configured fec.blockProfile (see #noteUnreadableFecPayloadId).
|
|
982
979
|
#fecPayloadIdsWithoutProfile = 0;
|
|
@@ -1324,17 +1321,28 @@ export class MmtpRouter {
|
|
|
1324
1321
|
return NO_FEC_GEOMETRY_HORIZON;
|
|
1325
1322
|
}
|
|
1326
1323
|
const blockSpanMs = fec.interleaveDepthMsForPacket(packetId);
|
|
1324
|
+
const blockLifetimeMs = fec.blockLifetimeMsForPacket(packetId);
|
|
1325
|
+
// An unconfigured packetId has no FEC geometry (BLO-45953).
|
|
1326
|
+
if (blockSpanMs === undefined || blockLifetimeMs === undefined) return NO_FEC_GEOMETRY_HORIZON;
|
|
1327
1327
|
// FECManager reports 0 for a stream the catalog gave no block span.
|
|
1328
1328
|
if (blockSpanMs === 0) return NO_BLOCK_SPAN_HORIZON;
|
|
1329
1329
|
return {
|
|
1330
1330
|
kind: "fec-horizon",
|
|
1331
|
-
retentionMs: duplicateRetentionMs({
|
|
1332
|
-
blockSpanMs,
|
|
1333
|
-
blockLifetimeMs: fec.blockLifetimeMsForPacket(packetId),
|
|
1334
|
-
}),
|
|
1331
|
+
retentionMs: duplicateRetentionMs({ blockSpanMs, blockLifetimeMs }),
|
|
1335
1332
|
};
|
|
1336
1333
|
}
|
|
1337
1334
|
|
|
1335
|
+
/**
|
|
1336
|
+
* Init segments delivered for a packetId with no `onTrackInit` handler
|
|
1337
|
+
* since construction, whether the deprecated aggregate `onInitSegment`
|
|
1338
|
+
* callback then received them or nothing did. A supported deployment reads
|
|
1339
|
+
* 0 here; a non-zero value is the evidence that blocks removing the
|
|
1340
|
+
* aggregate callback (MOQT-01, BLO-21181).
|
|
1341
|
+
*/
|
|
1342
|
+
get unmappedInitDeliveryCount(): number {
|
|
1343
|
+
return this.#unmappedInitDeliveries;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1338
1346
|
/** Publisher restarts detected on the multicast leg since construction. */
|
|
1339
1347
|
get publisherRestartCount(): number {
|
|
1340
1348
|
return this.#publisherRestarts;
|
|
@@ -1440,8 +1448,8 @@ export class MmtpRouter {
|
|
|
1440
1448
|
|
|
1441
1449
|
/** Update MFU reassembly timeout. Source and FEC-recovery paths share the
|
|
1442
1450
|
* parser's single reassembler (BLO-8151), so one update covers both. */
|
|
1443
|
-
setMfuTimeoutMs(ms: number): void {
|
|
1444
|
-
if (ms <= 0) throw new Error("[MmtpRouter] mfuTimeoutMs must be > 0");
|
|
1451
|
+
setMfuTimeoutMs(ms: number | null): void {
|
|
1452
|
+
if (ms !== null && ms <= 0) throw new Error("[MmtpRouter] mfuTimeoutMs must be > 0");
|
|
1445
1453
|
this.#parser.setMfuTimeoutMs(ms);
|
|
1446
1454
|
}
|
|
1447
1455
|
|
|
@@ -1533,7 +1541,15 @@ export class MmtpRouter {
|
|
|
1533
1541
|
this.#trackPacketCallbacks.set(packetId, cb);
|
|
1534
1542
|
}
|
|
1535
1543
|
|
|
1536
|
-
/**
|
|
1544
|
+
/**
|
|
1545
|
+
* Register an init segment callback (ftyp+moov from MMTP MPU metadata).
|
|
1546
|
+
* Receives an init only for a packetId with no `onTrackInit` handler.
|
|
1547
|
+
*
|
|
1548
|
+
* @deprecated Use onTrackInit(packetId, cb). Still delivered as a fallback;
|
|
1549
|
+
* removed in the 1.0.0 major, no earlier than one minor release after this
|
|
1550
|
+
* deprecation reaches the `latest` dist-tag (BLO-21181). Count fallback
|
|
1551
|
+
* deliveries with `unmappedInitDeliveryCount`.
|
|
1552
|
+
*/
|
|
1537
1553
|
onInitSegment(cb: (data: Uint8Array) => void): void {
|
|
1538
1554
|
this.#onInitSegment = cb;
|
|
1539
1555
|
}
|
|
@@ -1551,20 +1567,19 @@ export class MmtpRouter {
|
|
|
1551
1567
|
* multi-sample CMAF segments instead of per-frame callbacks. */
|
|
1552
1568
|
enableMseAssembler(
|
|
1553
1569
|
packetId: number,
|
|
1554
|
-
config:
|
|
1570
|
+
config: BlockAssemblerConfig,
|
|
1555
1571
|
catalogTrackName?: string,
|
|
1556
1572
|
): CmafBlockAssembler {
|
|
1557
|
-
const k = this.#kForPacket(packetId);
|
|
1558
1573
|
const assemblerKey = this.#mseAssemblerKey(packetId, catalogTrackName);
|
|
1559
1574
|
const previous = this.#mseAssemblers.get(assemblerKey);
|
|
1560
1575
|
if (previous) {
|
|
1561
1576
|
previous.flush();
|
|
1562
1577
|
previous.dispose();
|
|
1563
1578
|
}
|
|
1564
|
-
const assembler = new CmafBlockAssembler(
|
|
1579
|
+
const assembler = new CmafBlockAssembler(config);
|
|
1565
1580
|
this.#mseAssemblers.set(assemblerKey, assembler);
|
|
1566
1581
|
console.log(
|
|
1567
|
-
`[MmtpRouter] MSE assembler enabled for packetId=${packetId}${catalogTrackName === undefined ? "" : ` track=${catalogTrackName}`} (
|
|
1582
|
+
`[MmtpRouter] MSE assembler enabled for packetId=${packetId}${catalogTrackName === undefined ? "" : ` track=${catalogTrackName}`} (${config.trackType})`,
|
|
1568
1583
|
);
|
|
1569
1584
|
return assembler;
|
|
1570
1585
|
}
|
|
@@ -1702,6 +1717,24 @@ export class MmtpRouter {
|
|
|
1702
1717
|
this.#fecMappersByPacketId.set(packetId, mapper);
|
|
1703
1718
|
}
|
|
1704
1719
|
|
|
1720
|
+
/**
|
|
1721
|
+
* Release the router side of a packetId whose FEC is ending: drop its block
|
|
1722
|
+
* mapper and end its FEC release gating. Frames the gate holds are released
|
|
1723
|
+
* in order, each gap stalled (no block will resolve it), not stranded. Call
|
|
1724
|
+
* before FECManager.releasePacket, while the gate can still read its blocks.
|
|
1725
|
+
*/
|
|
1726
|
+
releaseFecPacket(packetId: number): void {
|
|
1727
|
+
this.#fecMappersByPacketId.delete(packetId);
|
|
1728
|
+
// Released frames reach FECManager (noteReleasedRap): defer the pokes it
|
|
1729
|
+
// requests, as for every other drain, and drop this packet's.
|
|
1730
|
+
this.#withDeferredFecPokes(() => {
|
|
1731
|
+
this.#parser.endFecRelease(packetId);
|
|
1732
|
+
for (const [key, poke] of this.#pendingFecPokes) {
|
|
1733
|
+
if (poke.packetId === packetId) this.#pendingFecPokes.delete(key);
|
|
1734
|
+
}
|
|
1735
|
+
});
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1705
1738
|
registerManifestTrack(context: ManifestTrackContext): void {
|
|
1706
1739
|
if (!this.#manifestVerifier) throw new Error("manifest verifier is not configured");
|
|
1707
1740
|
this.#manifestVerifier.registerTrack(context);
|
|
@@ -1856,121 +1889,26 @@ export class MmtpRouter {
|
|
|
1856
1889
|
this.#noteUnreadableFecPayloadId(ownerPacketId, "repair");
|
|
1857
1890
|
return;
|
|
1858
1891
|
}
|
|
1859
|
-
|
|
1860
|
-
this.#handleIsoRepair(ownerPacketId, catalogTrackName, parsed, "moq");
|
|
1861
|
-
return;
|
|
1862
|
-
}
|
|
1863
|
-
const repairSbn = this.#deriveRepairSbn(parsed.ssStart, parsed.ssbLength, ownerPacketId);
|
|
1864
|
-
if (repairSbn === null) return;
|
|
1865
|
-
const repairEsi = this.#kForPacket(ownerPacketId) + parsed.rsId;
|
|
1866
|
-
|
|
1867
|
-
if (
|
|
1868
|
-
!this.#feedFecTransportSymbol(
|
|
1869
|
-
ownerPacketId,
|
|
1870
|
-
repairSbn,
|
|
1871
|
-
repairEsi,
|
|
1872
|
-
parsed.symbolData,
|
|
1873
|
-
"moq",
|
|
1874
|
-
catalogTrackName,
|
|
1875
|
-
)
|
|
1876
|
-
) return;
|
|
1877
|
-
|
|
1878
|
-
// NOTE: Do NOT call trackBlock for repair packets (same as multicast repair path).
|
|
1879
|
-
const recovered = catalogTrackName === undefined
|
|
1880
|
-
? this.#fecManager.feedRepairSymbol(
|
|
1881
|
-
ownerPacketId,
|
|
1882
|
-
parsed.ssStart,
|
|
1883
|
-
parsed.ssbLength,
|
|
1884
|
-
parsed.rsId,
|
|
1885
|
-
parsed.symbolData,
|
|
1886
|
-
)
|
|
1887
|
-
: this.#fecManager.feedRepairSymbol(
|
|
1888
|
-
ownerPacketId,
|
|
1889
|
-
parsed.ssStart,
|
|
1890
|
-
parsed.ssbLength,
|
|
1891
|
-
parsed.rsId,
|
|
1892
|
-
parsed.symbolData,
|
|
1893
|
-
catalogTrackName,
|
|
1894
|
-
);
|
|
1895
|
-
if (recovered) {
|
|
1896
|
-
const alreadyCompleted = catalogTrackName === undefined
|
|
1897
|
-
? this.#fecManager.isBlockCompleted(repairSbn, ownerPacketId)
|
|
1898
|
-
: this.#fecManager.isBlockCompleted(repairSbn, ownerPacketId, catalogTrackName);
|
|
1899
|
-
if (catalogTrackName === undefined) {
|
|
1900
|
-
this.#fecManager.cancelBlockTimeout(repairSbn, ownerPacketId);
|
|
1901
|
-
} else {
|
|
1902
|
-
this.#fecManager.cancelBlockTimeout(repairSbn, ownerPacketId, catalogTrackName);
|
|
1903
|
-
}
|
|
1904
|
-
if (!alreadyCompleted) {
|
|
1905
|
-
this.#fecManager.countRecovery(ownerPacketId, repairSbn, catalogTrackName);
|
|
1906
|
-
if (catalogTrackName === undefined) {
|
|
1907
|
-
this.#fecManager.markBlockCompleted(repairSbn, ownerPacketId);
|
|
1908
|
-
} else {
|
|
1909
|
-
this.#fecManager.markBlockCompleted(repairSbn, ownerPacketId, catalogTrackName);
|
|
1910
|
-
}
|
|
1911
|
-
this.#routeRecoveredBlock(
|
|
1912
|
-
repairSbn,
|
|
1913
|
-
recovered,
|
|
1914
|
-
ownerPacketId,
|
|
1915
|
-
catalogTrackName,
|
|
1916
|
-
);
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1892
|
+
this.#handleIsoRepair(ownerPacketId, catalogTrackName, parsed, "moq");
|
|
1919
1893
|
}
|
|
1920
1894
|
}
|
|
1921
1895
|
|
|
1922
|
-
// ──
|
|
1923
|
-
|
|
1924
|
-
#kForPacket(packetId?: number): number {
|
|
1925
|
-
// Same packet-scoped rule as #deriveSbnEsi: once the packet ID is known,
|
|
1926
|
-
// only its explicitly registered mapper may stand in for the FEC
|
|
1927
|
-
// manager's per-packet K — never the default single-track mapper.
|
|
1928
|
-
if (packetId != null)
|
|
1929
|
-
return (
|
|
1930
|
-
this.#fecManager?.kForPacket?.(packetId) ??
|
|
1931
|
-
this.#fecMappersByPacketId.get(packetId)?.k ??
|
|
1932
|
-
this.#fecManager?.k ??
|
|
1933
|
-
4
|
|
1934
|
-
);
|
|
1935
|
-
return this.#defaultFecMapper?.k ?? this.#fecManager?.k ?? 4;
|
|
1936
|
-
}
|
|
1896
|
+
// ── Packet FEC geometry and block profile ───────────────────────
|
|
1937
1897
|
|
|
1938
1898
|
#symbolSizeForPacket(packetId?: number): number {
|
|
1939
|
-
|
|
1899
|
+
// A packetId's own T only: an unconfigured one never borrows the
|
|
1900
|
+
// stream-global T (BLO-45953).
|
|
1901
|
+
if (packetId != null) return this.#fecManager?.symbolSizeForPacket?.(packetId) ?? 0;
|
|
1940
1902
|
return this.#fecManager?.symbolSize ?? 0;
|
|
1941
1903
|
}
|
|
1942
1904
|
|
|
1943
|
-
/** Derive SBN/ESI from SS_ID using packet-scoped FEC geometry. */
|
|
1944
|
-
#deriveSbnEsi(ssId: number, packetId?: number): { sbn: number; esi: number } {
|
|
1945
|
-
// A default mapper describes legacy single-track geometry. Once a packet
|
|
1946
|
-
// ID is known, only its explicitly registered mapper may override the
|
|
1947
|
-
// FECManager's packet-scoped K. Falling back to the default video mapper
|
|
1948
|
-
// here maps audio source symbols with video K while repair SBNs correctly
|
|
1949
|
-
// use the audio SSB_length, splitting one block across two coordinates.
|
|
1950
|
-
const mapper = packetId == null
|
|
1951
|
-
? this.#defaultFecMapper
|
|
1952
|
-
: this.#fecMappersByPacketId.get(packetId) ?? null;
|
|
1953
|
-
if (mapper) return mapper.fromSsId(ssId);
|
|
1954
|
-
const k = this.#kForPacket(packetId);
|
|
1955
|
-
return { sbn: Math.floor(ssId / k), esi: ssId % k };
|
|
1956
|
-
}
|
|
1957
|
-
|
|
1958
|
-
#deriveRepairSbn(
|
|
1959
|
-
ssStart: number,
|
|
1960
|
-
ssbLength: number,
|
|
1961
|
-
packetId?: number,
|
|
1962
|
-
): number | null {
|
|
1963
|
-
const k = this.#kForPacket(packetId);
|
|
1964
|
-
if (ssbLength <= 0 || ssbLength > k || ssStart % k !== 0) return null;
|
|
1965
|
-
return Math.floor(ssStart / k);
|
|
1966
|
-
}
|
|
1967
|
-
|
|
1968
1905
|
/**
|
|
1969
1906
|
* The configured block profile of a packetId, or undefined while it is
|
|
1970
1907
|
* unconfigured. With an FEC manager its per-packet configuration is the
|
|
1971
1908
|
* only source. A router without one still recovers symbols through its
|
|
1972
1909
|
* registered mapper, built with the catalog's explicit profile: the
|
|
1973
|
-
* packet's own mapper, else the default one (
|
|
1910
|
+
* packet's own mapper, else the default one. A NullBlockMapper (a stream
|
|
1911
|
+
* without an FEC instance) states none.
|
|
1974
1912
|
*/
|
|
1975
1913
|
#configuredBlockProfile(packetId: number): FecBlockProfile | undefined {
|
|
1976
1914
|
if (this.#fecManager) return this.#fecManager.blockProfileForPacket(packetId);
|
|
@@ -1979,9 +1917,10 @@ export class MmtpRouter {
|
|
|
1979
1917
|
}
|
|
1980
1918
|
|
|
1981
1919
|
/**
|
|
1982
|
-
* The block profile an FEC coordinate of `packetId` is read under
|
|
1983
|
-
*
|
|
1984
|
-
*
|
|
1920
|
+
* The block profile an FEC coordinate of `packetId` is read under:
|
|
1921
|
+
* `iso-ssbg1-v1`, the only one (`k-padded-v1` is retired and refused).
|
|
1922
|
+
* Throws while none is configured: such a packet has no FEC geometry, and
|
|
1923
|
+
* nothing is inferred from the wire or defaulted.
|
|
1985
1924
|
* Packet ingress leaves such a packet's FEC Payload ID unread first
|
|
1986
1925
|
* (#noteUnreadableFecPayloadId); a throw here is a wiring fault on a path
|
|
1987
1926
|
* that cannot hold an unconfigured packet.
|
|
@@ -1997,8 +1936,20 @@ export class MmtpRouter {
|
|
|
1997
1936
|
return profile;
|
|
1998
1937
|
}
|
|
1999
1938
|
|
|
2000
|
-
|
|
2001
|
-
|
|
1939
|
+
/**
|
|
1940
|
+
* The block coordinates (SS_Start, ESI) of an FEC source: range membership
|
|
1941
|
+
* in a block a repair already stated (ISO/IEC 23008-1 C.5.3). Null while no
|
|
1942
|
+
* repair has stated its block, while its packetId has no configured block
|
|
1943
|
+
* profile, and without an FEC manager: SS_ID alone locates no block, so
|
|
1944
|
+
* nothing is derived from it.
|
|
1945
|
+
*/
|
|
1946
|
+
#locateFecSource(
|
|
1947
|
+
packetId: number,
|
|
1948
|
+
catalogTrackName: string | undefined,
|
|
1949
|
+
ssId: number,
|
|
1950
|
+
): { sbn: number; esi: number } | null {
|
|
1951
|
+
if (this.#configuredBlockProfile(packetId) === undefined) return null;
|
|
1952
|
+
return this.#fecManager?.locateIsoSource?.(packetId, catalogTrackName, ssId) ?? null;
|
|
2002
1953
|
}
|
|
2003
1954
|
|
|
2004
1955
|
/**
|
|
@@ -2023,14 +1974,12 @@ export class MmtpRouter {
|
|
|
2023
1974
|
}
|
|
2024
1975
|
|
|
2025
1976
|
/**
|
|
2026
|
-
* The release-gate anchor of a recovered symbol: its
|
|
2027
|
-
*
|
|
2028
|
-
*
|
|
1977
|
+
* The release-gate anchor of a recovered symbol: its own SS_ID, SS_Start +
|
|
1978
|
+
* ESI modulo 2^32 (C.5.2), where a frame is gated by the SS_IDs between it
|
|
1979
|
+
* and the last released frame.
|
|
2029
1980
|
*/
|
|
2030
|
-
#fecAnchorForRecovered(
|
|
2031
|
-
return
|
|
2032
|
-
? serial32Add(blockId, index)
|
|
2033
|
-
: blockId;
|
|
1981
|
+
#fecAnchorForRecovered(blockStart: number, index: number): number {
|
|
1982
|
+
return serial32Add(blockStart, index);
|
|
2034
1983
|
}
|
|
2035
1984
|
|
|
2036
1985
|
/**
|
|
@@ -2038,9 +1987,8 @@ export class MmtpRouter {
|
|
|
2038
1987
|
* block `[SS_Start, SS_Start + SSB_length)`; repair ESI = SSB_length +
|
|
2039
1988
|
* RS_ID (K' = SSB_length). The held sources it placed (and those of a
|
|
2040
1989
|
* repair-less span in front of it) are fed as first-arrival sources, then
|
|
2041
|
-
* the repair, the order they had on the wire, so a loss-free block
|
|
2042
|
-
* on its repair
|
|
2043
|
-
* block is dropped.
|
|
1990
|
+
* the repair, the order they had on the wire, so a loss-free block completes
|
|
1991
|
+
* clean on its repair. A repair contradicting a known block is dropped.
|
|
2044
1992
|
*/
|
|
2045
1993
|
#handleIsoRepair(
|
|
2046
1994
|
ownerPacketId: number,
|
|
@@ -2154,7 +2102,8 @@ export class MmtpRouter {
|
|
|
2154
2102
|
}
|
|
2155
2103
|
|
|
2156
2104
|
/** Route a recovered FEC block through the parser + dedup pipeline.
|
|
2157
|
-
* Sync WASM decoders return K fixed-width
|
|
2105
|
+
* Sync WASM decoders return the block's K' = SSB_length fixed-width
|
|
2106
|
+
* ssbg_mode1 source symbols concatenated. */
|
|
2158
2107
|
routeRecoveredBlock(
|
|
2159
2108
|
blockId: number,
|
|
2160
2109
|
data: Uint8Array,
|
|
@@ -2697,37 +2646,22 @@ export class MmtpRouter {
|
|
|
2697
2646
|
resolvedLoss: (packetId, catalogTrackName, fromSbn, toSbn, releasedSbn) => {
|
|
2698
2647
|
const fec = this.#fecManager;
|
|
2699
2648
|
if (!fec?.blockResolution) return [];
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
return fec.isoSpanResolution?.(packetId, catalogTrackName, releasedSbn, head) ?? null;
|
|
2706
|
-
}
|
|
2707
|
-
const highest = fec.highestSbn?.(packetId, catalogTrackName);
|
|
2708
|
-
const lost: number[] = [];
|
|
2709
|
-
for (let sbn = fromSbn; sbn <= toSbn; sbn++) {
|
|
2710
|
-
const resolution = fec.blockResolution(sbn, packetId, catalogTrackName);
|
|
2711
|
-
if (resolution === "pending") return null;
|
|
2712
|
-
if (resolution === "failed") {
|
|
2713
|
-
lost.push(sbn);
|
|
2714
|
-
} else if (resolution === "untracked") {
|
|
2715
|
-
// releasedSbn is the block of the frame the gate last released, so
|
|
2716
|
-
// its media arrived: untracked there means it resolved and retired,
|
|
2717
|
-
// not that it vanished. Counting it would conceal a delivered block.
|
|
2718
|
-
if (sbn === releasedSbn) continue;
|
|
2719
|
-
// Not seen yet: a block at or past the stream's frontier may
|
|
2720
|
-
// still start. Behind the frontier it vanished without trace.
|
|
2721
|
-
if (highest === undefined || sbn > highest) return null;
|
|
2722
|
-
lost.push(sbn);
|
|
2723
|
-
}
|
|
2724
|
-
}
|
|
2725
|
-
return lost;
|
|
2649
|
+
// A frame is anchored by its packet's SS_ID (iso-ssbg1-v1, C.5.2): wait
|
|
2650
|
+
// until every block that could hold the SS_IDs between the last
|
|
2651
|
+
// released frame and this one is stated and resolved.
|
|
2652
|
+
const head = fromSbn === releasedSbn ? toSbn : fromSbn;
|
|
2653
|
+
return fec.isoSpanResolution?.(packetId, catalogTrackName, releasedSbn, head) ?? null;
|
|
2726
2654
|
},
|
|
2727
2655
|
// The retention window itself: a frame is never still held when a block
|
|
2728
2656
|
// it waits on retires. Only consulted while resolvedLoss holds a gap,
|
|
2729
2657
|
// which needs blockResolution, so the check above guarantees the method.
|
|
2730
|
-
|
|
2658
|
+
// A packetId the manager no longer has configured (released) has no
|
|
2659
|
+
// block left to wait on: release its frames now (BLO-45953).
|
|
2660
|
+
holdLimitMs: (packetId) => {
|
|
2661
|
+
const fec = this.#fecManager;
|
|
2662
|
+
if (!fec?.terminalRetentionMsForPacket) return Infinity;
|
|
2663
|
+
return fec.terminalRetentionMsForPacket(packetId) ?? 0;
|
|
2664
|
+
},
|
|
2731
2665
|
decide: (before, after, lostBlocks, discontinuity) => {
|
|
2732
2666
|
const decision = this.#decideGap(before, after, lostBlocks, discontinuity);
|
|
2733
2667
|
this.#onFrameGap?.(decision);
|
|
@@ -2813,9 +2747,10 @@ export class MmtpRouter {
|
|
|
2813
2747
|
|
|
2814
2748
|
/**
|
|
2815
2749
|
* The most media units a gap between two released frames can hold: the
|
|
2816
|
-
* FEC blocks
|
|
2817
|
-
* block touches (ceil(interleaveDepthMs / unit duration), §5.1).
|
|
2818
|
-
* either
|
|
2750
|
+
* FEC blocks between `before`'s anchor and `after`'s, times D, the media
|
|
2751
|
+
* units one block touches (ceil(interleaveDepthMs / unit duration), §5.1).
|
|
2752
|
+
* Null when either anchor, the unit duration or the catalog interleave is
|
|
2753
|
+
* unknown.
|
|
2819
2754
|
*/
|
|
2820
2755
|
#maxMissingUnits(before: ParserFrameMeta, after: ParserFrameMeta): number | null {
|
|
2821
2756
|
const from = before.fecSbn;
|
|
@@ -2828,12 +2763,10 @@ export class MmtpRouter {
|
|
|
2828
2763
|
const numerator = BigInt(Math.ceil(interleaveMs)) * BigInt(timing.mediaTimescale);
|
|
2829
2764
|
const denominator = BigInt(timing.durationTicks) * 1000n;
|
|
2830
2765
|
const unitsPerBlock = (numerator + denominator - 1n) / denominator;
|
|
2831
|
-
//
|
|
2766
|
+
// Anchors are SS_IDs (C.5.2): every block holds at least one, so the
|
|
2832
2767
|
// serial SS_ID distance bounds the blocks between them.
|
|
2833
2768
|
const blocks = BigInt(
|
|
2834
|
-
(
|
|
2835
|
-
? (serial32Precedes(from, to) ? serial32Distance(from, to) : serial32Distance(to, from))
|
|
2836
|
-
: Math.abs(to - from)) + 1,
|
|
2769
|
+
(serial32Precedes(from, to) ? serial32Distance(from, to) : serial32Distance(to, from)) + 1,
|
|
2837
2770
|
);
|
|
2838
2771
|
const bound = unitsPerBlock * blocks;
|
|
2839
2772
|
return bound > BigInt(Number.MAX_SAFE_INTEGER) ? null : Number(bound);
|
|
@@ -2899,8 +2832,9 @@ export class MmtpRouter {
|
|
|
2899
2832
|
const cb = this.#trackInitCallbacks.get(packetId);
|
|
2900
2833
|
if (cb) {
|
|
2901
2834
|
cb(data);
|
|
2902
|
-
} else
|
|
2903
|
-
this.#
|
|
2835
|
+
} else {
|
|
2836
|
+
this.#unmappedInitDeliveries++;
|
|
2837
|
+
this.#onInitSegment?.(data);
|
|
2904
2838
|
}
|
|
2905
2839
|
console.log(
|
|
2906
2840
|
`[MmtpRouter] Init delivered for packetId=${packetId}${catalogTrackName === undefined ? "" : ` track=${catalogTrackName}`} (${data.byteLength}B)`,
|
|
@@ -2971,9 +2905,14 @@ export class MmtpRouter {
|
|
|
2971
2905
|
if (!info.isRepair && this.#manifestVerifier && !manifestAdmitted) {
|
|
2972
2906
|
let identity = manifestIdentity;
|
|
2973
2907
|
if (!identity && info.fecPayloadId && !fecUnreadable && (this.#resolveManifestIdentityForRoute || this.#resolveManifestIdentity)) {
|
|
2974
|
-
|
|
2908
|
+
// A source resolves with its block coordinates (SS_Start, ESI), the
|
|
2909
|
+
// pair a recovered symbol of the same block resolves with. SS_ID alone
|
|
2910
|
+
// locates no block (C.5.3): until a repair states this source's block
|
|
2911
|
+
// it has none, its identity stays absent, and the verifier's
|
|
2912
|
+
// missing-identity policy below applies.
|
|
2975
2913
|
const catalogTrackName = catalogTrackNameForPacket(ingress, info.packetId);
|
|
2976
|
-
|
|
2914
|
+
const coordinates = this.#locateFecSource(info.packetId, catalogTrackName, info.fecPayloadId.ssId);
|
|
2915
|
+
identity = coordinates === null ? undefined : (this.#resolveManifestIdentityForRoute
|
|
2977
2916
|
? this.#resolveManifestIdentityForRoute({
|
|
2978
2917
|
packetId: info.packetId,
|
|
2979
2918
|
sbn: coordinates.sbn,
|
|
@@ -3042,92 +2981,7 @@ export class MmtpRouter {
|
|
|
3042
2981
|
// NOTE: Do NOT call trackBlock for repair packets. Only source symbols
|
|
3043
2982
|
// should count toward block completion — repair inflates blocksClean stats
|
|
3044
2983
|
// and masks blocks that actually needed FEC recovery.
|
|
3045
|
-
|
|
3046
|
-
this.#handleIsoRepair(ownerPacketId, catalogTrackNameForPacket(ingress, ownerPacketId), repair, source);
|
|
3047
|
-
return;
|
|
3048
|
-
}
|
|
3049
|
-
const repairSbn = this.#deriveRepairSbn(repair.ssStart, repair.ssbLength, ownerPacketId);
|
|
3050
|
-
if (repairSbn === null) return;
|
|
3051
|
-
const repairEsi = this.#kForPacket(ownerPacketId) + repair.rsId;
|
|
3052
|
-
|
|
3053
|
-
if (
|
|
3054
|
-
!this.#feedFecTransportSymbol(
|
|
3055
|
-
ownerPacketId,
|
|
3056
|
-
repairSbn,
|
|
3057
|
-
repairEsi,
|
|
3058
|
-
repair.symbolData,
|
|
3059
|
-
source,
|
|
3060
|
-
catalogTrackNameForPacket(ingress, ownerPacketId),
|
|
3061
|
-
)
|
|
3062
|
-
) return;
|
|
3063
|
-
|
|
3064
|
-
// Repair symbols are block progress too. The deadline measures
|
|
3065
|
-
// inactivity, not total block lifetime.
|
|
3066
|
-
const repairCatalogTrackName = catalogTrackNameForPacket(ingress, ownerPacketId);
|
|
3067
|
-
if (repairCatalogTrackName === undefined) {
|
|
3068
|
-
this.#fecManager.noteBlockActivity?.(repairSbn, ownerPacketId);
|
|
3069
|
-
} else {
|
|
3070
|
-
this.#fecManager.noteBlockActivity?.(
|
|
3071
|
-
repairSbn,
|
|
3072
|
-
ownerPacketId,
|
|
3073
|
-
repairCatalogTrackName,
|
|
3074
|
-
);
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
|
-
const recovered = repairCatalogTrackName === undefined
|
|
3078
|
-
? this.#fecManager.feedRepairSymbol(
|
|
3079
|
-
ownerPacketId,
|
|
3080
|
-
repair.ssStart,
|
|
3081
|
-
repair.ssbLength,
|
|
3082
|
-
repair.rsId,
|
|
3083
|
-
repair.symbolData,
|
|
3084
|
-
)
|
|
3085
|
-
: this.#fecManager.feedRepairSymbol(
|
|
3086
|
-
ownerPacketId,
|
|
3087
|
-
repair.ssStart,
|
|
3088
|
-
repair.ssbLength,
|
|
3089
|
-
repair.rsId,
|
|
3090
|
-
repair.symbolData,
|
|
3091
|
-
repairCatalogTrackName,
|
|
3092
|
-
);
|
|
3093
|
-
if (recovered) {
|
|
3094
|
-
const alreadyCompleted = repairCatalogTrackName === undefined
|
|
3095
|
-
? this.#fecManager.isBlockCompleted(repairSbn, ownerPacketId)
|
|
3096
|
-
: this.#fecManager.isBlockCompleted(
|
|
3097
|
-
repairSbn,
|
|
3098
|
-
ownerPacketId,
|
|
3099
|
-
repairCatalogTrackName,
|
|
3100
|
-
);
|
|
3101
|
-
if (repairCatalogTrackName === undefined) {
|
|
3102
|
-
this.#fecManager.cancelBlockTimeout(repairSbn, ownerPacketId);
|
|
3103
|
-
} else {
|
|
3104
|
-
this.#fecManager.cancelBlockTimeout(
|
|
3105
|
-
repairSbn,
|
|
3106
|
-
ownerPacketId,
|
|
3107
|
-
repairCatalogTrackName,
|
|
3108
|
-
);
|
|
3109
|
-
}
|
|
3110
|
-
// Skip routing if block was already completed via source path (all K sources
|
|
3111
|
-
// arrived). The parser's feed() already played every frame.
|
|
3112
|
-
if (!alreadyCompleted) {
|
|
3113
|
-
this.#fecManager.countRecovery(ownerPacketId, repairSbn, repairCatalogTrackName);
|
|
3114
|
-
if (repairCatalogTrackName === undefined) {
|
|
3115
|
-
this.#fecManager.markBlockCompleted(repairSbn, ownerPacketId);
|
|
3116
|
-
} else {
|
|
3117
|
-
this.#fecManager.markBlockCompleted(
|
|
3118
|
-
repairSbn,
|
|
3119
|
-
ownerPacketId,
|
|
3120
|
-
repairCatalogTrackName,
|
|
3121
|
-
);
|
|
3122
|
-
}
|
|
3123
|
-
this.#routeRecoveredBlock(
|
|
3124
|
-
repairSbn,
|
|
3125
|
-
recovered,
|
|
3126
|
-
ownerPacketId,
|
|
3127
|
-
catalogTrackNameForPacket(ingress, ownerPacketId),
|
|
3128
|
-
);
|
|
3129
|
-
}
|
|
3130
|
-
}
|
|
2984
|
+
this.#handleIsoRepair(ownerPacketId, catalogTrackNameForPacket(ingress, ownerPacketId), repair, source);
|
|
3131
2985
|
}
|
|
3132
2986
|
} else {
|
|
3133
2987
|
// Drop source packets with unknown packetId — not in catalog.
|
|
@@ -3169,14 +3023,13 @@ export class MmtpRouter {
|
|
|
3169
3023
|
// The FEC Payload ID FEC may read: none while the packetId has no
|
|
3170
3024
|
// configured block profile (fecUnreadable above).
|
|
3171
3025
|
const fecPayloadId = fecUnreadable ? null : info.fecPayloadId;
|
|
3172
|
-
//
|
|
3173
|
-
// already stated; until then it is held, unplaced (BLO-35597 iso:3).
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
const
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
: this.#deriveSbnEsi(fecPayloadId.ssId, info.packetId))
|
|
3026
|
+
// An FEC source is located by range membership in a block a repair
|
|
3027
|
+
// already stated; until then it is held, unplaced (BLO-35597 iso:3). A
|
|
3028
|
+
// readable FEC Payload ID implies a configured block profile
|
|
3029
|
+
// (fecUnreadable above), and iso-ssbg1-v1 is the only one.
|
|
3030
|
+
const fecSource = this.#fecManager !== null && fecPayloadId != null;
|
|
3031
|
+
const coords = fecSource && fecPayloadId
|
|
3032
|
+
? this.#locateFecSource(info.packetId, catalogTrackName, fecPayloadId.ssId) ?? undefined
|
|
3180
3033
|
: undefined;
|
|
3181
3034
|
// Note the packet's FEC block (none without an FEC coordinate) before
|
|
3182
3035
|
// any ledger lookup, the restart check below included.
|
|
@@ -3217,16 +3070,12 @@ export class MmtpRouter {
|
|
|
3217
3070
|
}
|
|
3218
3071
|
if (this.#fecManager && fecPayloadId && coords) {
|
|
3219
3072
|
const fecId = fecPayloadId;
|
|
3220
|
-
const symbolSize = this.#symbolSizeForPacket(info.packetId);
|
|
3221
|
-
|
|
3222
3073
|
// The mmtp-packet source symbol protects the complete MMTP packet
|
|
3223
3074
|
// before SS_ID is appended, self-delimiting and zero-padded to T.
|
|
3224
3075
|
const rawSymbol = packet.subarray(0, packet.length - 4);
|
|
3225
|
-
//
|
|
3076
|
+
// ssbg_mode1 symbols carry a two-octet length (C.3.3): admission
|
|
3226
3077
|
// refuses length + 2 > T.
|
|
3227
|
-
const oversized =
|
|
3228
|
-
? !(this.#fecManager.isoSourceFits?.(info.packetId, rawSymbol.length) ?? false)
|
|
3229
|
-
: symbolSize > 0 && rawSymbol.length > symbolSize;
|
|
3078
|
+
const oversized = !(this.#fecManager.isoSourceFits?.(info.packetId, rawSymbol.length) ?? false);
|
|
3230
3079
|
|
|
3231
3080
|
// NOTE: trackBlock() is deferred to AFTER #feedViaParser (below).
|
|
3232
3081
|
// Reason: trackBlock synchronously fires onBlockComplete when the
|
|
@@ -3269,9 +3118,9 @@ export class MmtpRouter {
|
|
|
3269
3118
|
);
|
|
3270
3119
|
sourceSymbolTrackable = sourceSymbolAccepted;
|
|
3271
3120
|
} else {
|
|
3272
|
-
//
|
|
3273
|
-
//
|
|
3274
|
-
//
|
|
3121
|
+
// The exact protected packet travels unpadded: the decoder builds
|
|
3122
|
+
// the ssbg_mode1 symbol itself, and FECManager owns any copy it
|
|
3123
|
+
// hands the FEC Worker. Padding here cost a second T-byte
|
|
3275
3124
|
// allocation and copy per short packet (BLO-36599).
|
|
3276
3125
|
const symbolData = rawSymbol;
|
|
3277
3126
|
|
|
@@ -3296,8 +3145,8 @@ export class MmtpRouter {
|
|
|
3296
3145
|
|
|
3297
3146
|
// Compute FEC block info for the MSE assembler.
|
|
3298
3147
|
fecInfo = { sbn: coords.sbn, esi: coords.esi, oversized };
|
|
3299
|
-
} else if (
|
|
3300
|
-
//
|
|
3148
|
+
} else if (fecSource && this.#fecManager && fecPayloadId) {
|
|
3149
|
+
// An FEC source whose block no repair has stated yet: route its
|
|
3301
3150
|
// media now and hold its FEC symbol until a repair places it.
|
|
3302
3151
|
const ssId = fecPayloadId.ssId;
|
|
3303
3152
|
if (overlapCopy) {
|
|
@@ -3340,9 +3189,8 @@ export class MmtpRouter {
|
|
|
3340
3189
|
this.#feedViaParser(packet, info, fecInfo, {
|
|
3341
3190
|
source,
|
|
3342
3191
|
catalogTrackName,
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
: fecInfo === undefined ? {} : { fecSbn: fecInfo.sbn }),
|
|
3192
|
+
// An FEC source frame is anchored by its own SS_ID (C.5.2).
|
|
3193
|
+
...(fecSource && fecPayloadId ? { fecSbn: fecPayloadId.ssId } : {}),
|
|
3346
3194
|
}, parsed);
|
|
3347
3195
|
}
|
|
3348
3196
|
// The frame this packet completed can commit an in-place switch that
|
|
@@ -3357,15 +3205,15 @@ export class MmtpRouter {
|
|
|
3357
3205
|
// → #flushBlock. Without this ordering, the K-th frame was lost on
|
|
3358
3206
|
// every block — only K-1 frames per block were ever emitted to MSE.
|
|
3359
3207
|
// Only first-arriving symbols count toward completion or playback.
|
|
3208
|
+
// A source symbol is accepted only once placed, so it has coords.
|
|
3360
3209
|
if (
|
|
3361
3210
|
this.#fecManager &&
|
|
3362
3211
|
fecPayloadId &&
|
|
3212
|
+
coords &&
|
|
3363
3213
|
sourceSymbolAccepted &&
|
|
3364
3214
|
sourceSymbolTrackable
|
|
3365
3215
|
) {
|
|
3366
|
-
const { sbn, esi } =
|
|
3367
|
-
? coords
|
|
3368
|
-
: this.#deriveSbnEsi(fecPayloadId.ssId, info.packetId);
|
|
3216
|
+
const { sbn, esi } = coords;
|
|
3369
3217
|
if (
|
|
3370
3218
|
this.#classifyPacketId(info.packetId) !== null &&
|
|
3371
3219
|
this.#fecManager.isTrackConfigured?.(info.packetId) !== false
|
|
@@ -4051,7 +3899,6 @@ export class MmtpRouter {
|
|
|
4051
3899
|
// (FI=1/2/3) of a larger MFU. Route through the reassembler so
|
|
4052
3900
|
// multi-packet MFUs (e.g., keyframes spanning 15+ packets) are
|
|
4053
3901
|
// properly assembled before reaching the decoder.
|
|
4054
|
-
const k = this.#kForPacket(ownerPacketId);
|
|
4055
3902
|
const packetSymbolSize = this.#symbolSizeForPacket(ownerPacketId);
|
|
4056
3903
|
if (ownerPacketId === undefined) {
|
|
4057
3904
|
throw new Error("[MmtpRouter] a recovered FEC block needs its owner packetId to read its fec.blockProfile");
|
|
@@ -4064,10 +3911,8 @@ export class MmtpRouter {
|
|
|
4064
3911
|
);
|
|
4065
3912
|
}
|
|
4066
3913
|
const symbolSize = packetSymbolSize;
|
|
4067
|
-
// iso-ssbg1-v1
|
|
4068
|
-
// prefix of a K-symbol block, walked up to K.
|
|
3914
|
+
// An iso-ssbg1-v1 block decodes to K' = SSB_length ssbg_mode1 symbols.
|
|
4069
3915
|
const result = processFecBlock(recovered, {
|
|
4070
|
-
...(blockProfile === "k-padded-v1" ? { k } : {}),
|
|
4071
3916
|
symbolSize,
|
|
4072
3917
|
ownerPacketId,
|
|
4073
3918
|
blockProfile,
|
|
@@ -4163,9 +4008,6 @@ export class MmtpRouter {
|
|
|
4163
4008
|
{
|
|
4164
4009
|
...identity,
|
|
4165
4010
|
packetId: ownerPacketId,
|
|
4166
|
-
...(ownerPacketId !== undefined && this.#isIsoPacket(ownerPacketId)
|
|
4167
|
-
? {}
|
|
4168
|
-
: { ssId: blockId * this.#kForPacket(ownerPacketId) + symbol.index }),
|
|
4169
4011
|
},
|
|
4170
4012
|
symbol.rawSymbol,
|
|
4171
4013
|
() => {
|
|
@@ -4348,7 +4190,7 @@ export class MmtpRouter {
|
|
|
4348
4190
|
rapFlag: sym.fragment.rapFlag,
|
|
4349
4191
|
recovered: true,
|
|
4350
4192
|
deliveryProvenance,
|
|
4351
|
-
fecSbn: this.#fecAnchorForRecovered(
|
|
4193
|
+
fecSbn: this.#fecAnchorForRecovered(blockId, sym.index),
|
|
4352
4194
|
...(catalogTrackName === undefined ? {} : { catalogTrackName }),
|
|
4353
4195
|
});
|
|
4354
4196
|
continue;
|
|
@@ -4484,7 +4326,7 @@ export class MmtpRouter {
|
|
|
4484
4326
|
...(assembled.deliveryProvenance === undefined
|
|
4485
4327
|
? {}
|
|
4486
4328
|
: { deliveryProvenance: assembled.deliveryProvenance }),
|
|
4487
|
-
fecSbn: this.#fecAnchorForRecovered(
|
|
4329
|
+
fecSbn: this.#fecAnchorForRecovered(blockId, sym.index),
|
|
4488
4330
|
...(recoveredCatalogTrackName === undefined
|
|
4489
4331
|
? {}
|
|
4490
4332
|
: { catalogTrackName: recoveredCatalogTrackName }),
|
|
@@ -4669,7 +4511,7 @@ export class MmtpRouter {
|
|
|
4669
4511
|
rapFlag: sym.fragment.rapFlag,
|
|
4670
4512
|
recovered: true,
|
|
4671
4513
|
deliveryProvenance,
|
|
4672
|
-
fecSbn: this.#fecAnchorForRecovered(
|
|
4514
|
+
fecSbn: this.#fecAnchorForRecovered(blockId, sym.index),
|
|
4673
4515
|
...(catalogTrackName === undefined ? {} : { catalogTrackName }),
|
|
4674
4516
|
});
|
|
4675
4517
|
} else {
|
|
@@ -4759,7 +4601,7 @@ export class MmtpRouter {
|
|
|
4759
4601
|
rapFlag: assembled.rapFlag,
|
|
4760
4602
|
recovered: true,
|
|
4761
4603
|
deliveryProvenance,
|
|
4762
|
-
fecSbn: this.#fecAnchorForRecovered(
|
|
4604
|
+
fecSbn: this.#fecAnchorForRecovered(blockId, sym.index),
|
|
4763
4605
|
...(assembled.catalogTrackName === undefined
|
|
4764
4606
|
? {}
|
|
4765
4607
|
: { catalogTrackName: assembled.catalogTrackName }),
|
|
@@ -4806,7 +4648,7 @@ export class MmtpRouter {
|
|
|
4806
4648
|
: { sampleNumber: sym.fragment.sampleNumber }),
|
|
4807
4649
|
recovered: true,
|
|
4808
4650
|
deliveryProvenance,
|
|
4809
|
-
fecSbn: this.#fecAnchorForRecovered(
|
|
4651
|
+
fecSbn: this.#fecAnchorForRecovered(blockId, sym.index),
|
|
4810
4652
|
...(catalogTrackName === undefined ? {} : { catalogTrackName }),
|
|
4811
4653
|
});
|
|
4812
4654
|
continue;
|