@blockcast/mmt-container 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +524 -0
- package/dist/.build-stamp +0 -0
- package/dist/__tests__/test-utils.d.ts +71 -0
- package/dist/__tests__/test-utils.d.ts.map +1 -0
- package/dist/align.d.ts +152 -0
- package/dist/align.d.ts.map +1 -0
- package/dist/align.js +88 -0
- package/dist/align.js.map +7 -0
- package/dist/audio-init-parser.d.ts +66 -0
- package/dist/audio-init-parser.d.ts.map +1 -0
- package/dist/audio-init-parser.js +118 -0
- package/dist/audio-init-parser.js.map +7 -0
- package/dist/audio-ring-buffer.d.ts +50 -0
- package/dist/audio-ring-buffer.d.ts.map +1 -0
- package/dist/audio-ring-buffer.js +80 -0
- package/dist/audio-ring-buffer.js.map +7 -0
- package/dist/authored-timing.d.ts +32 -0
- package/dist/authored-timing.d.ts.map +1 -0
- package/dist/authored-timing.js +32 -0
- package/dist/authored-timing.js.map +7 -0
- package/dist/block-policy.d.ts +314 -0
- package/dist/block-policy.d.ts.map +1 -0
- package/dist/block-policy.js +466 -0
- package/dist/block-policy.js.map +7 -0
- package/dist/browser-runtime.js +26549 -0
- package/dist/browser-runtime.js.map +7 -0
- package/dist/carp-catalog.d.ts +429 -0
- package/dist/carp-catalog.d.ts.map +1 -0
- package/dist/carp-catalog.js +985 -0
- package/dist/carp-catalog.js.map +7 -0
- package/dist/catalog-fec-params.d.ts +275 -0
- package/dist/catalog-fec-params.d.ts.map +1 -0
- package/dist/catalog-fec-params.js +702 -0
- package/dist/catalog-fec-params.js.map +7 -0
- package/dist/catalog-network-source.d.ts +42 -0
- package/dist/catalog-network-source.d.ts.map +1 -0
- package/dist/catalog-network-source.js +47 -0
- package/dist/catalog-network-source.js.map +7 -0
- package/dist/catalog-validator.d.ts +18 -0
- package/dist/catalog-validator.d.ts.map +1 -0
- package/dist/catalog-validator.js +7747 -0
- package/dist/catalog-validator.js.map +7 -0
- package/dist/cmaf-block-assembler.d.ts +285 -0
- package/dist/cmaf-block-assembler.d.ts.map +1 -0
- package/dist/cmaf-block-assembler.js +1966 -0
- package/dist/cmaf-block-assembler.js.map +7 -0
- package/dist/cmaf-group-batcher.d.ts +38 -0
- package/dist/cmaf-group-batcher.d.ts.map +1 -0
- package/dist/cmaf-group-batcher.js +176 -0
- package/dist/cmaf-group-batcher.js.map +7 -0
- package/dist/cmcd-producer.d.ts +104 -0
- package/dist/cmcd-producer.d.ts.map +1 -0
- package/dist/cmcd-producer.js +183 -0
- package/dist/cmcd-producer.js.map +7 -0
- package/dist/codec-utils.d.ts +384 -0
- package/dist/codec-utils.d.ts.map +1 -0
- package/dist/codec-utils.js +1546 -0
- package/dist/codec-utils.js.map +7 -0
- package/dist/conceal-timeline.d.ts +146 -0
- package/dist/conceal-timeline.d.ts.map +1 -0
- package/dist/conceal-timeline.js +137 -0
- package/dist/conceal-timeline.js.map +7 -0
- package/dist/delivery-gap.d.ts +75 -0
- package/dist/delivery-gap.d.ts.map +1 -0
- package/dist/delivery-gap.js +88 -0
- package/dist/delivery-gap.js.map +7 -0
- package/dist/duplicate-ledger.d.ts +197 -0
- package/dist/duplicate-ledger.d.ts.map +1 -0
- package/dist/duplicate-ledger.js +226 -0
- package/dist/duplicate-ledger.js.map +7 -0
- package/dist/fec-codec.d.ts +32 -0
- package/dist/fec-codec.d.ts.map +1 -0
- package/dist/fec-codec.js +47 -0
- package/dist/fec-codec.js.map +7 -0
- package/dist/fec-manager.d.ts +583 -0
- package/dist/fec-manager.d.ts.map +1 -0
- package/dist/fec-manager.js +3899 -0
- package/dist/fec-manager.js.map +7 -0
- package/dist/fec-starvation-detector.d.ts +59 -0
- package/dist/fec-starvation-detector.d.ts.map +1 -0
- package/dist/fec-starvation-detector.js +60 -0
- package/dist/fec-starvation-detector.js.map +7 -0
- package/dist/fec-state.d.ts +131 -0
- package/dist/fec-state.d.ts.map +1 -0
- package/dist/fec-state.js +87 -0
- package/dist/fec-state.js.map +7 -0
- package/dist/fec-worker-setup.d.ts +94 -0
- package/dist/fec-worker-setup.d.ts.map +1 -0
- package/dist/fec-worker-setup.js +673 -0
- package/dist/fec-worker-setup.js.map +7 -0
- package/dist/fmp4-completion.d.ts +30 -0
- package/dist/fmp4-completion.d.ts.map +1 -0
- package/dist/fmp4-completion.js +21 -0
- package/dist/fmp4-completion.js.map +7 -0
- package/dist/fmp4-reader.d.ts +37 -0
- package/dist/fmp4-reader.d.ts.map +1 -0
- package/dist/fmp4-reader.js +100 -0
- package/dist/fmp4-reader.js.map +7 -0
- package/dist/index.d.ts +44 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +460 -14
- package/dist/index.js.map +7 -1
- package/dist/iso-block-locator.d.ts +118 -0
- package/dist/iso-block-locator.d.ts.map +1 -0
- package/dist/iso-block-locator.js +289 -0
- package/dist/iso-block-locator.js.map +7 -0
- package/dist/iso-bmff-timing.d.ts +78 -0
- package/dist/iso-bmff-timing.d.ts.map +1 -0
- package/dist/iso-bmff-timing.js +593 -0
- package/dist/iso-bmff-timing.js.map +7 -0
- package/dist/loc.d.ts +70 -75
- package/dist/loc.d.ts.map +1 -1
- package/dist/loc.js +106 -192
- package/dist/loc.js.map +7 -1
- package/dist/manifest-auth-plan.d.ts +30 -0
- package/dist/manifest-auth-plan.d.ts.map +1 -0
- package/dist/manifest-auth-plan.js +1266 -0
- package/dist/manifest-auth-plan.js.map +7 -0
- package/dist/media-router.d.ts +262 -0
- package/dist/media-router.d.ts.map +1 -0
- package/dist/media-router.js +584 -0
- package/dist/media-router.js.map +7 -0
- package/dist/mfu-reassembler.d.ts +313 -9
- package/dist/mfu-reassembler.d.ts.map +1 -1
- package/dist/mfu-reassembler.js +3051 -285
- package/dist/mfu-reassembler.js.map +7 -1
- package/dist/mfu-reassembly-policy.d.ts +24 -0
- package/dist/mfu-reassembly-policy.d.ts.map +1 -0
- package/dist/mfu-reassembly-policy.js +99 -0
- package/dist/mfu-reassembly-policy.js.map +7 -0
- package/dist/mmtp-container-parser.d.ts +568 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -0
- package/dist/mmtp-container-parser.js +6580 -0
- package/dist/mmtp-container-parser.js.map +7 -0
- package/dist/mmtp-container-parser.no-modules.js +9616 -0
- package/dist/mmtp-container-parser.no-modules.js.map +7 -0
- package/dist/mmtp-decode-pipeline.d.ts +138 -0
- package/dist/mmtp-decode-pipeline.d.ts.map +1 -0
- package/dist/mmtp-decode-pipeline.js +6814 -0
- package/dist/mmtp-decode-pipeline.js.map +7 -0
- package/dist/mmtp-router.d.ts +679 -0
- package/dist/mmtp-router.d.ts.map +1 -0
- package/dist/mmtp-router.js +11278 -0
- package/dist/mmtp-router.js.map +7 -0
- package/dist/mmtp-to-cmaf.d.ts +187 -0
- package/dist/mmtp-to-cmaf.d.ts.map +1 -0
- package/dist/mmtp-to-cmaf.js +716 -0
- package/dist/mmtp-to-cmaf.js.map +7 -0
- package/dist/multicast-auth-catalog.d.ts +115 -0
- package/dist/multicast-auth-catalog.d.ts.map +1 -0
- package/dist/multicast-auth-catalog.js +202 -0
- package/dist/multicast-auth-catalog.js.map +7 -0
- package/dist/multicast-input.d.ts +141 -0
- package/dist/multicast-input.d.ts.map +1 -0
- package/dist/multicast-input.js +390 -0
- package/dist/multicast-input.js.map +7 -0
- package/dist/multicast-manager.d.ts +669 -0
- package/dist/multicast-manager.d.ts.map +1 -0
- package/dist/multicast-manager.js +19101 -0
- package/dist/multicast-manager.js.map +7 -0
- package/dist/multicast-transport.d.ts +271 -0
- package/dist/multicast-transport.d.ts.map +1 -0
- package/dist/multicast-transport.js +2264 -0
- package/dist/multicast-transport.js.map +7 -0
- package/dist/multicast-unwrap.d.ts +57 -0
- package/dist/multicast-unwrap.d.ts.map +1 -0
- package/dist/multicast-unwrap.js +418 -0
- package/dist/multicast-unwrap.js.map +7 -0
- package/dist/no-modules.d.ts +10 -0
- package/dist/no-modules.d.ts.map +1 -0
- package/dist/no-modules.js +9491 -0
- package/dist/no-modules.js.map +7 -0
- package/dist/phase14-catalog-override.d.ts +126 -0
- package/dist/phase14-catalog-override.d.ts.map +1 -0
- package/dist/phase14-catalog-override.js +155 -0
- package/dist/phase14-catalog-override.js.map +7 -0
- package/dist/repair-fetch.d.ts +270 -0
- package/dist/repair-fetch.d.ts.map +1 -0
- package/dist/repair-fetch.js +381 -0
- package/dist/repair-fetch.js.map +7 -0
- package/dist/repair-layers.d.ts +158 -0
- package/dist/repair-layers.d.ts.map +1 -0
- package/dist/repair-layers.js +344 -0
- package/dist/repair-layers.js.map +7 -0
- package/dist/sample-combiner.d.ts +212 -0
- package/dist/sample-combiner.d.ts.map +1 -0
- package/dist/sample-combiner.js +595 -0
- package/dist/sample-combiner.js.map +7 -0
- package/dist/signaling.d.ts +29 -0
- package/dist/signaling.d.ts.map +1 -0
- package/dist/signaling.js +572 -0
- package/dist/signaling.js.map +7 -0
- package/dist/source-auth.d.ts +2 -0
- package/dist/source-auth.d.ts.map +1 -0
- package/dist/source-auth.js +1209 -0
- package/dist/source-auth.js.map +7 -0
- package/dist/switching-set-alignment.d.ts +61 -0
- package/dist/switching-set-alignment.d.ts.map +1 -0
- package/dist/switching-set-alignment.js +70 -0
- package/dist/switching-set-alignment.js.map +7 -0
- package/dist/timestamp-codec.d.ts +34 -0
- package/dist/timestamp-codec.d.ts.map +1 -0
- package/dist/timestamp-codec.js +473 -0
- package/dist/timestamp-codec.js.map +7 -0
- package/dist/track-pipeline-setup.d.ts +83 -0
- package/dist/track-pipeline-setup.d.ts.map +1 -0
- package/dist/track-pipeline-setup.js +291 -0
- package/dist/track-pipeline-setup.js.map +7 -0
- package/dist/track-pipeline.d.ts +121 -0
- package/dist/track-pipeline.d.ts.map +1 -0
- package/dist/track-pipeline.js +209 -0
- package/dist/track-pipeline.js.map +7 -0
- package/dist/track-session.d.ts +414 -0
- package/dist/track-session.d.ts.map +1 -0
- package/dist/track-session.js +754 -0
- package/dist/track-session.js.map +7 -0
- package/dist/transport-pool.d.ts +69 -0
- package/dist/transport-pool.d.ts.map +1 -0
- package/dist/transport-pool.js +74 -0
- package/dist/transport-pool.js.map +7 -0
- package/dist/wasm-mfu-reassembler.d.ts +97 -0
- package/dist/wasm-mfu-reassembler.d.ts.map +1 -0
- package/dist/wasm-mfu-reassembler.js +2133 -0
- package/dist/wasm-mfu-reassembler.js.map +7 -0
- package/dist/wasm-mmtp-container-parser.d.ts +10 -0
- package/dist/wasm-mmtp-container-parser.d.ts.map +1 -0
- package/dist/wasm-mmtp-container-parser.js +6834 -0
- package/dist/wasm-mmtp-container-parser.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/README.md +223 -0
- package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +38 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.js +78 -0
- package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +93 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +346 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +380 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +11 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +14 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +859 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts +10 -0
- package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/index.js +8 -0
- package/node_modules/@blockcast/fec-worker/dist/index.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +20 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +370 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +104 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +181 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +194 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +62 -0
- package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +9 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +1 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.js +13 -0
- package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +1 -0
- package/node_modules/@blockcast/fec-worker/package.json +59 -0
- package/node_modules/@blockcast/fec-worker/src/block-order.ts +93 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +392 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +399 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +1502 -0
- package/node_modules/@blockcast/fec-worker/src/index.ts +35 -0
- package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +589 -0
- package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +222 -0
- package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +209 -0
- package/node_modules/@blockcast/fec-worker/src/transfer.ts +12 -0
- package/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
- package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
- package/node_modules/@blockcast/mmt-base/README.md +134 -0
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +55 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
- package/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
- package/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
- package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
- package/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
- package/node_modules/@blockcast/mmt-fec/README.md +271 -0
- package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +82 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +296 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +106 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +288 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +46 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +96 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +33 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +57 -0
- package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +205 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +240 -0
- package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +20 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +28 -0
- package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +258 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +382 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +41 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +81 -0
- package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +82 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +170 -0
- package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
- 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 +57 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +134 -0
- 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 +55 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +128 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +7 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +7 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +292 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +612 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +145 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +6 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +892 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
- package/node_modules/@blockcast/mmt-fec/package.json +79 -0
- package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +371 -0
- package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +439 -0
- package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +127 -0
- package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +68 -0
- package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +310 -0
- package/node_modules/@blockcast/mmt-fec/src/index.ts +94 -0
- package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +34 -0
- package/node_modules/@blockcast/mmt-fec/src/oti.ts +463 -0
- package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +101 -0
- package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +195 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +28 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +128 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +4 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +4 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +37 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +179 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +99 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +492 -0
- package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +1 -0
- package/node_modules/@blockcast/mmt-manifest-verify/package.json +45 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +171 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +3 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +230 -0
- package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +669 -0
- package/node_modules/@noble/hashes/LICENSE +21 -0
- package/node_modules/@noble/hashes/README.md +521 -0
- package/node_modules/@noble/hashes/_assert.d.ts +17 -0
- package/node_modules/@noble/hashes/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_assert.js +18 -0
- package/node_modules/@noble/hashes/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/_blake.d.ts +14 -0
- package/node_modules/@noble/hashes/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_blake.js +50 -0
- package/node_modules/@noble/hashes/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/_md.d.ts +51 -0
- package/node_modules/@noble/hashes/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_md.js +162 -0
- package/node_modules/@noble/hashes/_md.js.map +1 -0
- package/node_modules/@noble/hashes/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/_u64.js +90 -0
- package/node_modules/@noble/hashes/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/argon2.js +401 -0
- package/node_modules/@noble/hashes/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/blake1.d.ts +106 -0
- package/node_modules/@noble/hashes/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake1.js +459 -0
- package/node_modules/@noble/hashes/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2.js +420 -0
- package/node_modules/@noble/hashes/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/blake2b.d.ts +11 -0
- package/node_modules/@noble/hashes/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2b.js +14 -0
- package/node_modules/@noble/hashes/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/blake2s.d.ts +20 -0
- package/node_modules/@noble/hashes/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake2s.js +24 -0
- package/node_modules/@noble/hashes/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/blake3.js +255 -0
- package/node_modules/@noble/hashes/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/crypto.js +5 -0
- package/node_modules/@noble/hashes/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/cryptoNode.js +18 -0
- package/node_modules/@noble/hashes/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/eskdf.js +166 -0
- package/node_modules/@noble/hashes/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts +17 -0
- package/node_modules/@noble/hashes/esm/_assert.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_assert.js +15 -0
- package/node_modules/@noble/hashes/esm/_assert.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts +14 -0
- package/node_modules/@noble/hashes/esm/_blake.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_blake.js +45 -0
- package/node_modules/@noble/hashes/esm/_blake.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts +51 -0
- package/node_modules/@noble/hashes/esm/_md.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_md.js +155 -0
- package/node_modules/@noble/hashes/esm/_md.js.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts +55 -0
- package/node_modules/@noble/hashes/esm/_u64.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/_u64.js +67 -0
- package/node_modules/@noble/hashes/esm/_u64.js.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts +32 -0
- package/node_modules/@noble/hashes/esm/argon2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/argon2.js +392 -0
- package/node_modules/@noble/hashes/esm/argon2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts +106 -0
- package/node_modules/@noble/hashes/esm/blake1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake1.js +452 -0
- package/node_modules/@noble/hashes/esm/blake1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts +116 -0
- package/node_modules/@noble/hashes/esm/blake2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2.js +413 -0
- package/node_modules/@noble/hashes/esm/blake2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts +11 -0
- package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2b.js +11 -0
- package/node_modules/@noble/hashes/esm/blake2b.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts +20 -0
- package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake2s.js +21 -0
- package/node_modules/@noble/hashes/esm/blake2s.js.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts +54 -0
- package/node_modules/@noble/hashes/esm/blake3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/blake3.js +251 -0
- package/node_modules/@noble/hashes/esm/blake3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/crypto.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/crypto.js +2 -0
- package/node_modules/@noble/hashes/esm/crypto.js.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js +15 -0
- package/node_modules/@noble/hashes/esm/cryptoNode.js.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts +47 -0
- package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/eskdf.js +160 -0
- package/node_modules/@noble/hashes/esm/eskdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hkdf.js +82 -0
- package/node_modules/@noble/hashes/esm/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts +35 -0
- package/node_modules/@noble/hashes/esm/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/hmac.js +86 -0
- package/node_modules/@noble/hashes/esm/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/esm/index.d.ts +2 -0
- package/node_modules/@noble/hashes/esm/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/index.js +33 -0
- package/node_modules/@noble/hashes/esm/index.js.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/esm/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/legacy.js +281 -0
- package/node_modules/@noble/hashes/esm/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/esm/package.json +10 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js +97 -0
- package/node_modules/@noble/hashes/esm/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts +13 -0
- package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js +13 -0
- package/node_modules/@noble/hashes/esm/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/scrypt.js +228 -0
- package/node_modules/@noble/hashes/esm/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts +11 -0
- package/node_modules/@noble/hashes/esm/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha1.js +11 -0
- package/node_modules/@noble/hashes/esm/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts +159 -0
- package/node_modules/@noble/hashes/esm/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha2.js +375 -0
- package/node_modules/@noble/hashes/esm/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts +20 -0
- package/node_modules/@noble/hashes/esm/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha256.js +20 -0
- package/node_modules/@noble/hashes/esm/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +142 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js +393 -0
- package/node_modules/@noble/hashes/esm/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts +53 -0
- package/node_modules/@noble/hashes/esm/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha3.js +234 -0
- package/node_modules/@noble/hashes/esm/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts +26 -0
- package/node_modules/@noble/hashes/esm/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/sha512.js +26 -0
- package/node_modules/@noble/hashes/esm/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts +161 -0
- package/node_modules/@noble/hashes/esm/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/esm/utils.js +281 -0
- package/node_modules/@noble/hashes/esm/utils.js.map +1 -0
- package/node_modules/@noble/hashes/hkdf.d.ts +36 -0
- package/node_modules/@noble/hashes/hkdf.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hkdf.js +88 -0
- package/node_modules/@noble/hashes/hkdf.js.map +1 -0
- package/node_modules/@noble/hashes/hmac.d.ts +35 -0
- package/node_modules/@noble/hashes/hmac.d.ts.map +1 -0
- package/node_modules/@noble/hashes/hmac.js +91 -0
- package/node_modules/@noble/hashes/hmac.js.map +1 -0
- package/node_modules/@noble/hashes/index.d.ts +1 -0
- package/node_modules/@noble/hashes/index.d.ts.map +1 -0
- package/node_modules/@noble/hashes/index.js +33 -0
- package/node_modules/@noble/hashes/index.js.map +1 -0
- package/node_modules/@noble/hashes/legacy.d.ts +71 -0
- package/node_modules/@noble/hashes/legacy.d.ts.map +1 -0
- package/node_modules/@noble/hashes/legacy.js +287 -0
- package/node_modules/@noble/hashes/legacy.js.map +1 -0
- package/node_modules/@noble/hashes/package.json +266 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts +23 -0
- package/node_modules/@noble/hashes/pbkdf2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/pbkdf2.js +101 -0
- package/node_modules/@noble/hashes/pbkdf2.js.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts +13 -0
- package/node_modules/@noble/hashes/ripemd160.d.ts.map +1 -0
- package/node_modules/@noble/hashes/ripemd160.js +16 -0
- package/node_modules/@noble/hashes/ripemd160.js.map +1 -0
- package/node_modules/@noble/hashes/scrypt.d.ts +34 -0
- package/node_modules/@noble/hashes/scrypt.d.ts.map +1 -0
- package/node_modules/@noble/hashes/scrypt.js +232 -0
- package/node_modules/@noble/hashes/scrypt.js.map +1 -0
- package/node_modules/@noble/hashes/sha1.d.ts +11 -0
- package/node_modules/@noble/hashes/sha1.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha1.js +14 -0
- package/node_modules/@noble/hashes/sha1.js.map +1 -0
- package/node_modules/@noble/hashes/sha2.d.ts +159 -0
- package/node_modules/@noble/hashes/sha2.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha2.js +384 -0
- package/node_modules/@noble/hashes/sha2.js.map +1 -0
- package/node_modules/@noble/hashes/sha256.d.ts +20 -0
- package/node_modules/@noble/hashes/sha256.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha256.js +23 -0
- package/node_modules/@noble/hashes/sha256.js.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts +142 -0
- package/node_modules/@noble/hashes/sha3-addons.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3-addons.js +402 -0
- package/node_modules/@noble/hashes/sha3-addons.js.map +1 -0
- package/node_modules/@noble/hashes/sha3.d.ts +53 -0
- package/node_modules/@noble/hashes/sha3.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha3.js +239 -0
- package/node_modules/@noble/hashes/sha3.js.map +1 -0
- package/node_modules/@noble/hashes/sha512.d.ts +26 -0
- package/node_modules/@noble/hashes/sha512.d.ts.map +1 -0
- package/node_modules/@noble/hashes/sha512.js +29 -0
- package/node_modules/@noble/hashes/sha512.js.map +1 -0
- package/node_modules/@noble/hashes/src/_assert.ts +22 -0
- package/node_modules/@noble/hashes/src/_blake.ts +50 -0
- package/node_modules/@noble/hashes/src/_md.ts +176 -0
- package/node_modules/@noble/hashes/src/_u64.ts +91 -0
- package/node_modules/@noble/hashes/src/argon2.ts +497 -0
- package/node_modules/@noble/hashes/src/blake1.ts +534 -0
- package/node_modules/@noble/hashes/src/blake2.ts +486 -0
- package/node_modules/@noble/hashes/src/blake2b.ts +10 -0
- package/node_modules/@noble/hashes/src/blake2s.ts +20 -0
- package/node_modules/@noble/hashes/src/blake3.ts +272 -0
- package/node_modules/@noble/hashes/src/crypto.ts +9 -0
- package/node_modules/@noble/hashes/src/cryptoNode.ts +15 -0
- package/node_modules/@noble/hashes/src/eskdf.ts +187 -0
- package/node_modules/@noble/hashes/src/hkdf.ts +88 -0
- package/node_modules/@noble/hashes/src/hmac.ts +94 -0
- package/node_modules/@noble/hashes/src/index.ts +31 -0
- package/node_modules/@noble/hashes/src/legacy.ts +293 -0
- package/node_modules/@noble/hashes/src/pbkdf2.ts +122 -0
- package/node_modules/@noble/hashes/src/ripemd160.ts +12 -0
- package/node_modules/@noble/hashes/src/scrypt.ts +257 -0
- package/node_modules/@noble/hashes/src/sha1.ts +10 -0
- package/node_modules/@noble/hashes/src/sha2.ts +402 -0
- package/node_modules/@noble/hashes/src/sha256.ts +24 -0
- package/node_modules/@noble/hashes/src/sha3-addons.ts +499 -0
- package/node_modules/@noble/hashes/src/sha3.ts +258 -0
- package/node_modules/@noble/hashes/src/sha512.ts +34 -0
- package/node_modules/@noble/hashes/src/utils.ts +395 -0
- package/node_modules/@noble/hashes/utils.d.ts +161 -0
- package/node_modules/@noble/hashes/utils.d.ts.map +1 -0
- package/node_modules/@noble/hashes/utils.js +313 -0
- package/node_modules/@noble/hashes/utils.js.map +1 -0
- package/package.json +179 -8
- package/schemas/catalog.schema.json +357 -0
- package/src/align.ts +239 -0
- package/src/audio-init-parser.ts +189 -0
- package/src/audio-ring-buffer.ts +120 -0
- package/src/authored-timing.ts +63 -0
- package/src/block-policy.ts +903 -0
- package/src/carp-catalog.ts +1065 -0
- package/src/catalog-fec-params.ts +729 -0
- package/src/catalog-network-source.ts +74 -0
- package/src/catalog-validator.ts +34 -0
- package/src/cmaf-block-assembler.ts +1255 -0
- package/src/cmaf-group-batcher.ts +104 -0
- package/src/cmcd-producer.ts +329 -0
- package/src/codec-utils.ts +1984 -0
- package/src/conceal-timeline.ts +293 -0
- package/src/delivery-gap.ts +147 -0
- package/src/duplicate-ledger.ts +372 -0
- package/src/fec-codec.ts +61 -0
- package/src/fec-manager.ts +4298 -0
- package/src/fec-starvation-detector.ts +128 -0
- package/src/fec-state.ts +219 -0
- package/src/fec-worker-setup.ts +283 -0
- package/src/fmp4-completion.ts +47 -0
- package/src/fmp4-reader.ts +112 -0
- package/src/index.ts +590 -21
- package/src/iso-block-locator.ts +329 -0
- package/src/iso-bmff-timing.ts +813 -0
- package/src/loc.ts +128 -154
- package/src/manifest-auth-plan.ts +107 -0
- package/src/media-router.ts +841 -0
- package/src/mfu-reassembler.ts +3480 -155
- package/src/mfu-reassembly-policy.ts +134 -0
- package/src/mmtp-container-parser.ts +2380 -0
- package/src/mmtp-decode-pipeline.ts +406 -0
- package/src/mmtp-router.ts +4860 -0
- package/src/mmtp-to-cmaf.ts +977 -0
- package/src/multicast-auth-catalog.ts +340 -0
- package/src/multicast-input.ts +793 -0
- package/src/multicast-manager.ts +2783 -0
- package/src/multicast-transport.ts +1058 -0
- package/src/multicast-unwrap.ts +132 -0
- package/src/no-modules.ts +21 -0
- package/src/phase14-catalog-override.ts +336 -0
- package/src/repair-fetch.ts +772 -0
- package/src/repair-layers.ts +533 -0
- package/src/sample-combiner.ts +938 -0
- package/src/signaling.ts +78 -0
- package/src/source-auth.ts +1 -0
- package/src/switching-set-alignment.ts +109 -0
- package/src/timestamp-codec.ts +265 -0
- package/src/track-pipeline-setup.ts +205 -0
- package/src/track-pipeline.ts +332 -0
- package/src/track-session.ts +1010 -0
- package/src/transport-pool.ts +128 -0
- package/src/wasm-mfu-reassembler.ts +405 -0
- package/src/wasm-mmtp-container-parser.ts +23 -0
- package/test-vectors/align.json +199 -0
- package/test-vectors/catalog/README.md +106 -0
- package/test-vectors/catalog/negative/archive-origin-with-path.json +33 -0
- package/test-vectors/catalog/negative/archive-unknown-field.json +34 -0
- package/test-vectors/catalog/negative/fec-block-profile-missing.json +51 -0
- package/test-vectors/catalog/negative/fec-block-profile-unknown.json +52 -0
- package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +28 -0
- package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +33 -0
- package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +31 -0
- package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +32 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +34 -0
- package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +24 -0
- package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +33 -0
- package/test-vectors/catalog/negative/legacy-selection-params.json +15 -0
- package/test-vectors/catalog/negative/media-track-repair-layer.json +16 -0
- package/test-vectors/catalog/negative/missing-mmtp-fields.json +12 -0
- package/test-vectors/catalog/negative/multicast-auth-padded-key.json +37 -0
- package/test-vectors/catalog/negative/multicast-auth-reused-track-format.json +53 -0
- package/test-vectors/catalog/negative/multicast-auth-trailing-pad-bits.json +37 -0
- package/test-vectors/catalog/negative/multicast-endpoint-missing-protocol-and-source.json +24 -0
- package/test-vectors/catalog/negative/multicast-network-source-empty.json +44 -0
- package/test-vectors/catalog/negative/multicast-packet-id-signaling.json +26 -0
- package/test-vectors/catalog/negative/network-source-object.json +25 -0
- package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +24 -0
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +27 -0
- package/test-vectors/catalog/negative/repair-track-legacy-shape.json +19 -0
- package/test-vectors/catalog/negative/track-role-empty.json +16 -0
- package/test-vectors/catalog/negative/track-role-non-string.json +16 -0
- package/test-vectors/catalog/positive/archive-origin.json +34 -0
- package/test-vectors/catalog/positive/fec-iso-ssbg1.json +52 -0
- package/test-vectors/catalog/positive/fec-layered-repair.json +106 -0
- package/test-vectors/catalog/positive/fec-multicast.json +52 -0
- package/test-vectors/catalog/positive/flat-av.json +30 -0
- package/test-vectors/catalog/positive/multicast-auth-rotation.json +55 -0
- package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +43 -0
- package/test-vectors/catalog/positive/ticks-and-mixed-timescales.json +39 -0
- package/test-vectors/catalog/positive/track-role.json +49 -0
- package/test-vectors/catalog/releases/moqcast-native-v16-v1/catalog.json +65 -0
- package/test-vectors/catalog/releases/moqcast-native-v16-v1.archive.sha256 +1 -0
- package/test-vectors/catalog-multicast-auth-v1.json +26 -0
- package/test-vectors/catalog-validation.json +732 -0
- package/test-vectors/catalog-validator-public-api.mjs +25 -0
- package/test-vectors/generate-source-auth-fixture.mjs +114 -0
- package/test-vectors/hevc-x265-repeat-headers-v1.json +40 -0
- package/test-vectors/source-auth-v1.json +61 -0
- package/test-vectors/source-contiguity-v1.json +131 -0
- package/test-vectors/subsample-placement-v1.json +230 -0
- package/dist/mmtp.d.ts +0 -73
- package/dist/mmtp.d.ts.map +0 -1
- package/dist/mmtp.js +0 -210
- package/dist/mmtp.js.map +0 -1
- package/src/mmtp.ts +0 -277
|
@@ -0,0 +1,772 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* D-28 shared repair-fetch scheduler.
|
|
3
|
+
*
|
|
4
|
+
* Player-agnostic orchestration for per-SBN on-demand MoQ FEC repair
|
|
5
|
+
* backfill. Each player (moqtail client, hang watch, Shaka MSF bridge)
|
|
6
|
+
* supplies only its protocol verb via {@link RepairFetchTransport}:
|
|
7
|
+
*
|
|
8
|
+
* - moqtail: standalone FETCH (FetchType.Standalone) for group [sbn, sbn+1)
|
|
9
|
+
* - moq-lite/hang: Subscribe with startGroup=sbn, endGroup=sbn (the relay
|
|
10
|
+
* propagates startGroup upstream to pull the past group from the origin's
|
|
11
|
+
* producer cache)
|
|
12
|
+
*
|
|
13
|
+
* Everything else — registration, fire-time repair-track resolution,
|
|
14
|
+
* keyframe-first admission, preemption, feeding symbols, and in-flight slot
|
|
15
|
+
* release — is identical across players and lives here. The Player owns the
|
|
16
|
+
* scheduler: one per `wireRepairFetch` call, and its disposer aborts
|
|
17
|
+
* everything.
|
|
18
|
+
*
|
|
19
|
+
* Priority (from the block's class, see `repairPriorityForClass`):
|
|
20
|
+
* - P0 (keyframe / unknown) and P1 (audio) dispatch as soon as they are
|
|
21
|
+
* enqueued, with no cap. Each has its own fail deadline, and a cap would
|
|
22
|
+
* turn a recoverable protected block into a stall; their number is
|
|
23
|
+
* already bounded by the blocks one fail window can hold.
|
|
24
|
+
* - P2 (delta) dispatches only while no P0/P1 is queued or in flight,
|
|
25
|
+
* earliest absolute fail deadline first. Enqueuing a P0/P1 aborts every
|
|
26
|
+
* in-flight P2 (`repair-preempted`), which returns to the queue while its
|
|
27
|
+
* block is unresolved. A P2 that never ran before its block resolved is
|
|
28
|
+
* reported as `repair-deferred`.
|
|
29
|
+
* - A block reclassified to a higher class while its P2 fetch is in flight
|
|
30
|
+
* is re-issued at once under the new class's wire priority: the running
|
|
31
|
+
* FETCH is aborted (FETCH_CANCEL) and a new one sent.
|
|
32
|
+
*
|
|
33
|
+
* Wire priority (draft-ramadan-moq-fec §11.4.5): every request carries the
|
|
34
|
+
* MoQ Transport SUBSCRIBER_PRIORITY its FETCH must use, derived from the two
|
|
35
|
+
* catalog priorities `ResolveRepairTarget` returns (see
|
|
36
|
+
* `repairFetchSubscriberPriority`): a keyframe-bearing (or unknown) block's
|
|
37
|
+
* FETCH is sent in the Source Media range at no more than the source
|
|
38
|
+
* track's priority, so it is delivered ahead of every repair track and not
|
|
39
|
+
* shed with repair data; a delta or audio FETCH is sent at no less than the
|
|
40
|
+
* fetched repair track's priority, so it is shed first.
|
|
41
|
+
*
|
|
42
|
+
* Deadline and admission (BLO-35597): a repair FETCH rides the reliable path,
|
|
43
|
+
* so its deadline is the block's PRESENTATION deadline, not the multicast
|
|
44
|
+
* reassembly deadline. The player states how long after a block's first
|
|
45
|
+
* symbol its media can still be presented (`presentationDelayMs`); from the
|
|
46
|
+
* block's receiver-local anchor that gives an absolute deadline, never earlier
|
|
47
|
+
* than the multicast wait and never later than the release gate's hold ceiling
|
|
48
|
+
* (`terminalRetentionMsForPacket`), which bounds how long any successor frame
|
|
49
|
+
* may wait behind the block. A FETCH is sent only when the measured
|
|
50
|
+
* reliable-path RTT (`reliableRttMs`) is less than the time left to that
|
|
51
|
+
* deadline -- a request that cannot come back in time is never sent, rather
|
|
52
|
+
* than sent and cancelled -- and an admitted FETCH holds the block open to
|
|
53
|
+
* that deadline, so the multicast span elapsing never aborts it.
|
|
54
|
+
*
|
|
55
|
+
* The scheduler arms no timers. A fetch ends when its transport completes or
|
|
56
|
+
* throws, when it is preempted, when any later scheduling event finds it past
|
|
57
|
+
* its presentation deadline, when its block resolves (recovered, or failed at
|
|
58
|
+
* that deadline), on track reset, or on dispose.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
import type { FecBlockProfile } from '@blockcast/mmt-base'
|
|
62
|
+
import { repairPriorityForClass, type BlockClass, type RepairPriority } from './block-policy.js'
|
|
63
|
+
import type { RepairLifecycleObserver } from './multicast-manager.js'
|
|
64
|
+
import { REPAIR_PRIORITY_MIN } from './repair-layers.js'
|
|
65
|
+
|
|
66
|
+
/** The MoQ Transport priority scale: 0..255, a lower value is delivered first. */
|
|
67
|
+
const MOQT_PRIORITY_MAX = 255
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The highest value in the Source Media priority range of
|
|
71
|
+
* draft-ramadan-moq-fec §10 (64..191): one below the repair range, which
|
|
72
|
+
* starts at `REPAIR_PRIORITY_MIN` (192).
|
|
73
|
+
*/
|
|
74
|
+
export const SOURCE_MEDIA_PRIORITY_MAX = REPAIR_PRIORITY_MIN - 1
|
|
75
|
+
|
|
76
|
+
/** What `ResolveRepairTarget` returns for one repair-bearing stream. */
|
|
77
|
+
export interface RepairTarget {
|
|
78
|
+
/** The repair track to FETCH (base layer 0 of the block's source). */
|
|
79
|
+
readonly repairTrack: string
|
|
80
|
+
/**
|
|
81
|
+
* The catalog `priority` of the SOURCE track the block belongs to, on the
|
|
82
|
+
* MoQ Transport scale (0..255, lower first), or null when the catalog
|
|
83
|
+
* carries none. Never a player constant: a keyframe repair must not be
|
|
84
|
+
* delivered behind the source it repairs, and only the catalog says what
|
|
85
|
+
* that source's priority is.
|
|
86
|
+
*/
|
|
87
|
+
readonly sourcePriority: number | null
|
|
88
|
+
/**
|
|
89
|
+
* The catalog priority of `repairTrack` (MoQ Transport scale). Layer 0
|
|
90
|
+
* that declares none has the value draft-ramadan-moq-fec §10 defines
|
|
91
|
+
* (240); `resolveRepairLayers` / `catalogRepairTarget` already apply it.
|
|
92
|
+
* Null only when the resolver cannot read the repair track's entry.
|
|
93
|
+
*/
|
|
94
|
+
readonly repairPriority: number | null
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Resolve a packetId to its repair track and priorities at FIRE TIME.
|
|
98
|
+
*
|
|
99
|
+
* Called on every repair request, never cached by the shell: ABR ladder
|
|
100
|
+
* rungs can share a packetId (e.g. video/720p and video/360p both p:1), so
|
|
101
|
+
* the mapping must reflect the track active when the request fires, not
|
|
102
|
+
* when the shell was wired. Return null when the packetId has no
|
|
103
|
+
* repair-bearing track — the request is released without a fetch.
|
|
104
|
+
* `catalogRepairTarget` builds the answer from a catalog. */
|
|
105
|
+
export type ResolveRepairTarget = (
|
|
106
|
+
packetId: number,
|
|
107
|
+
catalogTrackName?: string,
|
|
108
|
+
) => RepairTarget | null
|
|
109
|
+
|
|
110
|
+
/** One on-demand repair FETCH, as the scheduler hands it to the transport. */
|
|
111
|
+
export interface RepairFetchRequest {
|
|
112
|
+
/** Repair track whose block `sbn` is fetched. */
|
|
113
|
+
readonly repairTrack: string
|
|
114
|
+
/**
|
|
115
|
+
* The block's key, by `blockProfile` (BLO-35597 D2a):
|
|
116
|
+
* - `k-padded-v1`: the source block number, which IS the repair-track MoQ
|
|
117
|
+
* group id (fetch `[sbn, sbn]`).
|
|
118
|
+
* - `iso-ssbg1-v1`: the block's 32-bit SS_Start. The MoQ group id is the
|
|
119
|
+
* 62-bit `extSsStart(wrapEpoch, sbn)`; a receiver that knows only a lost
|
|
120
|
+
* SS_ID fetches `repairFetchRange(lostSsId, kMax, anchor)`, where `anchor`
|
|
121
|
+
* is `{ previousBlockStart }` (the extended start of the last block
|
|
122
|
+
* delimited before it) or `{ reference }` (an epoch reference). Never use
|
|
123
|
+
* it as a group id directly.
|
|
124
|
+
*/
|
|
125
|
+
readonly sbn: number
|
|
126
|
+
/** The block profile `sbn` is keyed by (the catalog `fec.blockProfile`). */
|
|
127
|
+
readonly blockProfile: FecBlockProfile
|
|
128
|
+
/** The source packetId the block belongs to. */
|
|
129
|
+
readonly packetId: number
|
|
130
|
+
/**
|
|
131
|
+
* Aborts when the scheduler no longer wants the group: preemption by
|
|
132
|
+
* keyframe work, reprioritisation, block resolution, track reset, dispose.
|
|
133
|
+
*/
|
|
134
|
+
readonly signal: AbortSignal
|
|
135
|
+
/**
|
|
136
|
+
* The SUBSCRIBER_PRIORITY parameter the FETCH MUST carry, on the MoQ
|
|
137
|
+
* Transport scale (0..255, lower delivered first), as
|
|
138
|
+
* draft-ramadan-moq-fec §11.4.5 requires. `undefined` means OMIT the
|
|
139
|
+
* parameter: the catalog carries no priority to derive it from, and the
|
|
140
|
+
* publisher then uses the value draft-ietf-moq-transport-16 §9.2.2.3
|
|
141
|
+
* defines for an omitted parameter (128, inside the Source Media range).
|
|
142
|
+
* A transport never substitutes a value of its own. A transport whose API
|
|
143
|
+
* uses another scale (moq-lite's higher-wins weight, say) maps this one
|
|
144
|
+
* without reordering it against the source and repair subscriptions.
|
|
145
|
+
*/
|
|
146
|
+
readonly subscriberPriority: number | undefined
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/** Protocol-specific fetch of one FEC block's repair group.
|
|
150
|
+
*
|
|
151
|
+
* Yield each repair object payload (MMTP packet bytes, ISO 23008-1 §C.5.3
|
|
152
|
+
* Repair FEC Payload ID framing). Return when the group ends.
|
|
153
|
+
*
|
|
154
|
+
* Put `request.subscriberPriority` on the FETCH (see RepairFetchRequest).
|
|
155
|
+
*
|
|
156
|
+
* When `request.signal` aborts, the transport MUST cancel the FETCH ON THE
|
|
157
|
+
* WIRE, not merely stop reading: send FETCH_CANCEL for its Request ID
|
|
158
|
+
* (draft-ietf-moq-transport-16 §9.18; STOP_SENDING on an open data stream
|
|
159
|
+
* as well, §5.2), and do it from the abort handler itself, before it
|
|
160
|
+
* returns. A relay that is never told keeps sending the group, so a
|
|
161
|
+
* preempted delta repair keeps competing with the keyframe repair that
|
|
162
|
+
* preempted it. The scheduler may issue the next request for the same block
|
|
163
|
+
* (reprioritisation) as soon as it aborts one, and §11.4.5 allows at most
|
|
164
|
+
* one repair FETCH outstanding per block and repair layer, so the cancel
|
|
165
|
+
* must already be queued ahead of that request. A FETCH whose Request ID
|
|
166
|
+
* is not known yet is cancelled as soon as FETCH_OK assigns it. */
|
|
167
|
+
export type RepairFetchTransport = (request: RepairFetchRequest) => AsyncIterable<Uint8Array>
|
|
168
|
+
|
|
169
|
+
/** Why a request could not carry a catalog-derived priority. */
|
|
170
|
+
export type RepairPriorityReason =
|
|
171
|
+
| 'source-priority-absent'
|
|
172
|
+
| 'source-priority-invalid'
|
|
173
|
+
| 'repair-priority-absent'
|
|
174
|
+
| 'repair-priority-invalid'
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* The wire priority of one repair request (draft-ramadan-moq-fec §11.4.5).
|
|
178
|
+
*
|
|
179
|
+
* - `carry`: send the FETCH with `subscriberPriority`.
|
|
180
|
+
* - `omit`: send it without SUBSCRIBER_PRIORITY. Only a keyframe-bearing or
|
|
181
|
+
* unknown block's request is ever sent this way: the publisher then uses
|
|
182
|
+
* 128 (draft-ietf-moq-transport-16 §9.2.2.3), which lies in the Source
|
|
183
|
+
* Media range, and without a catalog source priority there is no bound
|
|
184
|
+
* below it to honour.
|
|
185
|
+
* - `decline`: send no FETCH. A delta or audio FETCH MUST carry a priority
|
|
186
|
+
* at least its repair track's, so at least 192, and the omitted value (128)
|
|
187
|
+
* would put best-effort repair ahead of every repair track. Unicast repair
|
|
188
|
+
* is optional for those classes (§11.4.3, §11.4.4); in-band FEC and
|
|
189
|
+
* concealment still apply.
|
|
190
|
+
*/
|
|
191
|
+
export type RepairFetchPriority =
|
|
192
|
+
| { readonly kind: 'carry'; readonly subscriberPriority: number }
|
|
193
|
+
| { readonly kind: 'omit'; readonly reason: RepairPriorityReason }
|
|
194
|
+
| { readonly kind: 'decline'; readonly reason: RepairPriorityReason }
|
|
195
|
+
|
|
196
|
+
function isMoqtPriority(value: number): boolean {
|
|
197
|
+
return Number.isSafeInteger(value) && value >= 0 && value <= MOQT_PRIORITY_MAX
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Derive the SUBSCRIBER_PRIORITY of a repair FETCH from the block's class and
|
|
202
|
+
* the catalog priorities of its source and repair tracks
|
|
203
|
+
* (draft-ramadan-moq-fec §11.4.5 and the §10 ranges):
|
|
204
|
+
*
|
|
205
|
+
* - keyframe / unknown: in the Source Media range and no greater than the
|
|
206
|
+
* source track's priority, i.e. min(source, 191); omitted when the catalog
|
|
207
|
+
* carries no source priority.
|
|
208
|
+
* - delta / audio: no lower than the fetched repair track's priority and at
|
|
209
|
+
* least 192, i.e. max(repair, 192); declined when it carries none.
|
|
210
|
+
*/
|
|
211
|
+
export function repairFetchSubscriberPriority(
|
|
212
|
+
blockClass: BlockClass,
|
|
213
|
+
target: Pick<RepairTarget, 'sourcePriority' | 'repairPriority'>,
|
|
214
|
+
): RepairFetchPriority {
|
|
215
|
+
if (repairPriorityForClass(blockClass) === 0) {
|
|
216
|
+
const source = target.sourcePriority
|
|
217
|
+
if (source === null) return { kind: 'omit', reason: 'source-priority-absent' }
|
|
218
|
+
if (!isMoqtPriority(source)) return { kind: 'omit', reason: 'source-priority-invalid' }
|
|
219
|
+
return { kind: 'carry', subscriberPriority: Math.min(source, SOURCE_MEDIA_PRIORITY_MAX) }
|
|
220
|
+
}
|
|
221
|
+
const repair = target.repairPriority
|
|
222
|
+
if (repair === null) return { kind: 'decline', reason: 'repair-priority-absent' }
|
|
223
|
+
if (!isMoqtPriority(repair)) return { kind: 'decline', reason: 'repair-priority-invalid' }
|
|
224
|
+
return { kind: 'carry', subscriberPriority: Math.max(repair, REPAIR_PRIORITY_MIN) }
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface WireRepairFetchOptions {
|
|
228
|
+
resolveTarget: ResolveRepairTarget
|
|
229
|
+
transport: RepairFetchTransport
|
|
230
|
+
/**
|
|
231
|
+
* Maximum transport attempts per block (required). A retry happens only
|
|
232
|
+
* when the transport rejects with an error `shouldRetry` classifies as
|
|
233
|
+
* retryable, before any symbol was fed, while the block's deadline remains.
|
|
234
|
+
*/
|
|
235
|
+
attemptLimit: number
|
|
236
|
+
/** Classify a transport error as a transient publisher/relay retention race. */
|
|
237
|
+
shouldRetry?: (error: unknown) => boolean
|
|
238
|
+
/**
|
|
239
|
+
* The measured round-trip time of the reliable path the transport fetches
|
|
240
|
+
* over, in ms (required). Read at every admission, so it tracks the live
|
|
241
|
+
* session. A value that is not finite and positive, or a throw, means the
|
|
242
|
+
* path offers no measurement: nothing can show the FETCH would come back in
|
|
243
|
+
* time, so none is sent (`rtt-unmeasured`). Never a default.
|
|
244
|
+
*/
|
|
245
|
+
reliableRttMs: () => number
|
|
246
|
+
/**
|
|
247
|
+
* How long after a block's first symbol arrived its media can still be
|
|
248
|
+
* presented, in ms (required): the player's own playout budget for the
|
|
249
|
+
* stream. Same fail-closed rule as `reliableRttMs`
|
|
250
|
+
* (`presentation-delay-unavailable`).
|
|
251
|
+
*/
|
|
252
|
+
presentationDelayMs: (packetId: number, catalogTrackName?: string) => number
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/** Why the D-28 layer asked for a repair: the block's class at its deadline. */
|
|
256
|
+
export type RepairSubscribeCallback = (
|
|
257
|
+
sbn: number,
|
|
258
|
+
packetId: number,
|
|
259
|
+
catalogTrackName: string | undefined,
|
|
260
|
+
blockClass: BlockClass,
|
|
261
|
+
) => void
|
|
262
|
+
|
|
263
|
+
/** Why the scheduler sent no FETCH for a block it was asked to repair. */
|
|
264
|
+
export type RepairSkipReason =
|
|
265
|
+
/** The reliable path offered no RTT measurement; arrival cannot be shown. */
|
|
266
|
+
| 'rtt-unmeasured'
|
|
267
|
+
/** The measured RTT is not less than the time left to the deadline. */
|
|
268
|
+
| 'rtt-exceeds-budget'
|
|
269
|
+
/** The player gave no usable presentation delay for the block's stream. */
|
|
270
|
+
| 'presentation-delay-unavailable'
|
|
271
|
+
|
|
272
|
+
/** The subset of MulticastManager the scheduler drives. */
|
|
273
|
+
export interface RepairFetchHost {
|
|
274
|
+
readonly fecManager: {
|
|
275
|
+
blockProfileForPacket(packetId: number): FecBlockProfile | undefined
|
|
276
|
+
repairFetchTimeoutMsForBlock(sbn: number, packetId: number, catalogTrackName?: string): number
|
|
277
|
+
/** Receiver-local time of the block's first accepted symbol, if any. */
|
|
278
|
+
blockAnchorAtMs(sbn: number, packetId: number, catalogTrackName?: string): number | undefined
|
|
279
|
+
/** How long a terminal block stays authoritative: the release-gate hold ceiling. */
|
|
280
|
+
terminalRetentionMsForPacket(packetId: number): number
|
|
281
|
+
/** Keep the block open to `untilAtMs` for an admitted FETCH. */
|
|
282
|
+
holdBlockForRepair(
|
|
283
|
+
sbn: number,
|
|
284
|
+
packetId: number,
|
|
285
|
+
catalogTrackName: string | undefined,
|
|
286
|
+
untilAtMs: number,
|
|
287
|
+
): boolean
|
|
288
|
+
/** The admitted FETCH ended without delivering: back to the multicast wait. */
|
|
289
|
+
releaseRepairHold(sbn: number, packetId: number, catalogTrackName?: string): void
|
|
290
|
+
}
|
|
291
|
+
onRepairSubscribe(cb: RepairSubscribeCallback): void
|
|
292
|
+
addRepairLifecycleObserver(observer: RepairLifecycleObserver): () => void
|
|
293
|
+
addTrackResetObserver(observer: (packetId: number, catalogTrackName: string) => void): () => void
|
|
294
|
+
clearRepairForBlock(sbn: number, packetId: number, catalogTrackName?: string): void
|
|
295
|
+
processRepairFromMoQ(packet: Uint8Array, ownerPacketId?: number, catalogTrackName?: string): void
|
|
296
|
+
noteRepairScheduling(
|
|
297
|
+
type: 'repair-preempted' | 'repair-deferred',
|
|
298
|
+
sbn: number,
|
|
299
|
+
packetId: number,
|
|
300
|
+
catalogTrackName?: string,
|
|
301
|
+
): void
|
|
302
|
+
/** A request whose wire priority the catalog could not supply. */
|
|
303
|
+
noteRepairPriority(
|
|
304
|
+
action: 'omitted' | 'declined',
|
|
305
|
+
reason: RepairPriorityReason,
|
|
306
|
+
blockClass: BlockClass,
|
|
307
|
+
sbn: number,
|
|
308
|
+
packetId: number,
|
|
309
|
+
catalogTrackName?: string,
|
|
310
|
+
): void
|
|
311
|
+
/** A request the scheduler did not send (see RepairSkipReason). */
|
|
312
|
+
noteRepairSkipped(
|
|
313
|
+
reason: RepairSkipReason,
|
|
314
|
+
measurement: { readonly rttMs: number | null; readonly budgetMs: number },
|
|
315
|
+
sbn: number,
|
|
316
|
+
packetId: number,
|
|
317
|
+
catalogTrackName?: string,
|
|
318
|
+
): void
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
type StopReason = 'preempted' | 'reprioritized' | 'expired' | 'resolved' | 'reset' | 'disposed'
|
|
322
|
+
|
|
323
|
+
interface FetchRun {
|
|
324
|
+
readonly controller: AbortController
|
|
325
|
+
stopped: StopReason | null
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
interface RepairEntry {
|
|
329
|
+
readonly key: string
|
|
330
|
+
readonly sbn: number
|
|
331
|
+
readonly packetId: number
|
|
332
|
+
readonly catalogTrackName?: string
|
|
333
|
+
readonly repairTrack: string
|
|
334
|
+
readonly target: RepairTarget
|
|
335
|
+
/** The block profile `sbn` is keyed by, resolved before the entry is queued. */
|
|
336
|
+
readonly blockProfile: FecBlockProfile
|
|
337
|
+
priority: RepairPriority
|
|
338
|
+
/** SUBSCRIBER_PRIORITY for this entry's class; undefined = omit it. */
|
|
339
|
+
subscriberPriority: number | undefined
|
|
340
|
+
/**
|
|
341
|
+
* Absolute `performance.now()` millisecond by which a FETCH must land: the
|
|
342
|
+
* block's presentation deadline (see the module note).
|
|
343
|
+
*/
|
|
344
|
+
readonly deadlineAt: number
|
|
345
|
+
/** Monotonic enqueue order, the EDF tie-break. */
|
|
346
|
+
readonly order: number
|
|
347
|
+
attempts: number
|
|
348
|
+
running: FetchRun | null
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Wire the D-28 repair-fetch scheduler onto a MulticastManager.
|
|
353
|
+
*
|
|
354
|
+
* Call AFTER the manager has a repair-bearing FEC configuration (players gate
|
|
355
|
+
* this on the first fec-setup that carries a repairTrack) — registration arms
|
|
356
|
+
* the per-block repair deadlines in the FEC layer.
|
|
357
|
+
*
|
|
358
|
+
* Returns a dispose function that aborts outstanding fetches and stops new
|
|
359
|
+
* ones from being issued.
|
|
360
|
+
*/
|
|
361
|
+
export function wireRepairFetch(mc: RepairFetchHost, opts: WireRepairFetchOptions): () => void {
|
|
362
|
+
if (!Number.isSafeInteger(opts.attemptLimit) || opts.attemptLimit < 1) {
|
|
363
|
+
throw new Error(
|
|
364
|
+
`[RepairFetch] attemptLimit=${String(opts.attemptLimit)} must be a positive integer`,
|
|
365
|
+
)
|
|
366
|
+
}
|
|
367
|
+
if (typeof opts.reliableRttMs !== 'function') {
|
|
368
|
+
throw new Error('[RepairFetch] reliableRttMs is required: repair admission needs the measured reliable-path RTT')
|
|
369
|
+
}
|
|
370
|
+
if (typeof opts.presentationDelayMs !== 'function') {
|
|
371
|
+
throw new Error('[RepairFetch] presentationDelayMs is required: a repair FETCH is due by the block\'s presentation deadline')
|
|
372
|
+
}
|
|
373
|
+
const entries = new Map<string, RepairEntry>()
|
|
374
|
+
const warnedNoTarget = new Set<string>()
|
|
375
|
+
let disposed = false
|
|
376
|
+
let enqueueOrder = 0
|
|
377
|
+
|
|
378
|
+
const requestKey = (sbn: number, packetId: number, catalogTrackName?: string): string =>
|
|
379
|
+
JSON.stringify([packetId, catalogTrackName ?? null, sbn])
|
|
380
|
+
const noTargetKey = (packetId: number, catalogTrackName?: string): string =>
|
|
381
|
+
JSON.stringify([packetId, catalogTrackName ?? null])
|
|
382
|
+
|
|
383
|
+
const clearRepair = (sbn: number, packetId: number, catalogTrackName?: string): void => {
|
|
384
|
+
if (catalogTrackName === undefined) mc.clearRepairForBlock(sbn, packetId)
|
|
385
|
+
else mc.clearRepairForBlock(sbn, packetId, catalogTrackName)
|
|
386
|
+
}
|
|
387
|
+
const note = (type: 'repair-preempted' | 'repair-deferred', entry: RepairEntry): void => {
|
|
388
|
+
mc.noteRepairScheduling(type, entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
const releaseHold = (entry: RepairEntry): void => {
|
|
392
|
+
if (entry.catalogTrackName === undefined) mc.fecManager.releaseRepairHold(entry.sbn, entry.packetId)
|
|
393
|
+
else mc.fecManager.releaseRepairHold(entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const stop = (entry: RepairEntry, reason: StopReason): void => {
|
|
397
|
+
const run = entry.running
|
|
398
|
+
if (!run) return
|
|
399
|
+
entry.running = null
|
|
400
|
+
run.stopped = reason
|
|
401
|
+
run.controller.abort()
|
|
402
|
+
// A preempted delta returns to the queue; until it runs again nothing is
|
|
403
|
+
// in flight that could land, so the block goes back to its multicast wait.
|
|
404
|
+
if (reason === 'preempted') releaseHold(entry)
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
const readRtt = (): number | null => {
|
|
408
|
+
try {
|
|
409
|
+
const rtt = opts.reliableRttMs()
|
|
410
|
+
return Number.isFinite(rtt) && rtt > 0 ? rtt : null
|
|
411
|
+
} catch {
|
|
412
|
+
return null
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* RTT admission: send only a FETCH the measured round trip says can land
|
|
418
|
+
* before the entry's deadline. A refused entry is released, not queued: the
|
|
419
|
+
* deadline only gets closer.
|
|
420
|
+
*/
|
|
421
|
+
const admit = (entry: RepairEntry, now: number): boolean => {
|
|
422
|
+
const budgetMs = entry.deadlineAt - now
|
|
423
|
+
const rttMs = readRtt()
|
|
424
|
+
if (rttMs !== null && rttMs < budgetMs) return true
|
|
425
|
+
retire(entry)
|
|
426
|
+
releaseHold(entry)
|
|
427
|
+
clearRepair(entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
428
|
+
mc.noteRepairSkipped(
|
|
429
|
+
rttMs === null ? 'rtt-unmeasured' : 'rtt-exceeds-budget',
|
|
430
|
+
{ rttMs, budgetMs },
|
|
431
|
+
entry.sbn,
|
|
432
|
+
entry.packetId,
|
|
433
|
+
entry.catalogTrackName,
|
|
434
|
+
)
|
|
435
|
+
return false
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
const retire = (entry: RepairEntry): void => {
|
|
439
|
+
if (entries.get(entry.key) === entry) entries.delete(entry.key)
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
const urgentOutstanding = (): boolean => {
|
|
443
|
+
for (const entry of entries.values()) {
|
|
444
|
+
if (entry.priority < 2) return true
|
|
445
|
+
}
|
|
446
|
+
return false
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
const preemptDeltas = (): void => {
|
|
450
|
+
for (const entry of entries.values()) {
|
|
451
|
+
if (entry.priority !== 2 || !entry.running) continue
|
|
452
|
+
stop(entry, 'preempted')
|
|
453
|
+
note('repair-preempted', entry)
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* The wire priority for `blockClass`, or null when no FETCH may be sent.
|
|
459
|
+
* A priority the catalog cannot supply is reported once per request.
|
|
460
|
+
*/
|
|
461
|
+
const wirePriority = (
|
|
462
|
+
entry: Pick<RepairEntry, 'target' | 'sbn' | 'packetId' | 'catalogTrackName'>,
|
|
463
|
+
blockClass: BlockClass,
|
|
464
|
+
): { subscriberPriority: number | undefined } | null => {
|
|
465
|
+
const derived = repairFetchSubscriberPriority(blockClass, entry.target)
|
|
466
|
+
if (derived.kind === 'carry') return { subscriberPriority: derived.subscriberPriority }
|
|
467
|
+
mc.noteRepairPriority(
|
|
468
|
+
derived.kind === 'omit' ? 'omitted' : 'declined',
|
|
469
|
+
derived.reason,
|
|
470
|
+
blockClass,
|
|
471
|
+
entry.sbn,
|
|
472
|
+
entry.packetId,
|
|
473
|
+
entry.catalogTrackName,
|
|
474
|
+
)
|
|
475
|
+
return derived.kind === 'omit' ? { subscriberPriority: undefined } : null
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
/** `counted` is false for a reprioritisation restart, which is no retry. */
|
|
479
|
+
const start = (entry: RepairEntry, counted = true): void => {
|
|
480
|
+
if (!admit(entry, performance.now())) return
|
|
481
|
+
if (counted) entry.attempts++
|
|
482
|
+
const run: FetchRun = { controller: new AbortController(), stopped: null }
|
|
483
|
+
entry.running = run
|
|
484
|
+
// Hold the block open to the presentation deadline while this FETCH can
|
|
485
|
+
// still land: the multicast span elapsing must not abort it.
|
|
486
|
+
mc.fecManager.holdBlockForRepair(
|
|
487
|
+
entry.sbn,
|
|
488
|
+
entry.packetId,
|
|
489
|
+
entry.catalogTrackName,
|
|
490
|
+
entry.deadlineAt,
|
|
491
|
+
)
|
|
492
|
+
void execute(entry, run)
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
const dispatch = (): void => {
|
|
496
|
+
if (disposed) return
|
|
497
|
+
const now = performance.now()
|
|
498
|
+
const queued: RepairEntry[] = []
|
|
499
|
+
for (const entry of [...entries.values()]) {
|
|
500
|
+
if (entry.running) {
|
|
501
|
+
// A fetch still running at its block's fail bound can no longer land
|
|
502
|
+
// in time. Cancel it here rather than trust the transport or the FEC
|
|
503
|
+
// layer's resolution to end it: a hung P0/P1 left running would keep
|
|
504
|
+
// urgentOutstanding() true and gate every P2 for the session.
|
|
505
|
+
if (entry.deadlineAt <= now) {
|
|
506
|
+
stop(entry, 'expired')
|
|
507
|
+
retire(entry)
|
|
508
|
+
clearRepair(entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
509
|
+
}
|
|
510
|
+
continue
|
|
511
|
+
}
|
|
512
|
+
if (entry.deadlineAt <= now) {
|
|
513
|
+
// The block's fail bound has passed; its resolution is imminent and
|
|
514
|
+
// no fetch can land in time.
|
|
515
|
+
retire(entry)
|
|
516
|
+
if (entry.priority === 2 && entry.attempts === 0) note('repair-deferred', entry)
|
|
517
|
+
clearRepair(entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
518
|
+
continue
|
|
519
|
+
}
|
|
520
|
+
queued.push(entry)
|
|
521
|
+
}
|
|
522
|
+
for (const entry of queued) {
|
|
523
|
+
if (entry.priority < 2) start(entry)
|
|
524
|
+
}
|
|
525
|
+
if (urgentOutstanding()) return
|
|
526
|
+
queued
|
|
527
|
+
.filter((entry) => entry.priority === 2)
|
|
528
|
+
.sort((a, b) => a.deadlineAt - b.deadlineAt || a.order - b.order)
|
|
529
|
+
.forEach((entry) => start(entry))
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
const finish = (entry: RepairEntry, run: FetchRun, fed: number, error: unknown): void => {
|
|
533
|
+
if (run.stopped !== null || entry.running !== run || entries.get(entry.key) !== entry) {
|
|
534
|
+
return
|
|
535
|
+
}
|
|
536
|
+
entry.running = null
|
|
537
|
+
if (error === undefined) {
|
|
538
|
+
retire(entry)
|
|
539
|
+
// A fetch that ended without feeding anything cannot resolve the block;
|
|
540
|
+
// release the slot and the hold so failure accounting is not wedged. A
|
|
541
|
+
// fetch that fed symbols leaves resolution to the FEC layer.
|
|
542
|
+
if (fed === 0) {
|
|
543
|
+
releaseHold(entry)
|
|
544
|
+
clearRepair(entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
545
|
+
}
|
|
546
|
+
dispatch()
|
|
547
|
+
return
|
|
548
|
+
}
|
|
549
|
+
const retryable =
|
|
550
|
+
fed === 0 &&
|
|
551
|
+
entry.attempts < opts.attemptLimit &&
|
|
552
|
+
entry.deadlineAt > performance.now() &&
|
|
553
|
+
opts.shouldRetry?.(error) === true
|
|
554
|
+
if (retryable) {
|
|
555
|
+
// Back through the same admission rule: a P2 retry waits for P0/P1.
|
|
556
|
+
dispatch()
|
|
557
|
+
return
|
|
558
|
+
}
|
|
559
|
+
retire(entry)
|
|
560
|
+
if (fed === 0) releaseHold(entry)
|
|
561
|
+
clearRepair(entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
562
|
+
console.warn(
|
|
563
|
+
`[RepairFetch] fetch failed pid=${entry.packetId} sbn=${entry.sbn} track=${entry.repairTrack}:`,
|
|
564
|
+
error,
|
|
565
|
+
)
|
|
566
|
+
dispatch()
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
// The profile the block key is in; a stream reaching repair was configured
|
|
570
|
+
// from its catalog, so an absent profile is a wiring fault, not a default.
|
|
571
|
+
// Resolved when the request arrives (onRepairSubscribe below), never inside
|
|
572
|
+
// execute: there its throw would read as an ordinary fetch failure, warned
|
|
573
|
+
// once per block while the stream silently lost unicast repair.
|
|
574
|
+
const blockProfileOf = (packetId: number): FecBlockProfile => {
|
|
575
|
+
const profile = mc.fecManager.blockProfileForPacket(packetId)
|
|
576
|
+
if (profile === undefined) {
|
|
577
|
+
throw new Error(`[RepairFetch] packetId=${packetId} has no configured fec.blockProfile`)
|
|
578
|
+
}
|
|
579
|
+
return profile
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
const execute = async (entry: RepairEntry, run: FetchRun): Promise<void> => {
|
|
583
|
+
let fed = 0
|
|
584
|
+
try {
|
|
585
|
+
for await (const packet of opts.transport({
|
|
586
|
+
repairTrack: entry.repairTrack,
|
|
587
|
+
sbn: entry.sbn,
|
|
588
|
+
blockProfile: entry.blockProfile,
|
|
589
|
+
packetId: entry.packetId,
|
|
590
|
+
signal: run.controller.signal,
|
|
591
|
+
subscriberPriority: entry.subscriberPriority,
|
|
592
|
+
})) {
|
|
593
|
+
if (run.stopped !== null || entry.running !== run) break
|
|
594
|
+
fed++
|
|
595
|
+
if (entry.catalogTrackName === undefined) {
|
|
596
|
+
mc.processRepairFromMoQ(packet, entry.packetId)
|
|
597
|
+
} else {
|
|
598
|
+
mc.processRepairFromMoQ(packet, entry.packetId, entry.catalogTrackName)
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
finish(entry, run, fed, undefined)
|
|
602
|
+
} catch (error) {
|
|
603
|
+
finish(entry, run, fed, error ?? new Error('repair transport rejected'))
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
const removeResetObserver = mc.addTrackResetObserver((packetId, catalogTrackName) => {
|
|
608
|
+
for (const entry of [...entries.values()]) {
|
|
609
|
+
if (entry.packetId !== packetId || entry.catalogTrackName !== catalogTrackName) continue
|
|
610
|
+
retire(entry)
|
|
611
|
+
stop(entry, 'reset')
|
|
612
|
+
}
|
|
613
|
+
// A reset is when the packetId -> repair-track mapping can change, so
|
|
614
|
+
// re-arm the once-per-track warn for the new epoch.
|
|
615
|
+
warnedNoTarget.delete(noTargetKey(packetId, catalogTrackName))
|
|
616
|
+
dispatch()
|
|
617
|
+
})
|
|
618
|
+
|
|
619
|
+
const removeLifecycleObserver = mc.addRepairLifecycleObserver((event) => {
|
|
620
|
+
if (disposed) return
|
|
621
|
+
if (event.type === 'reclassified') {
|
|
622
|
+
const entry = entries.get(
|
|
623
|
+
requestKey(event.block.sbn, event.block.packetId, event.block.catalogTrackName ?? undefined),
|
|
624
|
+
)
|
|
625
|
+
if (!entry || entry.priority !== 2) return
|
|
626
|
+
const promoted = repairPriorityForClass(event.to)
|
|
627
|
+
if (promoted >= entry.priority) return
|
|
628
|
+
const wire = wirePriority(entry, event.to)
|
|
629
|
+
// A block leaves P2 only for P0, whose request is never declined.
|
|
630
|
+
if (wire === null) return
|
|
631
|
+
entry.priority = promoted
|
|
632
|
+
entry.subscriberPriority = wire.subscriberPriority
|
|
633
|
+
if (entry.running) {
|
|
634
|
+
// The running FETCH carries the delta priority. Cancel it and send
|
|
635
|
+
// the block's repair again under its new class (§11.4.5): a keyframe
|
|
636
|
+
// repair must not stay queued behind source media.
|
|
637
|
+
stop(entry, 'reprioritized')
|
|
638
|
+
start(entry, false)
|
|
639
|
+
}
|
|
640
|
+
preemptDeltas()
|
|
641
|
+
dispatch()
|
|
642
|
+
return
|
|
643
|
+
}
|
|
644
|
+
if (event.type !== 'recovered' && event.type !== 'failed') return
|
|
645
|
+
const entry = entries.get(
|
|
646
|
+
requestKey(event.block.sbn, event.block.packetId, event.block.catalogTrackName ?? undefined),
|
|
647
|
+
)
|
|
648
|
+
if (!entry) return
|
|
649
|
+
retire(entry)
|
|
650
|
+
if (entry.running) stop(entry, 'resolved')
|
|
651
|
+
else if (entry.priority === 2 && entry.attempts === 0) note('repair-deferred', entry)
|
|
652
|
+
dispatch()
|
|
653
|
+
})
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* The block's presentation deadline, or null when the player gives none.
|
|
657
|
+
*
|
|
658
|
+
* anchor + presentationDelay, clamped below by the multicast wait (the block
|
|
659
|
+
* is open that long whatever happens, so a FETCH landing inside it still
|
|
660
|
+
* counts) and above by anchor + the release gate's hold ceiling (a successor
|
|
661
|
+
* frame may not wait behind a block longer than that). A block no symbol
|
|
662
|
+
* reached has no anchor; its deadline is the multicast wait.
|
|
663
|
+
*/
|
|
664
|
+
const presentationDeadlineAt = (
|
|
665
|
+
sbn: number,
|
|
666
|
+
packetId: number,
|
|
667
|
+
catalogTrackName: string | undefined,
|
|
668
|
+
now: number,
|
|
669
|
+
): number | null => {
|
|
670
|
+
const waitDeadlineAt =
|
|
671
|
+
now + mc.fecManager.repairFetchTimeoutMsForBlock(sbn, packetId, catalogTrackName)
|
|
672
|
+
const anchor = mc.fecManager.blockAnchorAtMs(sbn, packetId, catalogTrackName)
|
|
673
|
+
if (anchor === undefined) return waitDeadlineAt
|
|
674
|
+
let delayMs: number
|
|
675
|
+
try {
|
|
676
|
+
delayMs = opts.presentationDelayMs(packetId, catalogTrackName)
|
|
677
|
+
} catch {
|
|
678
|
+
return null
|
|
679
|
+
}
|
|
680
|
+
if (!(Number.isFinite(delayMs) && delayMs > 0)) return null
|
|
681
|
+
const ceilingAt = anchor + mc.fecManager.terminalRetentionMsForPacket(packetId)
|
|
682
|
+
return Math.max(waitDeadlineAt, Math.min(anchor + delayMs, ceilingAt))
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
mc.onRepairSubscribe((sbn, packetId, catalogTrackName, blockClass) => {
|
|
686
|
+
if (disposed) {
|
|
687
|
+
clearRepair(sbn, packetId, catalogTrackName)
|
|
688
|
+
return
|
|
689
|
+
}
|
|
690
|
+
// Throws on a wiring fault, here and synchronously, before anything is
|
|
691
|
+
// queued (see blockProfileOf).
|
|
692
|
+
const blockProfile = blockProfileOf(packetId)
|
|
693
|
+
|
|
694
|
+
// Fire-time resolution — see ResolveRepairTarget.
|
|
695
|
+
const target = opts.resolveTarget(packetId, catalogTrackName)
|
|
696
|
+
if (!target) {
|
|
697
|
+
// A starved block with no repair target can only resolve via the fail
|
|
698
|
+
// bound. Say so, once per track: a null target is also the documented
|
|
699
|
+
// answer for a rung that carries no repair, and the typed lifecycle
|
|
700
|
+
// events already enumerate every block.
|
|
701
|
+
const warnKey = noTargetKey(packetId, catalogTrackName)
|
|
702
|
+
if (!warnedNoTarget.has(warnKey)) {
|
|
703
|
+
warnedNoTarget.add(warnKey)
|
|
704
|
+
console.warn(
|
|
705
|
+
`[RepairFetch] no repair target for pid=${packetId} sbn=${sbn}` +
|
|
706
|
+
`${catalogTrackName === undefined ? '' : ` track=${catalogTrackName}`}; releasing without a fetch`,
|
|
707
|
+
)
|
|
708
|
+
}
|
|
709
|
+
clearRepair(sbn, packetId, catalogTrackName)
|
|
710
|
+
return
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
const key = requestKey(sbn, packetId, catalogTrackName)
|
|
714
|
+
const previous = entries.get(key)
|
|
715
|
+
if (previous) {
|
|
716
|
+
retire(previous)
|
|
717
|
+
stop(previous, 'reset')
|
|
718
|
+
}
|
|
719
|
+
const identity = {
|
|
720
|
+
target,
|
|
721
|
+
sbn,
|
|
722
|
+
packetId,
|
|
723
|
+
...(catalogTrackName === undefined ? {} : { catalogTrackName }),
|
|
724
|
+
}
|
|
725
|
+
const wire = wirePriority(identity, blockClass)
|
|
726
|
+
if (wire === null) {
|
|
727
|
+
// No conformant FETCH exists for this block (see RepairFetchPriority).
|
|
728
|
+
clearRepair(sbn, packetId, catalogTrackName)
|
|
729
|
+
return
|
|
730
|
+
}
|
|
731
|
+
const now = performance.now()
|
|
732
|
+
const deadlineAt = presentationDeadlineAt(sbn, packetId, catalogTrackName, now)
|
|
733
|
+
if (deadlineAt === null) {
|
|
734
|
+
clearRepair(sbn, packetId, catalogTrackName)
|
|
735
|
+
mc.noteRepairSkipped(
|
|
736
|
+
'presentation-delay-unavailable',
|
|
737
|
+
{ rttMs: readRtt(), budgetMs: 0 },
|
|
738
|
+
sbn,
|
|
739
|
+
packetId,
|
|
740
|
+
catalogTrackName,
|
|
741
|
+
)
|
|
742
|
+
return
|
|
743
|
+
}
|
|
744
|
+
const entry: RepairEntry = {
|
|
745
|
+
key,
|
|
746
|
+
...identity,
|
|
747
|
+
repairTrack: target.repairTrack,
|
|
748
|
+
blockProfile,
|
|
749
|
+
priority: repairPriorityForClass(blockClass),
|
|
750
|
+
subscriberPriority: wire.subscriberPriority,
|
|
751
|
+
deadlineAt,
|
|
752
|
+
order: enqueueOrder++,
|
|
753
|
+
attempts: 0,
|
|
754
|
+
running: null,
|
|
755
|
+
}
|
|
756
|
+
entries.set(key, entry)
|
|
757
|
+
if (entry.priority < 2) preemptDeltas()
|
|
758
|
+
dispatch()
|
|
759
|
+
})
|
|
760
|
+
|
|
761
|
+
return () => {
|
|
762
|
+
disposed = true
|
|
763
|
+
removeResetObserver()
|
|
764
|
+
removeLifecycleObserver()
|
|
765
|
+
for (const entry of [...entries.values()]) {
|
|
766
|
+
clearRepair(entry.sbn, entry.packetId, entry.catalogTrackName)
|
|
767
|
+
if (entry.running) releaseHold(entry)
|
|
768
|
+
stop(entry, 'disposed')
|
|
769
|
+
}
|
|
770
|
+
entries.clear()
|
|
771
|
+
}
|
|
772
|
+
}
|