@blockcast/mmt-container 0.1.0-main.149f78a4adae
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 +432 -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 +148 -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 +93 -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/browser-runtime.js +17109 -0
- package/dist/browser-runtime.js.map +7 -0
- package/dist/carp-catalog.d.ts +318 -0
- package/dist/carp-catalog.d.ts.map +1 -0
- package/dist/carp-catalog.js +549 -0
- package/dist/carp-catalog.js.map +7 -0
- package/dist/catalog-fec-params.d.ts +82 -0
- package/dist/catalog-fec-params.d.ts.map +1 -0
- package/dist/catalog-fec-params.js +66 -0
- package/dist/catalog-fec-params.js.map +7 -0
- package/dist/catalog-network-source.d.ts +19 -0
- package/dist/catalog-network-source.d.ts.map +1 -0
- package/dist/catalog-network-source.js +22 -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 +168 -0
- package/dist/cmaf-block-assembler.d.ts.map +1 -0
- package/dist/cmaf-block-assembler.js +1755 -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 +195 -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 +207 -0
- package/dist/cmcd-producer.js.map +7 -0
- package/dist/codec-utils.d.ts +235 -0
- package/dist/codec-utils.d.ts.map +1 -0
- package/dist/codec-utils.js +1225 -0
- package/dist/codec-utils.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 +266 -0
- package/dist/fec-manager.d.ts.map +1 -0
- package/dist/fec-manager.js +1447 -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 +75 -0
- package/dist/fec-starvation-detector.js.map +7 -0
- package/dist/fec-worker-setup.d.ts +76 -0
- package/dist/fec-worker-setup.d.ts.map +1 -0
- package/dist/fec-worker-setup.js +603 -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 +47 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +330 -0
- package/dist/index.js.map +7 -0
- package/dist/iso-bmff-timing.d.ts +47 -0
- package/dist/iso-bmff-timing.d.ts.map +1 -0
- package/dist/iso-bmff-timing.js +526 -0
- package/dist/iso-bmff-timing.js.map +7 -0
- package/dist/loc.d.ts +68 -0
- package/dist/loc.d.ts.map +1 -0
- package/dist/loc.js +143 -0
- package/dist/loc.js.map +7 -0
- 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 +1267 -0
- package/dist/manifest-auth-plan.js.map +7 -0
- package/dist/media-router.d.ts +338 -0
- package/dist/media-router.d.ts.map +1 -0
- package/dist/media-router.js +802 -0
- package/dist/media-router.js.map +7 -0
- package/dist/mfu-reassembler.d.ts +264 -0
- package/dist/mfu-reassembler.d.ts.map +1 -0
- package/dist/mfu-reassembler.js +2668 -0
- package/dist/mfu-reassembler.js.map +7 -0
- 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 +304 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -0
- package/dist/mmtp-container-parser.js +5378 -0
- package/dist/mmtp-container-parser.js.map +7 -0
- package/dist/mmtp-container-parser.no-modules.js +7853 -0
- package/dist/mmtp-container-parser.no-modules.js.map +7 -0
- package/dist/mmtp-decode-pipeline.d.ts +96 -0
- package/dist/mmtp-decode-pipeline.d.ts.map +1 -0
- package/dist/mmtp-decode-pipeline.js +5589 -0
- package/dist/mmtp-decode-pipeline.js.map +7 -0
- package/dist/mmtp-router.d.ts +383 -0
- package/dist/mmtp-router.d.ts.map +1 -0
- package/dist/mmtp-router.js +8384 -0
- package/dist/mmtp-router.js.map +7 -0
- package/dist/mmtp-to-cmaf.d.ts +166 -0
- package/dist/mmtp-to-cmaf.d.ts.map +1 -0
- package/dist/mmtp-to-cmaf.js +781 -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 +107 -0
- package/dist/multicast-input.d.ts.map +1 -0
- package/dist/multicast-input.js +256 -0
- package/dist/multicast-input.js.map +7 -0
- package/dist/multicast-manager.d.ts +330 -0
- package/dist/multicast-manager.d.ts.map +1 -0
- package/dist/multicast-manager.js +11032 -0
- package/dist/multicast-manager.js.map +7 -0
- package/dist/multicast-transport.d.ts +62 -0
- package/dist/multicast-transport.d.ts.map +1 -0
- package/dist/multicast-transport.js +338 -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 +384 -0
- package/dist/multicast-unwrap.js.map +7 -0
- package/dist/no-modules.d.ts +9 -0
- package/dist/no-modules.d.ts.map +1 -0
- package/dist/no-modules.js +7819 -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 +58 -0
- package/dist/repair-fetch.d.ts.map +1 -0
- package/dist/repair-fetch.js +117 -0
- package/dist/repair-fetch.js.map +7 -0
- package/dist/sample-combiner.d.ts +182 -0
- package/dist/sample-combiner.d.ts.map +1 -0
- package/dist/sample-combiner.js +571 -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 +232 -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 +1220 -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 +85 -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 +456 -0
- package/dist/timestamp-codec.js.map +7 -0
- package/dist/track-pipeline-setup.d.ts +72 -0
- package/dist/track-pipeline-setup.d.ts.map +1 -0
- package/dist/track-pipeline-setup.js +306 -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 +229 -0
- package/dist/track-pipeline.js.map +7 -0
- package/dist/track-session.d.ts +269 -0
- package/dist/track-session.d.ts.map +1 -0
- package/dist/track-session.js +597 -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 +88 -0
- package/dist/transport-pool.js.map +7 -0
- package/dist/wasm-mfu-reassembler.d.ts +81 -0
- package/dist/wasm-mfu-reassembler.d.ts.map +1 -0
- package/dist/wasm-mfu-reassembler.js +1915 -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 +5635 -0
- package/dist/wasm-mmtp-container-parser.js.map +7 -0
- package/node_modules/@blockcast/fec-worker/README.md +213 -0
- package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +80 -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 +270 -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 +252 -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 +565 -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 +349 -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 +179 -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 +47 -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/fec-worker-client.ts +309 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +268 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +1048 -0
- package/node_modules/@blockcast/fec-worker/src/index.ts +32 -0
- package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +558 -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 +194 -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 +120 -0
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +2 -0
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js +2 -0
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +275 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +644 -0
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/package.json +49 -0
- package/node_modules/@blockcast/mmt-base/src/index.ts +1 -0
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +898 -0
- package/node_modules/@blockcast/mmt-fec/README.md +270 -0
- package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +80 -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 +294 -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 +72 -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 +192 -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 +185 -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 +273 -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 +22 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/index.js +22 -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 +174 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -0
- package/node_modules/@blockcast/mmt-fec/dist/oti.js +256 -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/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 +120 -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/index.d.ts +2 -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 +2 -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 +275 -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 +644 -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/package.json +49 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +1 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +898 -0
- package/node_modules/@blockcast/mmt-fec/package.json +79 -0
- package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +369 -0
- package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +277 -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 +332 -0
- package/node_modules/@blockcast/mmt-fec/src/index.ts +77 -0
- package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +34 -0
- package/node_modules/@blockcast/mmt-fec/src/oti.ts +319 -0
- package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +101 -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 +90 -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 +462 -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 +636 -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 +203 -0
- package/schemas/catalog.schema.json +283 -0
- package/src/align.ts +235 -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/carp-catalog.ts +776 -0
- package/src/catalog-fec-params.ts +167 -0
- package/src/catalog-network-source.ts +49 -0
- package/src/catalog-validator.ts +34 -0
- package/src/cmaf-block-assembler.ts +1058 -0
- package/src/cmaf-group-batcher.ts +104 -0
- package/src/cmcd-producer.ts +329 -0
- package/src/codec-utils.ts +1539 -0
- package/src/fec-codec.ts +61 -0
- package/src/fec-manager.ts +1939 -0
- package/src/fec-starvation-detector.ts +128 -0
- package/src/fec-worker-setup.ts +177 -0
- package/src/fmp4-completion.ts +47 -0
- package/src/fmp4-reader.ts +112 -0
- package/src/index.ts +443 -0
- package/src/iso-bmff-timing.ts +688 -0
- package/src/loc.ts +181 -0
- package/src/manifest-auth-plan.ts +107 -0
- package/src/media-router.ts +1185 -0
- package/src/mfu-reassembler.ts +2842 -0
- package/src/mfu-reassembly-policy.ts +134 -0
- package/src/mmtp-container-parser.ts +1498 -0
- package/src/mmtp-decode-pipeline.ts +315 -0
- package/src/mmtp-router.ts +3027 -0
- package/src/mmtp-to-cmaf.ts +956 -0
- package/src/multicast-auth-catalog.ts +340 -0
- package/src/multicast-input.ts +439 -0
- package/src/multicast-manager.ts +1503 -0
- package/src/multicast-transport.ts +320 -0
- package/src/multicast-unwrap.ts +132 -0
- package/src/no-modules.ts +20 -0
- package/src/phase14-catalog-override.ts +336 -0
- package/src/repair-fetch.ts +217 -0
- package/src/sample-combiner.ts +846 -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 +189 -0
- package/src/track-pipeline.ts +332 -0
- package/src/track-session.ts +778 -0
- package/src/transport-pool.ts +128 -0
- package/src/wasm-mfu-reassembler.ts +372 -0
- package/src/wasm-mmtp-container-parser.ts +23 -0
- package/test-vectors/align.json +199 -0
- package/test-vectors/catalog/README.md +25 -0
- package/test-vectors/catalog/negative/legacy-selection-params.json +15 -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/network-source-object.json +25 -0
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +26 -0
- package/test-vectors/catalog/negative/repair-track-legacy-shape.json +18 -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/fec-multicast.json +51 -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/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 +148 -0
- package/test-vectors/catalog-validator-public-api.mjs +25 -0
- package/test-vectors/generate-source-auth-fixture.mjs +114 -0
- package/test-vectors/source-auth-v1.json +61 -0
- package/test-vectors/subsample-placement-v1.json +230 -0
|
@@ -0,0 +1,571 @@
|
|
|
1
|
+
var __typeError = (msg) => {
|
|
2
|
+
throw TypeError(msg);
|
|
3
|
+
};
|
|
4
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
5
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
6
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
7
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
8
|
+
var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
|
|
9
|
+
|
|
10
|
+
// src/sample-combiner.ts
|
|
11
|
+
function sampleKey(catalogTrackName, mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber) {
|
|
12
|
+
return JSON.stringify([catalogTrackName ?? null, mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber]);
|
|
13
|
+
}
|
|
14
|
+
function trackNameOfKey(key) {
|
|
15
|
+
const name = JSON.parse(key)[0];
|
|
16
|
+
return name ?? void 0;
|
|
17
|
+
}
|
|
18
|
+
var SAMPLE_COMBINE_ERROR_CODES = [
|
|
19
|
+
"duplicate-subsample-offset",
|
|
20
|
+
"overlapping-subsample",
|
|
21
|
+
"exceeds-authored-size",
|
|
22
|
+
"too-many-subsample-segments"
|
|
23
|
+
];
|
|
24
|
+
var SampleCombineError = class extends Error {
|
|
25
|
+
constructor(code, message) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.code = code;
|
|
28
|
+
this.name = "SampleCombineError";
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var _maxBuffered, _requireAuthoredSize, _maxSegmentsPerSample, _authoredSizes, _pending, _retired, _stats, _SampleCombiner_instances, tryComplete_fn, retire_fn, evictOldestPending_fn;
|
|
32
|
+
var SampleCombiner = class {
|
|
33
|
+
constructor(options) {
|
|
34
|
+
__privateAdd(this, _SampleCombiner_instances);
|
|
35
|
+
__privateAdd(this, _maxBuffered);
|
|
36
|
+
__privateAdd(this, _requireAuthoredSize);
|
|
37
|
+
__privateAdd(this, _maxSegmentsPerSample);
|
|
38
|
+
__privateAdd(this, _authoredSizes, /* @__PURE__ */ new Map());
|
|
39
|
+
/** Map iteration is insertion-ordered, so the first key is the oldest. */
|
|
40
|
+
__privateAdd(this, _pending, /* @__PURE__ */ new Map());
|
|
41
|
+
/**
|
|
42
|
+
* Bounded, insertion-ordered set of recently-completed sample keys, so a
|
|
43
|
+
* late duplicate or FEC-recovered retransmission is dropped rather than
|
|
44
|
+
* re-emitted or misread as a fresh whole sample.
|
|
45
|
+
*/
|
|
46
|
+
__privateAdd(this, _retired, /* @__PURE__ */ new Set());
|
|
47
|
+
__privateAdd(this, _stats, {
|
|
48
|
+
combinedSamples: 0,
|
|
49
|
+
passthroughSamples: 0,
|
|
50
|
+
timedOutSamples: 0,
|
|
51
|
+
evictedSamples: 0
|
|
52
|
+
});
|
|
53
|
+
const { maxBuffered, requireAuthoredSize, maxSegmentsPerSample } = options;
|
|
54
|
+
if (!Number.isInteger(maxBuffered) || maxBuffered <= 0) {
|
|
55
|
+
throw new Error("[SampleCombiner] maxBuffered must be a positive integer");
|
|
56
|
+
}
|
|
57
|
+
if (!Number.isInteger(maxSegmentsPerSample) || maxSegmentsPerSample <= 0) {
|
|
58
|
+
throw new Error("[SampleCombiner] maxSegmentsPerSample must be a positive integer");
|
|
59
|
+
}
|
|
60
|
+
__privateSet(this, _maxBuffered, maxBuffered);
|
|
61
|
+
__privateSet(this, _requireAuthoredSize, requireAuthoredSize);
|
|
62
|
+
__privateSet(this, _maxSegmentsPerSample, maxSegmentsPerSample);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Register the authored sample size from the host's own FT=1 parse. Per
|
|
66
|
+
* moqcast #37, FT=1 for a movie fragment publishes before any FT=2 sample
|
|
67
|
+
* referencing it, so a host driving FT=1 as it arrives registers each
|
|
68
|
+
* sample's size before that sample's own data unit(s) arrive.
|
|
69
|
+
*
|
|
70
|
+
* On a lossy path FT=1 can still *arrive* late, after data units this
|
|
71
|
+
* combiner has already buffered. Registering a size therefore re-drives the
|
|
72
|
+
* completion check and returns the combined sample when the buffered data
|
|
73
|
+
* units already satisfy the newly-known size. Callers MUST consume the
|
|
74
|
+
* return value: for a sample carried by a single data unit there is no
|
|
75
|
+
* later {@link SampleCombiner.addMfu} to re-enter, so discarding it
|
|
76
|
+
* silently drops the sample.
|
|
77
|
+
*
|
|
78
|
+
* Registering also clears the key from the retired set. Retirement exists
|
|
79
|
+
* to drop data units that arrive *passively* after a sample completed — a
|
|
80
|
+
* late duplicate, an FEC-recovered retransmission. A host calling this
|
|
81
|
+
* method is instead asserting that a sample with this identity is authored
|
|
82
|
+
* now, which is what happens when a publisher restarts and its MPU
|
|
83
|
+
* sequence numbers begin again, or when MPU sequence wraps. Without this,
|
|
84
|
+
* such a stream would silently drop every sample whose identity collided
|
|
85
|
+
* with a retired one until the bounded set aged the key out.
|
|
86
|
+
*/
|
|
87
|
+
registerAuthoredSize(catalogTrackName, mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber, size) {
|
|
88
|
+
const key = sampleKey(catalogTrackName, mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber);
|
|
89
|
+
__privateGet(this, _retired).delete(key);
|
|
90
|
+
__privateGet(this, _authoredSizes).set(key, size);
|
|
91
|
+
return __privateMethod(this, _SampleCombiner_instances, tryComplete_fn).call(this, key, size);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Add one reassembled data unit. Returns the combined sample once every
|
|
95
|
+
* constituent data unit has arrived and totals the authored size.
|
|
96
|
+
*/
|
|
97
|
+
addMfu(mfu) {
|
|
98
|
+
if (mfu.movieFragmentSequenceNumber === void 0 || mfu.sampleNumber === void 0) {
|
|
99
|
+
__privateGet(this, _stats).passthroughSamples++;
|
|
100
|
+
return fromPassthrough(mfu);
|
|
101
|
+
}
|
|
102
|
+
const offset = mfu.sampleOffset ?? 0;
|
|
103
|
+
const key = sampleKey(
|
|
104
|
+
mfu.catalogTrackName,
|
|
105
|
+
mfu.mpuSequenceNumber,
|
|
106
|
+
mfu.movieFragmentSequenceNumber,
|
|
107
|
+
mfu.sampleNumber
|
|
108
|
+
);
|
|
109
|
+
if (__privateGet(this, _retired).has(key)) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
const dataLen = mfu.data.byteLength;
|
|
113
|
+
const authoredSize = __privateGet(this, _authoredSizes).get(key);
|
|
114
|
+
if (offset === 0 && !__privateGet(this, _pending).has(key)) {
|
|
115
|
+
const passesThrough = authoredSize === void 0 ? !__privateGet(this, _requireAuthoredSize) : dataLen === authoredSize;
|
|
116
|
+
if (passesThrough) {
|
|
117
|
+
__privateGet(this, _stats).passthroughSamples++;
|
|
118
|
+
__privateMethod(this, _SampleCombiner_instances, retire_fn).call(this, key);
|
|
119
|
+
return fromPassthrough(mfu);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const thisEnd = offset + dataLen;
|
|
123
|
+
if (authoredSize !== void 0 && thisEnd > authoredSize) {
|
|
124
|
+
throw new SampleCombineError(
|
|
125
|
+
"exceeds-authored-size",
|
|
126
|
+
"combined subsample data would exceed the registered authored sample size"
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
const existing = __privateGet(this, _pending).get(key);
|
|
130
|
+
if (existing !== void 0) {
|
|
131
|
+
if (existing.segments.has(offset)) {
|
|
132
|
+
throw new SampleCombineError(
|
|
133
|
+
"duplicate-subsample-offset",
|
|
134
|
+
"subsample data unit duplicates an offset already held for this sample"
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
if (existing.segments.size >= __privateGet(this, _maxSegmentsPerSample)) {
|
|
138
|
+
throw new SampleCombineError(
|
|
139
|
+
"too-many-subsample-segments",
|
|
140
|
+
"a sample already holds the maximum number of subsample data units"
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
for (const [segOffset, seg] of existing.segments) {
|
|
144
|
+
const segEnd = segOffset + seg.data.byteLength;
|
|
145
|
+
if (offset < segEnd && segOffset < thisEnd) {
|
|
146
|
+
throw new SampleCombineError(
|
|
147
|
+
"overlapping-subsample",
|
|
148
|
+
"subsample data unit overlaps a preceding data unit's byte range"
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
let pending = existing;
|
|
154
|
+
if (pending === void 0) {
|
|
155
|
+
if (__privateGet(this, _pending).size >= __privateGet(this, _maxBuffered)) __privateMethod(this, _SampleCombiner_instances, evictOldestPending_fn).call(this);
|
|
156
|
+
pending = { segments: /* @__PURE__ */ new Map(), startedAt: Date.now() };
|
|
157
|
+
__privateGet(this, _pending).set(key, pending);
|
|
158
|
+
}
|
|
159
|
+
pending.segments.set(offset, mfu);
|
|
160
|
+
if (authoredSize === void 0) return null;
|
|
161
|
+
return __privateMethod(this, _SampleCombiner_instances, tryComplete_fn).call(this, key, authoredSize);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Discard samples whose oldest held segment has waited past `timeoutMs`.
|
|
165
|
+
* Mirrors {@link MFUReassembler}'s clock-driven shape; the per-data-unit
|
|
166
|
+
* deadline inside {@link MFUReassembler} already bounds each constituent,
|
|
167
|
+
* so this is a backstop against a host that registers an authored size but
|
|
168
|
+
* never supplies every subsample DU.
|
|
169
|
+
*/
|
|
170
|
+
cleanupTimeouts(timeoutMs) {
|
|
171
|
+
const now = Date.now();
|
|
172
|
+
for (const [key, pending] of [...__privateGet(this, _pending)]) {
|
|
173
|
+
if (now - pending.startedAt > timeoutMs) {
|
|
174
|
+
__privateGet(this, _pending).delete(key);
|
|
175
|
+
__privateGet(this, _stats).timedOutSamples++;
|
|
176
|
+
__privateMethod(this, _SampleCombiner_instances, retire_fn).call(this, key);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
flush() {
|
|
181
|
+
__privateGet(this, _pending).clear();
|
|
182
|
+
__privateGet(this, _authoredSizes).clear();
|
|
183
|
+
__privateGet(this, _retired).clear();
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Drop one stream's in-flight, registered-size, and retired state while
|
|
187
|
+
* preserving every other stream (mirrors
|
|
188
|
+
* {@link MFUReassembler.resetStream}).
|
|
189
|
+
*/
|
|
190
|
+
resetStream(catalogTrackName) {
|
|
191
|
+
for (const key of __privateGet(this, _pending).keys()) {
|
|
192
|
+
if (trackNameOfKey(key) === catalogTrackName) __privateGet(this, _pending).delete(key);
|
|
193
|
+
}
|
|
194
|
+
for (const key of __privateGet(this, _authoredSizes).keys()) {
|
|
195
|
+
if (trackNameOfKey(key) === catalogTrackName) __privateGet(this, _authoredSizes).delete(key);
|
|
196
|
+
}
|
|
197
|
+
for (const key of __privateGet(this, _retired)) {
|
|
198
|
+
if (trackNameOfKey(key) === catalogTrackName) __privateGet(this, _retired).delete(key);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
get stats() {
|
|
202
|
+
return { ...__privateGet(this, _stats) };
|
|
203
|
+
}
|
|
204
|
+
get pendingCount() {
|
|
205
|
+
return __privateGet(this, _pending).size;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Registered authored sizes still held. Diagnostic only: it exists so tests
|
|
209
|
+
* and health reporting can assert this table stays bounded, since an
|
|
210
|
+
* unbounded one is invisible from `pendingCount` alone.
|
|
211
|
+
*/
|
|
212
|
+
get debugAuthoredSizeCount() {
|
|
213
|
+
return __privateGet(this, _authoredSizes).size;
|
|
214
|
+
}
|
|
215
|
+
/** Retired keys still remembered. Diagnostic only, bounded by `maxBuffered`. */
|
|
216
|
+
get debugRetiredCount() {
|
|
217
|
+
return __privateGet(this, _retired).size;
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
_maxBuffered = new WeakMap();
|
|
221
|
+
_requireAuthoredSize = new WeakMap();
|
|
222
|
+
_maxSegmentsPerSample = new WeakMap();
|
|
223
|
+
_authoredSizes = new WeakMap();
|
|
224
|
+
_pending = new WeakMap();
|
|
225
|
+
_retired = new WeakMap();
|
|
226
|
+
_stats = new WeakMap();
|
|
227
|
+
_SampleCombiner_instances = new WeakSet();
|
|
228
|
+
/**
|
|
229
|
+
* Emit the sample when its held data units are byte-adjacent from zero and
|
|
230
|
+
* total `size`. Completion is a protocol event, never a timer.
|
|
231
|
+
*/
|
|
232
|
+
tryComplete_fn = function(key, size) {
|
|
233
|
+
const pending = __privateGet(this, _pending).get(key);
|
|
234
|
+
if (pending === void 0) return null;
|
|
235
|
+
let expected = 0;
|
|
236
|
+
const sortedOffsets = [...pending.segments.keys()].sort((a, b) => a - b);
|
|
237
|
+
for (const segOffset of sortedOffsets) {
|
|
238
|
+
if (segOffset !== expected) return null;
|
|
239
|
+
expected += pending.segments.get(segOffset).data.byteLength;
|
|
240
|
+
}
|
|
241
|
+
if (expected !== size) return null;
|
|
242
|
+
__privateGet(this, _pending).delete(key);
|
|
243
|
+
__privateGet(this, _stats).combinedSamples++;
|
|
244
|
+
__privateMethod(this, _SampleCombiner_instances, retire_fn).call(this, key);
|
|
245
|
+
return fromSegments(pending.segments, sortedOffsets);
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Retire a sample's key: free its registered authored size and remember the
|
|
249
|
+
* key in a bounded recency set. Called on every path that removes a sample
|
|
250
|
+
* -- completion, passthrough, eviction, and timeout -- so `#authoredSizes`
|
|
251
|
+
* cannot accumulate entries for samples that never complete, and so a later
|
|
252
|
+
* data unit for a discarded sample is dropped rather than starting a fresh
|
|
253
|
+
* buffer or being misread as a whole sample.
|
|
254
|
+
*
|
|
255
|
+
* The recency set holds `maxBuffered` keys. A duplicate delayed by more
|
|
256
|
+
* than that many retirements escapes it; on a reliable path there is no
|
|
257
|
+
* such duplicate, and on a lossy path the per-data-unit deadline in
|
|
258
|
+
* {@link MFUReassembler} bounds the delay well inside this window.
|
|
259
|
+
*/
|
|
260
|
+
retire_fn = function(key) {
|
|
261
|
+
__privateGet(this, _authoredSizes).delete(key);
|
|
262
|
+
__privateGet(this, _retired).add(key);
|
|
263
|
+
while (__privateGet(this, _retired).size > __privateGet(this, _maxBuffered)) {
|
|
264
|
+
const oldest = __privateGet(this, _retired).values().next().value;
|
|
265
|
+
if (oldest === void 0) break;
|
|
266
|
+
__privateGet(this, _retired).delete(oldest);
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Discard the oldest pending sample by insertion order. This is the only
|
|
271
|
+
* backstop against one FEC-lost subsample data unit wedging
|
|
272
|
+
* {@link SampleCombiner.addMfu} for every future sample once `maxBuffered`
|
|
273
|
+
* is reached, for a host that never drives
|
|
274
|
+
* {@link SampleCombiner.cleanupTimeouts}.
|
|
275
|
+
*/
|
|
276
|
+
evictOldestPending_fn = function() {
|
|
277
|
+
const oldest = __privateGet(this, _pending).keys().next().value;
|
|
278
|
+
if (oldest === void 0) return;
|
|
279
|
+
__privateGet(this, _pending).delete(oldest);
|
|
280
|
+
__privateGet(this, _stats).evictedSamples++;
|
|
281
|
+
__privateMethod(this, _SampleCombiner_instances, retire_fn).call(this, oldest);
|
|
282
|
+
};
|
|
283
|
+
function fromPassthrough(mfu) {
|
|
284
|
+
return {
|
|
285
|
+
mpuSequenceNumber: mfu.mpuSequenceNumber,
|
|
286
|
+
movieFragmentSequenceNumber: mfu.movieFragmentSequenceNumber ?? 0,
|
|
287
|
+
sampleNumber: mfu.sampleNumber ?? 0,
|
|
288
|
+
data: mfu.data,
|
|
289
|
+
timestamp: mfu.timestamp,
|
|
290
|
+
rapFlag: mfu.rapFlag,
|
|
291
|
+
priority: mfu.priority,
|
|
292
|
+
packetSequenceNumbers: mfu.packetSequenceNumbers,
|
|
293
|
+
repairedPacketSequenceNumbers: mfu.repairedPacketSequenceNumbers,
|
|
294
|
+
catalogTrackName: mfu.catalogTrackName,
|
|
295
|
+
subsampleCount: 1,
|
|
296
|
+
fragmentCount: mfu.fragmentCount,
|
|
297
|
+
source: mfu.source,
|
|
298
|
+
// One data unit in, one sample out: its provenance IS the sample's.
|
|
299
|
+
deliveryProvenance: mfu.deliveryProvenance
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
function fromSegments(segments, sortedOffsets) {
|
|
303
|
+
const totalSize = sortedOffsets.reduce((sum, offset) => sum + segments.get(offset).data.byteLength, 0);
|
|
304
|
+
const data = new Uint8Array(totalSize);
|
|
305
|
+
let packetSequenceNumbers;
|
|
306
|
+
let repairedPacketSequenceNumbers;
|
|
307
|
+
let writeOffset = 0;
|
|
308
|
+
let first;
|
|
309
|
+
let fragmentCount = 0;
|
|
310
|
+
let combinedProvenance = sortedOffsets.length === 0 ? "unknown" : "multicast";
|
|
311
|
+
for (const offset of sortedOffsets) {
|
|
312
|
+
const seg = segments.get(offset);
|
|
313
|
+
combinedProvenance = combinedProvenance === "mixed" || seg.deliveryProvenance === "mixed" ? "mixed" : combinedProvenance === "unknown" || seg.deliveryProvenance === "unknown" ? "unknown" : "multicast";
|
|
314
|
+
data.set(seg.data, writeOffset);
|
|
315
|
+
writeOffset += seg.data.byteLength;
|
|
316
|
+
fragmentCount += seg.fragmentCount;
|
|
317
|
+
if (seg.packetSequenceNumbers !== void 0) {
|
|
318
|
+
(packetSequenceNumbers ?? (packetSequenceNumbers = [])).push(...seg.packetSequenceNumbers);
|
|
319
|
+
}
|
|
320
|
+
if (seg.repairedPacketSequenceNumbers !== void 0) {
|
|
321
|
+
(repairedPacketSequenceNumbers ?? (repairedPacketSequenceNumbers = [])).push(...seg.repairedPacketSequenceNumbers);
|
|
322
|
+
}
|
|
323
|
+
if (first === void 0) first = seg;
|
|
324
|
+
}
|
|
325
|
+
return {
|
|
326
|
+
mpuSequenceNumber: first.mpuSequenceNumber,
|
|
327
|
+
movieFragmentSequenceNumber: first.movieFragmentSequenceNumber,
|
|
328
|
+
sampleNumber: first.sampleNumber,
|
|
329
|
+
data,
|
|
330
|
+
timestamp: first.timestamp,
|
|
331
|
+
rapFlag: first.rapFlag,
|
|
332
|
+
priority: first.priority,
|
|
333
|
+
packetSequenceNumbers,
|
|
334
|
+
repairedPacketSequenceNumbers,
|
|
335
|
+
catalogTrackName: first.catalogTrackName,
|
|
336
|
+
subsampleCount: segments.size,
|
|
337
|
+
fragmentCount,
|
|
338
|
+
source: first.source,
|
|
339
|
+
deliveryProvenance: combinedProvenance
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
if (void 0) {
|
|
343
|
+
const { describe, test, expect } = void 0;
|
|
344
|
+
const combiner = (overrides = {}) => new SampleCombiner({
|
|
345
|
+
maxBuffered: 10,
|
|
346
|
+
requireAuthoredSize: false,
|
|
347
|
+
maxSegmentsPerSample: 8,
|
|
348
|
+
...overrides
|
|
349
|
+
});
|
|
350
|
+
const mfu = (mpu, movie, sample, offset, data, timestamp, rapFlag, deliveryProvenance = "multicast") => ({
|
|
351
|
+
mpuSequenceNumber: mpu,
|
|
352
|
+
data: new Uint8Array(data),
|
|
353
|
+
timestamp,
|
|
354
|
+
fragmentCount: 1,
|
|
355
|
+
rapFlag,
|
|
356
|
+
sampleNumber: sample,
|
|
357
|
+
movieFragmentSequenceNumber: movie,
|
|
358
|
+
sampleOffset: offset,
|
|
359
|
+
packetSequenceNumbers: [offset],
|
|
360
|
+
deliveryProvenance
|
|
361
|
+
});
|
|
362
|
+
describe("SampleCombiner", () => {
|
|
363
|
+
test("whole-sample DU passes through immediately with no registered size", () => {
|
|
364
|
+
const c = combiner();
|
|
365
|
+
const out = c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true));
|
|
366
|
+
expect(out).not.toBeNull();
|
|
367
|
+
expect(out.data).toEqual(new Uint8Array([1, 2, 3, 4, 5]));
|
|
368
|
+
expect(out.subsampleCount).toBe(1);
|
|
369
|
+
expect(c.pendingCount).toBe(0);
|
|
370
|
+
});
|
|
371
|
+
test("whole-sample DU passes through when it matches the registered size", () => {
|
|
372
|
+
const c = combiner();
|
|
373
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 5);
|
|
374
|
+
const out = c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true));
|
|
375
|
+
expect(out?.data).toEqual(new Uint8Array([1, 2, 3, 4, 5]));
|
|
376
|
+
});
|
|
377
|
+
test("subsample data units combine once the authored size is met", () => {
|
|
378
|
+
const c = combiner();
|
|
379
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 10);
|
|
380
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))).toBeNull();
|
|
381
|
+
expect(c.pendingCount).toBe(1);
|
|
382
|
+
const out = c.addMfu(mfu(1, 9, 17, 5, [6, 7, 8, 9, 10], 1001n, false));
|
|
383
|
+
expect(out?.data).toEqual(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]));
|
|
384
|
+
expect(out?.subsampleCount).toBe(2);
|
|
385
|
+
expect(out?.rapFlag).toBe(true);
|
|
386
|
+
expect(out?.timestamp).toBe(1000n);
|
|
387
|
+
expect(c.pendingCount).toBe(0);
|
|
388
|
+
expect(c.stats.combinedSamples).toBe(1);
|
|
389
|
+
});
|
|
390
|
+
test("subsample data units combine out of order", () => {
|
|
391
|
+
const c = combiner();
|
|
392
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 10);
|
|
393
|
+
expect(c.addMfu(mfu(1, 9, 17, 5, [6, 7, 8, 9, 10], 1001n, false))).toBeNull();
|
|
394
|
+
const out = c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true));
|
|
395
|
+
expect(out?.data).toEqual(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]));
|
|
396
|
+
});
|
|
397
|
+
test("subsample without a registered size never completes", () => {
|
|
398
|
+
const c = combiner();
|
|
399
|
+
expect(c.addMfu(mfu(1, 9, 17, 3, [1, 2, 3], 1001n, false))).toBeNull();
|
|
400
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3], 1000n, true))).toBeNull();
|
|
401
|
+
expect(c.pendingCount).toBe(1);
|
|
402
|
+
});
|
|
403
|
+
test("requireAuthoredSize buffers an offset-zero DU instead of guessing complete", () => {
|
|
404
|
+
const c = combiner({ requireAuthoredSize: true });
|
|
405
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))).toBeNull();
|
|
406
|
+
expect(c.pendingCount).toBe(1);
|
|
407
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 10);
|
|
408
|
+
const out = c.addMfu(mfu(1, 9, 17, 5, [6, 7, 8, 9, 10], 1001n, false));
|
|
409
|
+
expect(out?.data).toEqual(new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]));
|
|
410
|
+
});
|
|
411
|
+
test("duplicate offset is rejected", () => {
|
|
412
|
+
const c = combiner();
|
|
413
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 10);
|
|
414
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))).toBeNull();
|
|
415
|
+
expect(() => c.addMfu(mfu(1, 9, 17, 0, [9, 9, 9, 9, 9], 2000n, true))).toThrow(SampleCombineError);
|
|
416
|
+
});
|
|
417
|
+
test("overlapping subsample is rejected", () => {
|
|
418
|
+
const c = combiner();
|
|
419
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 10);
|
|
420
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))).toBeNull();
|
|
421
|
+
expect(() => c.addMfu(mfu(1, 9, 17, 3, [9, 9, 9, 9, 9], 2000n, true))).toThrow(SampleCombineError);
|
|
422
|
+
});
|
|
423
|
+
test("exceeding the authored size is rejected", () => {
|
|
424
|
+
const c = combiner();
|
|
425
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 8);
|
|
426
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))).toBeNull();
|
|
427
|
+
expect(() => c.addMfu(mfu(1, 9, 17, 5, [6, 7, 8, 9, 10], 2000n, false))).toThrow(SampleCombineError);
|
|
428
|
+
});
|
|
429
|
+
test("exceeding maxSegmentsPerSample is rejected", () => {
|
|
430
|
+
const c = combiner({ maxSegmentsPerSample: 2 });
|
|
431
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 100);
|
|
432
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2], 1000n, true))).toBeNull();
|
|
433
|
+
expect(c.addMfu(mfu(1, 9, 17, 2, [3, 4], 1001n, false))).toBeNull();
|
|
434
|
+
expect(() => c.addMfu(mfu(1, 9, 17, 4, [5, 6], 1002n, false))).toThrow(SampleCombineError);
|
|
435
|
+
});
|
|
436
|
+
test("a full combiner evicts the oldest pending sample instead of throwing", () => {
|
|
437
|
+
const c = combiner({ maxBuffered: 2 });
|
|
438
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 10);
|
|
439
|
+
c.registerAuthoredSize(void 0, 1, 9, 18, 10);
|
|
440
|
+
c.registerAuthoredSize(void 0, 1, 9, 19, 10);
|
|
441
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 1, 1, 1, 1], 1000n, true))).toBeNull();
|
|
442
|
+
expect(c.addMfu(mfu(1, 9, 18, 0, [2, 2, 2, 2, 2], 1001n, true))).toBeNull();
|
|
443
|
+
expect(c.pendingCount).toBe(2);
|
|
444
|
+
expect(c.addMfu(mfu(1, 9, 19, 0, [3, 3, 3, 3, 3], 1002n, true))).toBeNull();
|
|
445
|
+
expect(c.pendingCount).toBe(2);
|
|
446
|
+
expect(c.stats.evictedSamples).toBe(1);
|
|
447
|
+
expect(c.addMfu(mfu(1, 9, 18, 5, [8, 8, 8, 8, 8], 2001n, false))?.data).toEqual(new Uint8Array([2, 2, 2, 2, 2, 8, 8, 8, 8, 8]));
|
|
448
|
+
expect(c.addMfu(mfu(1, 9, 19, 5, [9, 9, 9, 9, 9], 2002n, false))?.data).toEqual(new Uint8Array([3, 3, 3, 3, 3, 9, 9, 9, 9, 9]));
|
|
449
|
+
c.registerAuthoredSize(void 0, 1, 9, 20, 10);
|
|
450
|
+
expect(c.addMfu(mfu(1, 9, 20, 0, [4, 4, 4, 4, 4], 3000n, true))).toBeNull();
|
|
451
|
+
expect(c.addMfu(mfu(1, 9, 20, 5, [7, 7, 7, 7, 7], 3001n, false))?.data).toEqual(new Uint8Array([4, 4, 4, 4, 4, 7, 7, 7, 7, 7]));
|
|
452
|
+
});
|
|
453
|
+
test("a completed sample frees its authored size and drops a late duplicate", () => {
|
|
454
|
+
const c = combiner();
|
|
455
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 10);
|
|
456
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))).toBeNull();
|
|
457
|
+
expect(c.addMfu(mfu(1, 9, 17, 5, [6, 7, 8, 9, 10], 1001n, false))).not.toBeNull();
|
|
458
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 2000n, true))).toBeNull();
|
|
459
|
+
});
|
|
460
|
+
test("resetStream drops one track and preserves the others", () => {
|
|
461
|
+
const c = combiner();
|
|
462
|
+
c.registerAuthoredSize("video/720p", 1, 9, 17, 10);
|
|
463
|
+
c.registerAuthoredSize("audio", 1, 9, 17, 10);
|
|
464
|
+
const video = { ...mfu(1, 9, 17, 0, [1, 1, 1, 1, 1], 1000n, true), catalogTrackName: "video/720p" };
|
|
465
|
+
const audio = { ...mfu(1, 9, 17, 0, [2, 2, 2, 2, 2], 1000n, true), catalogTrackName: "audio" };
|
|
466
|
+
expect(c.addMfu(video)).toBeNull();
|
|
467
|
+
expect(c.addMfu(audio)).toBeNull();
|
|
468
|
+
c.resetStream("video/720p");
|
|
469
|
+
expect(c.pendingCount).toBe(1);
|
|
470
|
+
const audioTail = { ...mfu(1, 9, 17, 5, [3, 3, 3, 3, 3], 1001n, false), catalogTrackName: "audio" };
|
|
471
|
+
expect(c.addMfu(audioTail)?.data).toEqual(new Uint8Array([2, 2, 2, 2, 2, 3, 3, 3, 3, 3]));
|
|
472
|
+
});
|
|
473
|
+
test("flush clears registered authored sizes", () => {
|
|
474
|
+
const c = combiner();
|
|
475
|
+
c.registerAuthoredSize(void 0, 1, 9, 17, 5);
|
|
476
|
+
c.flush();
|
|
477
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))?.data).toEqual(new Uint8Array([1, 2, 3, 4, 5]));
|
|
478
|
+
});
|
|
479
|
+
test("a healthy stream accumulates no bookkeeping", () => {
|
|
480
|
+
const c = combiner({ maxBuffered: 4, requireAuthoredSize: true });
|
|
481
|
+
for (let i = 0; i < 1e3; i++) {
|
|
482
|
+
expect(c.registerAuthoredSize(void 0, 1, 9, i, 10)).toBeNull();
|
|
483
|
+
expect(c.addMfu(mfu(1, 9, i, 0, [1, 1, 1, 1, 1], 1000n, true))).toBeNull();
|
|
484
|
+
expect(c.addMfu(mfu(1, 9, i, 5, [2, 2, 2, 2, 2], 1001n, false))).not.toBeNull();
|
|
485
|
+
}
|
|
486
|
+
expect(c.stats.combinedSamples).toBe(1e3);
|
|
487
|
+
expect(c.pendingCount).toBe(0);
|
|
488
|
+
expect(c.debugAuthoredSizeCount).toBe(0);
|
|
489
|
+
expect(c.debugRetiredCount).toBeLessThanOrEqual(4);
|
|
490
|
+
});
|
|
491
|
+
test("samples that never complete release their authored size", () => {
|
|
492
|
+
const c = combiner({ maxBuffered: 4, requireAuthoredSize: true });
|
|
493
|
+
for (let i = 0; i < 1e3; i++) {
|
|
494
|
+
expect(c.registerAuthoredSize(void 0, 1, 9, i, 10)).toBeNull();
|
|
495
|
+
expect(c.addMfu(mfu(1, 9, i, 0, [1, 1, 1, 1, 1], 1000n, true))).toBeNull();
|
|
496
|
+
}
|
|
497
|
+
c.cleanupTimeouts(-1);
|
|
498
|
+
expect(c.pendingCount).toBe(0);
|
|
499
|
+
expect(c.debugAuthoredSizeCount).toBe(0);
|
|
500
|
+
});
|
|
501
|
+
test("a late authored size completes an already-buffered sample", () => {
|
|
502
|
+
const c = combiner({ requireAuthoredSize: true });
|
|
503
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 2, 3, 4, 5], 1000n, true))).toBeNull();
|
|
504
|
+
expect(c.pendingCount).toBe(1);
|
|
505
|
+
const out = c.registerAuthoredSize(void 0, 1, 9, 17, 5);
|
|
506
|
+
expect(out?.data).toEqual(new Uint8Array([1, 2, 3, 4, 5]));
|
|
507
|
+
expect(out?.subsampleCount).toBe(1);
|
|
508
|
+
expect(c.pendingCount).toBe(0);
|
|
509
|
+
});
|
|
510
|
+
test("a rejected data unit does not evict a live sample", () => {
|
|
511
|
+
const c = combiner({ maxBuffered: 2 });
|
|
512
|
+
for (const s of [17, 18, 19]) c.registerAuthoredSize(void 0, 1, 9, s, 10);
|
|
513
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 1, 1, 1, 1], 1000n, true))).toBeNull();
|
|
514
|
+
expect(c.addMfu(mfu(1, 9, 18, 0, [2, 2, 2, 2, 2], 1001n, true))).toBeNull();
|
|
515
|
+
expect(c.pendingCount).toBe(2);
|
|
516
|
+
expect(() => c.addMfu(mfu(1, 9, 19, 8, [9, 9, 9, 9, 9], 2000n, false))).toThrow(SampleCombineError);
|
|
517
|
+
expect(c.stats.evictedSamples).toBe(0);
|
|
518
|
+
expect(c.pendingCount).toBe(2);
|
|
519
|
+
expect(c.addMfu(mfu(1, 9, 17, 5, [3, 3, 3, 3, 3], 2001n, false))?.data).toEqual(new Uint8Array([1, 1, 1, 1, 1, 3, 3, 3, 3, 3]));
|
|
520
|
+
});
|
|
521
|
+
test("an evicted sample is retired rather than reopened", () => {
|
|
522
|
+
const c = combiner({ maxBuffered: 1 });
|
|
523
|
+
for (const s of [17, 18]) c.registerAuthoredSize(void 0, 1, 9, s, 10);
|
|
524
|
+
expect(c.addMfu(mfu(1, 9, 17, 0, [1, 1, 1, 1, 1], 1000n, true))).toBeNull();
|
|
525
|
+
expect(c.addMfu(mfu(1, 9, 18, 0, [2, 2, 2, 2, 2], 1001n, true))).toBeNull();
|
|
526
|
+
expect(c.stats.evictedSamples).toBe(1);
|
|
527
|
+
expect(c.addMfu(mfu(1, 9, 17, 5, [3, 3, 3, 3, 3], 2000n, false))).toBeNull();
|
|
528
|
+
expect(c.pendingCount).toBe(1);
|
|
529
|
+
});
|
|
530
|
+
});
|
|
531
|
+
describe("sample-level delivery provenance", () => {
|
|
532
|
+
test("one non-multicast subsample makes the whole sample non-exclusive", () => {
|
|
533
|
+
const c = combiner();
|
|
534
|
+
c.registerAuthoredSize(void 0, 1, 1, 1, 4);
|
|
535
|
+
expect(c.addMfu(mfu(1, 1, 1, 0, [1, 2], 100n, true, "multicast"))).toBeNull();
|
|
536
|
+
const done = c.addMfu(mfu(1, 1, 1, 2, [3, 4], 100n, false, "mixed"));
|
|
537
|
+
expect(done).not.toBeNull();
|
|
538
|
+
expect(done.subsampleCount).toBe(2);
|
|
539
|
+
expect(done.deliveryProvenance).toBe("mixed");
|
|
540
|
+
});
|
|
541
|
+
test("an unattributed subsample degrades the sample to unknown", () => {
|
|
542
|
+
const c = combiner();
|
|
543
|
+
c.registerAuthoredSize(void 0, 2, 1, 1, 4);
|
|
544
|
+
expect(c.addMfu(mfu(2, 1, 1, 0, [1, 2], 100n, true, "multicast"))).toBeNull();
|
|
545
|
+
const done = c.addMfu(mfu(2, 1, 1, 2, [3, 4], 100n, false, "unknown"));
|
|
546
|
+
expect(done).not.toBeNull();
|
|
547
|
+
expect(done.deliveryProvenance).toBe("unknown");
|
|
548
|
+
});
|
|
549
|
+
test("an all-multicast sample stays multicast-exclusive", () => {
|
|
550
|
+
const c = combiner();
|
|
551
|
+
c.registerAuthoredSize(void 0, 3, 1, 1, 4);
|
|
552
|
+
expect(c.addMfu(mfu(3, 1, 1, 0, [1, 2], 100n, true, "multicast"))).toBeNull();
|
|
553
|
+
const done = c.addMfu(mfu(3, 1, 1, 2, [3, 4], 100n, false, "multicast"));
|
|
554
|
+
expect(done).not.toBeNull();
|
|
555
|
+
expect(done.deliveryProvenance).toBe("multicast");
|
|
556
|
+
});
|
|
557
|
+
test("a passthrough sample inherits its data unit provenance verbatim", () => {
|
|
558
|
+
const c = combiner();
|
|
559
|
+
const done = c.addMfu(mfu(4, 1, 1, 0, [1, 2], 100n, true, "mixed"));
|
|
560
|
+
expect(done).not.toBeNull();
|
|
561
|
+
expect(done.subsampleCount).toBe(1);
|
|
562
|
+
expect(done.deliveryProvenance).toBe("mixed");
|
|
563
|
+
});
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
export {
|
|
567
|
+
SAMPLE_COMBINE_ERROR_CODES,
|
|
568
|
+
SampleCombineError,
|
|
569
|
+
SampleCombiner
|
|
570
|
+
};
|
|
571
|
+
//# sourceMappingURL=sample-combiner.js.map
|