@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
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Order of K-stride FEC blocks on the 32-bit SS_ID (ISO/IEC 23008-1:2023
|
|
3
|
-
* C.5.2; RFC 1982 serial arithmetic, SERIAL_BITS = 32; BLO-35597 iso:5).
|
|
4
|
-
*
|
|
5
|
-
* Block `sbn` starts at SS_ID `sbn * K mod 2^32`, and blocks are ordered by
|
|
6
|
-
* serial comparison of their starts. That is identical to comparing SBNs
|
|
7
|
-
* with < for any two blocks less than 2^31 SS_IDs apart, so only the order
|
|
8
|
-
* across the SS_ID wrap changes.
|
|
9
|
-
*
|
|
10
|
-
* The canonical helpers are @blockcast/mmt-base `kStrideBlockPrecedes` /
|
|
11
|
-
* `kStrideBlocksBehind`. This worker bundle does not depend on mmt-base, so
|
|
12
|
-
* it carries these two, and block-order.test.ts pins them to the same wrap
|
|
13
|
-
* vectors.
|
|
14
|
-
*/
|
|
15
|
-
/** Whether block `a` precedes block `b`. */
|
|
16
|
-
export declare function blockPrecedes(a: number, b: number, k: number): boolean;
|
|
17
|
-
/**
|
|
18
|
-
* How many blocks `a` lies behind `b`: 0 unless `a` precedes `b`. Across the
|
|
19
|
-
* wrap the short pre-wrap block (2^32 mod K symbols) counts as one block.
|
|
20
|
-
*/
|
|
21
|
-
export declare function blocksBehind(a: number, b: number, k: number): number;
|
|
22
|
-
/** Forward RFC 1982 distance from `from` to `to` on the 32-bit SS_ID, in 0..2^32-1. */
|
|
23
|
-
export declare function serialDistance(from: number, to: number): number;
|
|
24
|
-
/** Whether `a` precedes `b` under RFC 1982 serial comparison (SERIAL_BITS = 32). */
|
|
25
|
-
export declare function serialPrecedes(a: number, b: number): boolean;
|
|
26
|
-
/** Whether `ssId` is one of the `ssbLength` consecutive SS_IDs starting at `ssStart`, mod 2^32. */
|
|
27
|
-
export declare function isoBlockContains(ssStart: number, ssbLength: number, ssId: number): boolean;
|
|
28
|
-
/** Whether two SS_ID ranges `[start, start + length)` share any SS_ID, mod 2^32. */
|
|
29
|
-
export declare function isoBlocksOverlap(aStart: number, aLength: number, bStart: number, bLength: number): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* How many blocks SS_ID `a` lies behind SS_ID `b` (0 unless `a` precedes `b`):
|
|
32
|
-
* a lower bound, because an iso-ssbg1-v1 block holds at most `kMax` source
|
|
33
|
-
* symbols, so `n * kMax` SS_IDs always span at least `n` blocks. This is the
|
|
34
|
-
* one interleave-horizon metric every ISO receiver layer shares (decoder
|
|
35
|
-
* retention, worker retirement, ordered-relay settlement).
|
|
36
|
-
*/
|
|
37
|
-
export declare function isoBlocksBehind(a: number, b: number, kMax: number): number;
|
|
38
|
-
//# sourceMappingURL=block-order.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block-order.d.ts","sourceRoot":"","sources":["../src/block-order.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAgBH,4CAA4C;AAC5C,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAEtE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAGpE;AAaD,uFAAuF;AACvF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,oFAAoF;AACpF,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAG5D;AAED,mGAAmG;AACnG,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1F;AAED,oFAAoF;AACpF,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACb,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAK1E"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Order of K-stride FEC blocks on the 32-bit SS_ID (ISO/IEC 23008-1:2023
|
|
3
|
-
* C.5.2; RFC 1982 serial arithmetic, SERIAL_BITS = 32; BLO-35597 iso:5).
|
|
4
|
-
*
|
|
5
|
-
* Block `sbn` starts at SS_ID `sbn * K mod 2^32`, and blocks are ordered by
|
|
6
|
-
* serial comparison of their starts. That is identical to comparing SBNs
|
|
7
|
-
* with < for any two blocks less than 2^31 SS_IDs apart, so only the order
|
|
8
|
-
* across the SS_ID wrap changes.
|
|
9
|
-
*
|
|
10
|
-
* The canonical helpers are @blockcast/mmt-base `kStrideBlockPrecedes` /
|
|
11
|
-
* `kStrideBlocksBehind`. This worker bundle does not depend on mmt-base, so
|
|
12
|
-
* it carries these two, and block-order.test.ts pins them to the same wrap
|
|
13
|
-
* vectors.
|
|
14
|
-
*/
|
|
15
|
-
const SPAN = 0x1_0000_0000;
|
|
16
|
-
const HALF = 0x8000_0000;
|
|
17
|
-
function blockStart(sbn, k) {
|
|
18
|
-
// sbn < 2^32 and k <= 56 403 keep the product below 2^48: exact.
|
|
19
|
-
return (sbn * k) % SPAN;
|
|
20
|
-
}
|
|
21
|
-
/** Forward SS_ID distance from block `a`'s start to block `b`'s, or null when `a` does not precede `b`. */
|
|
22
|
-
function precedingDistance(a, b, k) {
|
|
23
|
-
const distance = (blockStart(b, k) - blockStart(a, k) + SPAN) % SPAN;
|
|
24
|
-
return distance !== 0 && distance < HALF ? distance : null;
|
|
25
|
-
}
|
|
26
|
-
/** Whether block `a` precedes block `b`. */
|
|
27
|
-
export function blockPrecedes(a, b, k) {
|
|
28
|
-
return precedingDistance(a, b, k) !== null;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* How many blocks `a` lies behind `b`: 0 unless `a` precedes `b`. Across the
|
|
32
|
-
* wrap the short pre-wrap block (2^32 mod K symbols) counts as one block.
|
|
33
|
-
*/
|
|
34
|
-
export function blocksBehind(a, b, k) {
|
|
35
|
-
const distance = precedingDistance(a, b, k);
|
|
36
|
-
return distance === null ? 0 : Math.ceil(distance / k);
|
|
37
|
-
}
|
|
38
|
-
// --- iso-ssbg1-v1 (ISO/IEC 23008-1 C.3.3 ssbg_mode1; C.5.2/C.5.3) ---------
|
|
39
|
-
//
|
|
40
|
-
// Under the ISO profile SS_ID increments by one per FEC source packet and
|
|
41
|
-
// wraps at 2^32, and a block is the SSB_length consecutive SS_IDs
|
|
42
|
-
// `[SS_Start, SS_Start + SSB_length)`. Blocks are keyed and ordered by their
|
|
43
|
-
// SS_Start, never by an SBN derived from K: the catalog K is only the maximum
|
|
44
|
-
// block length (kMax). The canonical helpers are @blockcast/mmt-base
|
|
45
|
-
// `serial32Distance` / `serial32Precedes` / `isoBlockContains` /
|
|
46
|
-
// `isoBlocksBehindLowerBound`; this bundle carries its own copies (it does not
|
|
47
|
-
// depend on mmt-base), and block-order.test.ts pins them to the same vectors.
|
|
48
|
-
/** Forward RFC 1982 distance from `from` to `to` on the 32-bit SS_ID, in 0..2^32-1. */
|
|
49
|
-
export function serialDistance(from, to) {
|
|
50
|
-
return (to - from + SPAN) % SPAN;
|
|
51
|
-
}
|
|
52
|
-
/** Whether `a` precedes `b` under RFC 1982 serial comparison (SERIAL_BITS = 32). */
|
|
53
|
-
export function serialPrecedes(a, b) {
|
|
54
|
-
const distance = serialDistance(a, b);
|
|
55
|
-
return distance !== 0 && distance < HALF;
|
|
56
|
-
}
|
|
57
|
-
/** Whether `ssId` is one of the `ssbLength` consecutive SS_IDs starting at `ssStart`, mod 2^32. */
|
|
58
|
-
export function isoBlockContains(ssStart, ssbLength, ssId) {
|
|
59
|
-
return serialDistance(ssStart, ssId) < ssbLength;
|
|
60
|
-
}
|
|
61
|
-
/** Whether two SS_ID ranges `[start, start + length)` share any SS_ID, mod 2^32. */
|
|
62
|
-
export function isoBlocksOverlap(aStart, aLength, bStart, bLength) {
|
|
63
|
-
return isoBlockContains(aStart, aLength, bStart) || isoBlockContains(bStart, bLength, aStart);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* How many blocks SS_ID `a` lies behind SS_ID `b` (0 unless `a` precedes `b`):
|
|
67
|
-
* a lower bound, because an iso-ssbg1-v1 block holds at most `kMax` source
|
|
68
|
-
* symbols, so `n * kMax` SS_IDs always span at least `n` blocks. This is the
|
|
69
|
-
* one interleave-horizon metric every ISO receiver layer shares (decoder
|
|
70
|
-
* retention, worker retirement, ordered-relay settlement).
|
|
71
|
-
*/
|
|
72
|
-
export function isoBlocksBehind(a, b, kMax) {
|
|
73
|
-
if (!Number.isSafeInteger(kMax) || kMax <= 0) {
|
|
74
|
-
throw new Error(`iso-ssbg1-v1 block horizon needs a positive maximum K (got ${kMax})`);
|
|
75
|
-
}
|
|
76
|
-
return serialPrecedes(a, b) ? Math.floor(serialDistance(a, b) / kMax) : 0;
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=block-order.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"block-order.js","sourceRoot":"","sources":["../src/block-order.ts"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
-
* Wraps one Worker per track instance. Provides typed API for the
|
|
5
|
-
* FecWorkerCommand/FecWorkerEvent protocol with zero-copy ArrayBuffer transfers.
|
|
6
|
-
*
|
|
7
|
-
* Constructor accepts either a URL (creates Worker internally) or a pre-created
|
|
8
|
-
* Worker instance (for testing via constructor injection).
|
|
9
|
-
*/
|
|
10
|
-
import type { FecTrackConfig, FecTrackStats, FecBlockSnapshot, FrameMeta, FecWorkerErrorCode } from "./fec-worker-types.js";
|
|
11
|
-
export declare class FecWorkerClient {
|
|
12
|
-
#private;
|
|
13
|
-
/**
|
|
14
|
-
* Create a FecWorkerClient.
|
|
15
|
-
* @param workerOrUrl - Either a Worker instance (for testing) or a URL to create one
|
|
16
|
-
*/
|
|
17
|
-
constructor(workerOrUrl: Worker | URL);
|
|
18
|
-
/**
|
|
19
|
-
* Configure the Worker with FEC parameters and WASM module.
|
|
20
|
-
* wasmModule is transferred (not neutered — WebAssembly.Module is shareable).
|
|
21
|
-
* altaPublicKey is PKCS#8 SPKI DER bytes (self-describing — algorithm detected from OID).
|
|
22
|
-
* Transferred (detached from sender).
|
|
23
|
-
* altaWasmModule is structured-cloneable (NOT transferable — do not add to transfer list).
|
|
24
|
-
*/
|
|
25
|
-
configure(config: FecTrackConfig, wasmModule: WebAssembly.Module, altaPublicKey?: ArrayBuffer, altaWasmModule?: WebAssembly.Module): void;
|
|
26
|
-
/**
|
|
27
|
-
* Feed a source symbol to the Worker. data ArrayBuffer is transferred (zero-copy).
|
|
28
|
-
* Caller must not access data after this call — it is transferred with the
|
|
29
|
-
* task's symbol batch, before any later command of this client.
|
|
30
|
-
*
|
|
31
|
-
* Optional `alta` carries the detached ALTA authenticator bytes and the
|
|
32
|
-
* byte offset in `data` where the signed payload ends. The auth buffer is
|
|
33
|
-
* transferred zero-copy alongside `data`. Use {@link getMmtpAltaTrailer}
|
|
34
|
-
* upstream (mmtp-router) to extract it from the wire packet.
|
|
35
|
-
*/
|
|
36
|
-
feedSource(ssId: number, data: ArrayBuffer, ts: number, alta?: {
|
|
37
|
-
auth: ArrayBuffer;
|
|
38
|
-
payloadEnd: number;
|
|
39
|
-
}): void;
|
|
40
|
-
/**
|
|
41
|
-
* Feed a repair symbol to the Worker. data ArrayBuffer is transferred (zero-copy).
|
|
42
|
-
* Caller must not access data after this call — it is detached.
|
|
43
|
-
*
|
|
44
|
-
* Carries the wire-level Repair FEC Payload ID fields (ISO 23008-1 §C.5.3):
|
|
45
|
-
* - ssStart: SS_ID of first source symbol in the block (= SBN * configured K
|
|
46
|
-
* under `k-padded-v1`; any uint32, the block key, under `iso-ssbg1-v1`)
|
|
47
|
-
* - ssbLength: authored source-symbol count (1..configured K)
|
|
48
|
-
* - rsId: repair symbol index within the block
|
|
49
|
-
*/
|
|
50
|
-
feedRepair(ssStart: number, ssbLength: number, rsId: number, data: ArrayBuffer, ts: number): void;
|
|
51
|
-
/**
|
|
52
|
-
* Submit relay block signature for verification. sig and hash are transferred.
|
|
53
|
-
*/
|
|
54
|
-
relayBlockSig(sbn: number, sig: ArrayBuffer, hash: ArrayBuffer): void;
|
|
55
|
-
/**
|
|
56
|
-
* Trigger cleanup after a block's inactivity deadline. `currentSbn` is the
|
|
57
|
-
* block key: the SBN under `k-padded-v1`, the SS_Start under `iso-ssbg1-v1`.
|
|
58
|
-
*
|
|
59
|
-
* While one queue-drain barrier is in flight, later SBNs are coalesced into
|
|
60
|
-
* the next command without losing their individual acknowledgement identity.
|
|
61
|
-
*/
|
|
62
|
-
cleanup(currentSbn: number): void;
|
|
63
|
-
/** Reset this track's decoder epoch while preserving Worker configuration. */
|
|
64
|
-
reset(): void;
|
|
65
|
-
/** Register callback for decoded/recovered frames (FEC-03). */
|
|
66
|
-
onFrame(cb: (data: ArrayBuffer, meta: FrameMeta) => void): void;
|
|
67
|
-
/** Register callback for periodic stats snapshots (FEC-04). */
|
|
68
|
-
onSnapshot(cb: (stats: FecTrackStats) => void): void;
|
|
69
|
-
/**
|
|
70
|
-
* Register callback for individual block state changes. The Worker posts
|
|
71
|
-
* them only once asked, so registering subscribes (after the Worker
|
|
72
|
-
* announces `subscribeBlockUpdates`). An older Worker that does not
|
|
73
|
-
* announce it posts them unasked.
|
|
74
|
-
*/
|
|
75
|
-
onBlockUpdate(cb: (block: FecBlockSnapshot) => void): void;
|
|
76
|
-
/** Register callback fired after the Worker drains all commands queued before cleanup. */
|
|
77
|
-
onCleanupComplete(cb: (sbn: number) => void): void;
|
|
78
|
-
/** Register callback for Worker errors. */
|
|
79
|
-
onError(cb: (message: string, code?: FecWorkerErrorCode) => void): void;
|
|
80
|
-
/**
|
|
81
|
-
* True once dispose() ran. A disposed client cannot decode, fill, or
|
|
82
|
-
* acknowledge anything, so routing symbols to it discards them; every
|
|
83
|
-
* command method (feedSource, feedRepair, relayBlockSig, cleanup, reset)
|
|
84
|
-
* throws rather than pretend otherwise. Callers check this first.
|
|
85
|
-
*/
|
|
86
|
-
get disposed(): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Dispose the Worker. Sends dispose command then terminates.
|
|
89
|
-
* Idempotent — safe to call multiple times.
|
|
90
|
-
*/
|
|
91
|
-
dispose(): void;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=fec-worker-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fec-worker-client.d.ts","sourceRoot":"","sources":["../src/fec-worker-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAIX,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,kBAAkB,EAClB,MAAM,uBAAuB,CAAC;AAE/B,qBAAa,eAAe;;IA2B3B;;;OAGG;gBACS,WAAW,EAAE,MAAM,GAAG,GAAG;IAgBrC;;;;;;OAMG;IACH,SAAS,CACR,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,WAAW,CAAC,MAAM,EAC9B,aAAa,CAAC,EAAE,WAAW,EAC3B,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,G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
|
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @blockcast/fec-worker — Main-Thread Client
|
|
3
|
-
*
|
|
4
|
-
* Wraps one Worker per track instance. Provides typed API for the
|
|
5
|
-
* FecWorkerCommand/FecWorkerEvent protocol with zero-copy ArrayBuffer transfers.
|
|
6
|
-
*
|
|
7
|
-
* Constructor accepts either a URL (creates Worker internally) or a pre-created
|
|
8
|
-
* Worker instance (for testing via constructor injection).
|
|
9
|
-
*/
|
|
10
|
-
export class FecWorkerClient {
|
|
11
|
-
#worker;
|
|
12
|
-
#onFrame = null;
|
|
13
|
-
#onSnapshot = null;
|
|
14
|
-
#onBlockUpdate = null;
|
|
15
|
-
#onCleanupComplete = null;
|
|
16
|
-
#onError = null;
|
|
17
|
-
#cleanupInFlight = null;
|
|
18
|
-
#queuedCleanupSbns = new Set();
|
|
19
|
-
#pendingResets = 0;
|
|
20
|
-
#resetFailed = false;
|
|
21
|
-
#disposed = false;
|
|
22
|
-
// Symbols fed during the current task, sent as one feedSymbols message
|
|
23
|
-
// when the task's microtasks run (BLO-36599). A packet stream delivers many
|
|
24
|
-
// symbols per task, and each postMessage is a structured-clone round trip
|
|
25
|
-
// on the page thread; the batch boundary is the task, not a size or timer.
|
|
26
|
-
#pendingSymbols = [];
|
|
27
|
-
#pendingTransfer = [];
|
|
28
|
-
#flushQueued = false;
|
|
29
|
-
// Batching starts only once the Worker announced it accepts feedSymbols.
|
|
30
|
-
#batchSymbols = false;
|
|
31
|
-
// The Worker posts blockUpdate events only to a client that subscribed,
|
|
32
|
-
// which this client does once a callback is registered and the Worker
|
|
33
|
-
// announced the command (BLO-36599).
|
|
34
|
-
#blockUpdatesAnnounced = false;
|
|
35
|
-
#blockUpdatesSubscribed = false;
|
|
36
|
-
/**
|
|
37
|
-
* Create a FecWorkerClient.
|
|
38
|
-
* @param workerOrUrl - Either a Worker instance (for testing) or a URL to create one
|
|
39
|
-
*/
|
|
40
|
-
constructor(workerOrUrl) {
|
|
41
|
-
if (workerOrUrl instanceof URL) {
|
|
42
|
-
this.#worker = new Worker(workerOrUrl, { type: "module" });
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
this.#worker = workerOrUrl;
|
|
46
|
-
}
|
|
47
|
-
this.#worker.onmessage = (e) => this.#handleEvent(e.data);
|
|
48
|
-
this.#worker.onerror = (e) => {
|
|
49
|
-
this.#onError?.(formatWorkerError(e), "worker-runtime");
|
|
50
|
-
};
|
|
51
|
-
this.#worker.onmessageerror = (e) => {
|
|
52
|
-
this.#onError?.(formatWorkerMessageError(e), "worker-message");
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Configure the Worker with FEC parameters and WASM module.
|
|
57
|
-
* wasmModule is transferred (not neutered — WebAssembly.Module is shareable).
|
|
58
|
-
* altaPublicKey is PKCS#8 SPKI DER bytes (self-describing — algorithm detected from OID).
|
|
59
|
-
* Transferred (detached from sender).
|
|
60
|
-
* altaWasmModule is structured-cloneable (NOT transferable — do not add to transfer list).
|
|
61
|
-
*/
|
|
62
|
-
configure(config, wasmModule, altaPublicKey, altaWasmModule) {
|
|
63
|
-
if (this.#disposed)
|
|
64
|
-
throw new Error("[FecWorkerClient] disposed");
|
|
65
|
-
this.#flushSymbols();
|
|
66
|
-
const cmd = {
|
|
67
|
-
type: "configure",
|
|
68
|
-
config,
|
|
69
|
-
wasmModule,
|
|
70
|
-
altaPublicKey,
|
|
71
|
-
altaWasmModule,
|
|
72
|
-
};
|
|
73
|
-
// WebAssembly.Module is structured-cloneable, NOT transferable.
|
|
74
|
-
// Pass it in the message body (Chrome clones it automatically).
|
|
75
|
-
// Only ArrayBuffers (like altaPublicKey) go in the transfer list.
|
|
76
|
-
const transferList = [];
|
|
77
|
-
if (altaPublicKey)
|
|
78
|
-
transferList.push(altaPublicKey);
|
|
79
|
-
// altaWasmModule is structured-cloneable — NOT added to transferList
|
|
80
|
-
this.#worker.postMessage(cmd, transferList);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Feed a source symbol to the Worker. data ArrayBuffer is transferred (zero-copy).
|
|
84
|
-
* Caller must not access data after this call — it is transferred with the
|
|
85
|
-
* task's symbol batch, before any later command of this client.
|
|
86
|
-
*
|
|
87
|
-
* Optional `alta` carries the detached ALTA authenticator bytes and the
|
|
88
|
-
* byte offset in `data` where the signed payload ends. The auth buffer is
|
|
89
|
-
* transferred zero-copy alongside `data`. Use {@link getMmtpAltaTrailer}
|
|
90
|
-
* upstream (mmtp-router) to extract it from the wire packet.
|
|
91
|
-
*/
|
|
92
|
-
feedSource(ssId, data, ts, alta) {
|
|
93
|
-
if (this.#disposed)
|
|
94
|
-
throw new Error("[FecWorkerClient] feedSource on a disposed client");
|
|
95
|
-
if (alta) {
|
|
96
|
-
this.#queueSymbol({
|
|
97
|
-
type: "feedSource",
|
|
98
|
-
ssId,
|
|
99
|
-
data,
|
|
100
|
-
ts,
|
|
101
|
-
altaAuth: alta.auth,
|
|
102
|
-
altaPayloadEnd: alta.payloadEnd,
|
|
103
|
-
}, data, alta.auth);
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
this.#queueSymbol({ type: "feedSource", ssId, data, ts }, data);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Feed a repair symbol to the Worker. data ArrayBuffer is transferred (zero-copy).
|
|
111
|
-
* Caller must not access data after this call — it is detached.
|
|
112
|
-
*
|
|
113
|
-
* Carries the wire-level Repair FEC Payload ID fields (ISO 23008-1 §C.5.3):
|
|
114
|
-
* - ssStart: SS_ID of first source symbol in the block (= SBN * configured K
|
|
115
|
-
* under `k-padded-v1`; any uint32, the block key, under `iso-ssbg1-v1`)
|
|
116
|
-
* - ssbLength: authored source-symbol count (1..configured K)
|
|
117
|
-
* - rsId: repair symbol index within the block
|
|
118
|
-
*/
|
|
119
|
-
feedRepair(ssStart, ssbLength, rsId, data, ts) {
|
|
120
|
-
if (this.#disposed)
|
|
121
|
-
throw new Error("[FecWorkerClient] feedRepair on a disposed client");
|
|
122
|
-
this.#queueSymbol({ type: "feedRepair", ssStart, ssbLength, rsId, data, ts }, data);
|
|
123
|
-
}
|
|
124
|
-
#queueSymbol(symbol, data, auth) {
|
|
125
|
-
if (!this.#batchSymbols) {
|
|
126
|
-
this.#worker.postMessage(symbol, auth ? [data, auth] : [data]);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
this.#pendingSymbols.push(symbol);
|
|
130
|
-
this.#pendingTransfer.push(data);
|
|
131
|
-
if (auth)
|
|
132
|
-
this.#pendingTransfer.push(auth);
|
|
133
|
-
if (this.#flushQueued)
|
|
134
|
-
return;
|
|
135
|
-
this.#flushQueued = true;
|
|
136
|
-
queueMicrotask(() => {
|
|
137
|
-
this.#flushQueued = false;
|
|
138
|
-
this.#flushSymbols();
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Send the symbols fed so far. Every other command calls this first, so a
|
|
143
|
-
* cleanup barrier, reset or signature still follows all earlier symbols.
|
|
144
|
-
*/
|
|
145
|
-
#flushSymbols() {
|
|
146
|
-
if (this.#pendingSymbols.length === 0 || this.#disposed)
|
|
147
|
-
return;
|
|
148
|
-
const symbols = this.#pendingSymbols;
|
|
149
|
-
const transfer = this.#pendingTransfer;
|
|
150
|
-
this.#pendingSymbols = [];
|
|
151
|
-
this.#pendingTransfer = [];
|
|
152
|
-
this.#worker.postMessage({ type: "feedSymbols", symbols }, transfer);
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Submit relay block signature for verification. sig and hash are transferred.
|
|
156
|
-
*/
|
|
157
|
-
relayBlockSig(sbn, sig, hash) {
|
|
158
|
-
if (this.#disposed)
|
|
159
|
-
throw new Error("[FecWorkerClient] relayBlockSig on a disposed client");
|
|
160
|
-
this.#flushSymbols();
|
|
161
|
-
this.#worker.postMessage({ type: "relayBlockSig", sbn, sig, hash }, [sig, hash]);
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Trigger cleanup after a block's inactivity deadline. `currentSbn` is the
|
|
165
|
-
* block key: the SBN under `k-padded-v1`, the SS_Start under `iso-ssbg1-v1`.
|
|
166
|
-
*
|
|
167
|
-
* While one queue-drain barrier is in flight, later SBNs are coalesced into
|
|
168
|
-
* the next command without losing their individual acknowledgement identity.
|
|
169
|
-
*/
|
|
170
|
-
cleanup(currentSbn) {
|
|
171
|
-
if (this.#disposed)
|
|
172
|
-
throw new Error("[FecWorkerClient] cleanup on a disposed client");
|
|
173
|
-
if (!Number.isInteger(currentSbn) ||
|
|
174
|
-
currentSbn < 0 ||
|
|
175
|
-
currentSbn > 0xffff_ffff) {
|
|
176
|
-
throw new Error("[FecWorkerClient] cleanup: SBN must be a uint32");
|
|
177
|
-
}
|
|
178
|
-
if (this.#cleanupInFlight) {
|
|
179
|
-
this.#queuedCleanupSbns.add(currentSbn);
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
this.#postCleanup(new Set([currentSbn]));
|
|
183
|
-
}
|
|
184
|
-
/** Reset this track's decoder epoch while preserving Worker configuration. */
|
|
185
|
-
reset() {
|
|
186
|
-
if (this.#disposed)
|
|
187
|
-
throw new Error("[FecWorkerClient] reset on a disposed client");
|
|
188
|
-
this.#flushSymbols();
|
|
189
|
-
this.#pendingResets++;
|
|
190
|
-
this.#cleanupInFlight = null;
|
|
191
|
-
this.#queuedCleanupSbns.clear();
|
|
192
|
-
this.#worker.postMessage({ type: "reset" });
|
|
193
|
-
}
|
|
194
|
-
#postCleanup(sbns) {
|
|
195
|
-
// The cleanup is a queue-drain barrier: every symbol fed before it is
|
|
196
|
-
// posted must reach the Worker first.
|
|
197
|
-
this.#flushSymbols();
|
|
198
|
-
this.#cleanupInFlight = sbns;
|
|
199
|
-
const orderedSbns = [...sbns].sort((a, b) => a - b);
|
|
200
|
-
this.#worker.postMessage({ type: "cleanup", sbns: orderedSbns });
|
|
201
|
-
}
|
|
202
|
-
/** Register callback for decoded/recovered frames (FEC-03). */
|
|
203
|
-
onFrame(cb) {
|
|
204
|
-
this.#onFrame = cb;
|
|
205
|
-
}
|
|
206
|
-
/** Register callback for periodic stats snapshots (FEC-04). */
|
|
207
|
-
onSnapshot(cb) {
|
|
208
|
-
this.#onSnapshot = cb;
|
|
209
|
-
}
|
|
210
|
-
/**
|
|
211
|
-
* Register callback for individual block state changes. The Worker posts
|
|
212
|
-
* them only once asked, so registering subscribes (after the Worker
|
|
213
|
-
* announces `subscribeBlockUpdates`). An older Worker that does not
|
|
214
|
-
* announce it posts them unasked.
|
|
215
|
-
*/
|
|
216
|
-
onBlockUpdate(cb) {
|
|
217
|
-
this.#onBlockUpdate = cb;
|
|
218
|
-
this.#subscribeBlockUpdates();
|
|
219
|
-
}
|
|
220
|
-
#subscribeBlockUpdates() {
|
|
221
|
-
if (this.#disposed ||
|
|
222
|
-
this.#blockUpdatesSubscribed ||
|
|
223
|
-
!this.#blockUpdatesAnnounced ||
|
|
224
|
-
!this.#onBlockUpdate)
|
|
225
|
-
return;
|
|
226
|
-
this.#blockUpdatesSubscribed = true;
|
|
227
|
-
this.#worker.postMessage({ type: "subscribeBlockUpdates" });
|
|
228
|
-
}
|
|
229
|
-
/** Register callback fired after the Worker drains all commands queued before cleanup. */
|
|
230
|
-
onCleanupComplete(cb) {
|
|
231
|
-
this.#onCleanupComplete = cb;
|
|
232
|
-
}
|
|
233
|
-
/** Register callback for Worker errors. */
|
|
234
|
-
onError(cb) {
|
|
235
|
-
this.#onError = cb;
|
|
236
|
-
}
|
|
237
|
-
/**
|
|
238
|
-
* True once dispose() ran. A disposed client cannot decode, fill, or
|
|
239
|
-
* acknowledge anything, so routing symbols to it discards them; every
|
|
240
|
-
* command method (feedSource, feedRepair, relayBlockSig, cleanup, reset)
|
|
241
|
-
* throws rather than pretend otherwise. Callers check this first.
|
|
242
|
-
*/
|
|
243
|
-
get disposed() {
|
|
244
|
-
return this.#disposed;
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* Dispose the Worker. Sends dispose command then terminates.
|
|
248
|
-
* Idempotent — safe to call multiple times.
|
|
249
|
-
*/
|
|
250
|
-
dispose() {
|
|
251
|
-
if (this.#disposed)
|
|
252
|
-
return;
|
|
253
|
-
this.#disposed = true;
|
|
254
|
-
// A terminated Worker decodes nothing; symbols still batched are dropped.
|
|
255
|
-
this.#pendingSymbols = [];
|
|
256
|
-
this.#pendingTransfer = [];
|
|
257
|
-
this.#cleanupInFlight = null;
|
|
258
|
-
this.#queuedCleanupSbns.clear();
|
|
259
|
-
this.#worker.postMessage({ type: "dispose" });
|
|
260
|
-
this.#worker.terminate();
|
|
261
|
-
}
|
|
262
|
-
#handleEvent(event) {
|
|
263
|
-
if (event.type === "capabilities") {
|
|
264
|
-
if (Array.isArray(event.commands) && event.commands.includes("feedSymbols")) {
|
|
265
|
-
this.#batchSymbols = true;
|
|
266
|
-
}
|
|
267
|
-
if (Array.isArray(event.commands) && event.commands.includes("subscribeBlockUpdates")) {
|
|
268
|
-
this.#blockUpdatesAnnounced = true;
|
|
269
|
-
this.#subscribeBlockUpdates();
|
|
270
|
-
}
|
|
271
|
-
return;
|
|
272
|
-
}
|
|
273
|
-
if (event.type === "resetComplete") {
|
|
274
|
-
this.#pendingResets = Math.max(0, this.#pendingResets - 1);
|
|
275
|
-
this.#resetFailed = false;
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
if (event.type === "error") {
|
|
279
|
-
if (event.code === "reset-failed") {
|
|
280
|
-
this.#pendingResets = Math.max(0, this.#pendingResets - 1);
|
|
281
|
-
this.#resetFailed = true;
|
|
282
|
-
}
|
|
283
|
-
if (event.code)
|
|
284
|
-
this.#onError?.(event.message, event.code);
|
|
285
|
-
else
|
|
286
|
-
this.#onError?.(event.message);
|
|
287
|
-
return;
|
|
288
|
-
}
|
|
289
|
-
if (this.#pendingResets > 0 || this.#resetFailed)
|
|
290
|
-
return;
|
|
291
|
-
switch (event.type) {
|
|
292
|
-
case "frame":
|
|
293
|
-
this.#onFrame?.(event.data, event.meta);
|
|
294
|
-
break;
|
|
295
|
-
case "snapshot":
|
|
296
|
-
this.#onSnapshot?.(event.stats);
|
|
297
|
-
break;
|
|
298
|
-
case "blockUpdate":
|
|
299
|
-
this.#onBlockUpdate?.(event.block);
|
|
300
|
-
break;
|
|
301
|
-
case "cleanupComplete":
|
|
302
|
-
for (const sbn of event.sbns) {
|
|
303
|
-
this.#onCleanupComplete?.(sbn);
|
|
304
|
-
}
|
|
305
|
-
this.#cleanupInFlight = null;
|
|
306
|
-
if (this.#queuedCleanupSbns.size > 0) {
|
|
307
|
-
const next = this.#queuedCleanupSbns;
|
|
308
|
-
this.#queuedCleanupSbns = new Set();
|
|
309
|
-
this.#postCleanup(next);
|
|
310
|
-
}
|
|
311
|
-
break;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
function formatWorkerError(event) {
|
|
316
|
-
const parts = ["Worker error"];
|
|
317
|
-
if (event.message)
|
|
318
|
-
parts.push(event.message);
|
|
319
|
-
if (event.filename) {
|
|
320
|
-
const location = [event.filename];
|
|
321
|
-
if (event.lineno)
|
|
322
|
-
location.push(String(event.lineno));
|
|
323
|
-
if (event.colno)
|
|
324
|
-
location.push(String(event.colno));
|
|
325
|
-
parts.push(`at ${location.join(":")}`);
|
|
326
|
-
}
|
|
327
|
-
if (event.error instanceof Error) {
|
|
328
|
-
if (event.error.message && event.error.message !== event.message) {
|
|
329
|
-
parts.push(event.error.message);
|
|
330
|
-
}
|
|
331
|
-
if (event.error.stack)
|
|
332
|
-
parts.push(event.error.stack);
|
|
333
|
-
}
|
|
334
|
-
else if (event.error != null) {
|
|
335
|
-
parts.push(String(event.error));
|
|
336
|
-
}
|
|
337
|
-
return parts.join(": ");
|
|
338
|
-
}
|
|
339
|
-
function formatWorkerMessageError(event) {
|
|
340
|
-
const data = event.data;
|
|
341
|
-
const detail = data == null ? "" :
|
|
342
|
-
data instanceof Error ? `: ${data.message}` :
|
|
343
|
-
`: ${Object.prototype.toString.call(data)}`;
|
|
344
|
-
return `Worker messageerror: failed to deserialize worker message${detail}`;
|
|
345
|
-
}
|
|
346
|
-
//# sourceMappingURL=fec-worker-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fec-worker-client.js","sourceRoot":"","sources":["../src/fec-worker-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAaH,MAAM,OAAO,eAAe;IAClB,OAAO,CAAS;IACzB,QAAQ,GAA0D,IAAI,CAAC;IACvE,WAAW,GAA4C,IAAI,CAAC;IAC5D,cAAc,GAA+C,IAAI,CAAC;IAClE,kBAAkB,GAAmC,IAAI,CAAC;IAC1D,QAAQ,GAAkE,IAAI,CAAC;IAC/E,gBAAgB,GAAuB,IAAI,CAAC;IAC5C,kBAAkB,GAAG,IAAI,GAAG,EAAU,CAAC;IACvC,cAAc,GAAG,CAAC,CAAC;IACnB,YAAY,GAAG,KAAK,CAAC;IACrB,SAAS,GAAG,KAAK,CAAC;IAClB,uEAAuE;IACvE,4EAA4E;IAC5E,0EAA0E;IAC1E,2EAA2E;IAC3E,eAAe,GAAuB,EAAE,CAAC;IACzC,gBAAgB,GAAmB,EAAE,CAAC;IACtC,YAAY,GAAG,KAAK,CAAC;IACrB,yEAAyE;IACzE,aAAa,GAAG,KAAK,CAAC;IACtB,wEAAwE;IACxE,sEAAsE;IACtE,qCAAqC;IACrC,sBAAsB,GAAG,KAAK,CAAC;IAC/B,uBAAuB,GAAG,KAAK,CAAC;IAEhC;;;OAGG;IACH,YAAY,WAAyB;QACpC,IAAI,WAAW,YAAY,GAAG,EAAE,CAAC;YAChC,IAAI,CAAC,OAAO,GAAG,IAAI,MAAM,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5D,CAAC;aAAM,CAAC;YACP,IAAI,CAAC,OAAO,GAAG,WAAW,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,S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