@blockcast/mmt-container 0.1.0 → 0.3.0-main.288475b64b3e
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 +538 -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 +26457 -0
- package/dist/browser-runtime.js.map +7 -0
- package/dist/carp-catalog.d.ts +445 -0
- package/dist/carp-catalog.d.ts.map +1 -0
- package/dist/carp-catalog.js +998 -0
- package/dist/carp-catalog.js.map +7 -0
- package/dist/catalog-fec-params.d.ts +315 -0
- package/dist/catalog-fec-params.d.ts.map +1 -0
- package/dist/catalog-fec-params.js +730 -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 +46 -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 +589 -0
- package/dist/fec-manager.d.ts.map +1 -0
- package/dist/fec-manager.js +3840 -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 +140 -0
- package/dist/fec-state.d.ts.map +1 -0
- package/dist/fec-state.js +86 -0
- package/dist/fec-state.js.map +7 -0
- package/dist/fec-worker-setup.d.ts +100 -0
- package/dist/fec-worker-setup.d.ts.map +1 -0
- package/dist/fec-worker-setup.js +671 -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 +464 -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 +288 -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 +3050 -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 +573 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -0
- package/dist/mmtp-container-parser.js +6601 -0
- package/dist/mmtp-container-parser.js.map +7 -0
- package/dist/mmtp-container-parser.no-modules.js +9645 -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 +6835 -0
- package/dist/mmtp-decode-pipeline.js.map +7 -0
- package/dist/mmtp-router.d.ts +702 -0
- package/dist/mmtp-router.d.ts.map +1 -0
- package/dist/mmtp-router.js +11193 -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 +389 -0
- package/dist/multicast-input.js.map +7 -0
- package/dist/multicast-manager.d.ts +699 -0
- package/dist/multicast-manager.d.ts.map +1 -0
- package/dist/multicast-manager.js +19120 -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 +2262 -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 +417 -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 +9520 -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 +281 -0
- package/dist/repair-fetch.d.ts.map +1 -0
- package/dist/repair-fetch.js +391 -0
- package/dist/repair-fetch.js.map +7 -0
- package/dist/repair-layers.d.ts +169 -0
- package/dist/repair-layers.d.ts.map +1 -0
- package/dist/repair-layers.js +351 -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 +568 -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 +472 -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 +2132 -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 +6855 -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 +22 -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 +48 -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 +92 -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 +345 -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 +373 -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 +764 -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 +59 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +391 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +392 -0
- package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +1386 -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 +132 -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 +28 -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 +44 -0
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +314 -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 +49 -0
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +860 -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 +105 -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 +222 -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 +149 -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 +161 -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 +132 -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 +28 -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 +44 -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 +314 -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 +49 -0
- package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +860 -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 +360 -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 +225 -0
- package/node_modules/@blockcast/mmt-fec/src/index.ts +93 -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 +1086 -0
- package/src/catalog-fec-params.ts +803 -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 +4241 -0
- package/src/fec-starvation-detector.ts +128 -0
- package/src/fec-state.ts +228 -0
- package/src/fec-worker-setup.ts +291 -0
- package/src/fmp4-completion.ts +47 -0
- package/src/fmp4-reader.ts +112 -0
- package/src/index.ts +592 -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 +2406 -0
- package/src/mmtp-decode-pipeline.ts +406 -0
- package/src/mmtp-router.ts +4712 -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 +2895 -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 +786 -0
- package/src/repair-layers.ts +553 -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 +123 -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-retired.json +52 -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 +53 -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 +44 -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 +767 -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 @@
|
|
|
1
|
+
{"version":3,"file":"iso-bmff-timing.d.ts","sourceRoot":"","sources":["../src/iso-bmff-timing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqCH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAA;IAClB,6EAA6E;IAC7E,gBAAgB,EAAE,MAAM,CAAA;IACxB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,2BAA2B,EAAE,MAAM,CAAA;IACnC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAA;CACxC;AAED,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,QAAQ,CAAA;AAmNhE,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,UAAU,GACf,kBAAkB,GAAG,IAAI,CA8C3B;AA4LD,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,UAAU,EAChB,KAAK,EAAE,kBAAkB,EACzB,UAAU,EAAE,MAAM,GACjB,0BAA0B,GAAG,IAAI,CAuCnC;AAoBD,gDAAgD;AAChD,qBAAa,qBAAqB;;IAOpB,QAAQ,CAAC,iBAAiB,EAAE,MAAM;gBAAzB,iBAAiB,EAAE,MAAM;IAM9C,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED;;;;;OAKG;IACH,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED,gEAAgE;IAChE,IAAI,0BAA0B,IAAI,6BAA6B,GAAG,IAAI,CAErE;IAED,iBAAiB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAQ5C,gBAAgB,CACd,iBAAiB,EAAE,MAAM,EACzB,IAAI,EAAE,UAAU,EAChB,qBAAqB,SAAyB,GAC7C,OAAO;IAiEV,YAAY,CACV,iBAAiB,EAAE,MAAM,EACzB,2BAA2B,EAAE,MAAM,EACnC,YAAY,EAAE,MAAM,GACnB,mBAAmB,GAAG,IAAI;IAW7B,aAAa,CACX,iBAAiB,EAAE,MAAM,EACzB,2BAA2B,EAAE,MAAM,EACnC,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,mBAAmB,GAC5B,OAAO;IASV;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,CACX,iBAAiB,EAAE,MAAM,EACzB,2BAA2B,EAAE,MAAM,EACnC,YAAY,EAAE,MAAM,GACnB,OAAO;IA2CV,KAAK,IAAI,IAAI;CAKd;AAUD,mFAAmF;AACnF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWxF"}
|
|
@@ -0,0 +1,593 @@
|
|
|
1
|
+
// src/iso-bmff-timing.ts
|
|
2
|
+
var U64_MAX = 0xffffffffffffffffn;
|
|
3
|
+
var I64_MIN = -0x8000000000000000n;
|
|
4
|
+
var I64_MAX = 0x7fffffffffffffffn;
|
|
5
|
+
var MICROSECONDS_PER_SECOND = 1000000n;
|
|
6
|
+
var TFHD_BASE_DATA_OFFSET_PRESENT = 1;
|
|
7
|
+
var TFHD_SAMPLE_DESCRIPTION_INDEX_PRESENT = 2;
|
|
8
|
+
var TFHD_DEFAULT_SAMPLE_DURATION_PRESENT = 8;
|
|
9
|
+
var TFHD_DEFAULT_SAMPLE_SIZE_PRESENT = 16;
|
|
10
|
+
var TFHD_DEFAULT_SAMPLE_FLAGS_PRESENT = 32;
|
|
11
|
+
var TFHD_DURATION_IS_EMPTY = 65536;
|
|
12
|
+
var TFHD_DEFAULT_BASE_IS_MOOF = 131072;
|
|
13
|
+
var TFHD_KNOWN_FLAGS = TFHD_BASE_DATA_OFFSET_PRESENT | TFHD_SAMPLE_DESCRIPTION_INDEX_PRESENT | TFHD_DEFAULT_SAMPLE_DURATION_PRESENT | TFHD_DEFAULT_SAMPLE_SIZE_PRESENT | TFHD_DEFAULT_SAMPLE_FLAGS_PRESENT | TFHD_DURATION_IS_EMPTY | TFHD_DEFAULT_BASE_IS_MOOF;
|
|
14
|
+
var TRUN_DATA_OFFSET_PRESENT = 1;
|
|
15
|
+
var TRUN_FIRST_SAMPLE_FLAGS_PRESENT = 4;
|
|
16
|
+
var TRUN_SAMPLE_DURATION_PRESENT = 256;
|
|
17
|
+
var TRUN_SAMPLE_SIZE_PRESENT = 512;
|
|
18
|
+
var TRUN_SAMPLE_FLAGS_PRESENT = 1024;
|
|
19
|
+
var TRUN_SAMPLE_CTS_OFFSET_PRESENT = 2048;
|
|
20
|
+
var TRUN_KNOWN_FLAGS = TRUN_DATA_OFFSET_PRESENT | TRUN_FIRST_SAMPLE_FLAGS_PRESENT | TRUN_SAMPLE_DURATION_PRESENT | TRUN_SAMPLE_SIZE_PRESENT | TRUN_SAMPLE_FLAGS_PRESENT | TRUN_SAMPLE_CTS_OFFSET_PRESENT;
|
|
21
|
+
function view(data) {
|
|
22
|
+
return new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
23
|
+
}
|
|
24
|
+
function boxType(data, offset) {
|
|
25
|
+
return String.fromCharCode(
|
|
26
|
+
data[offset],
|
|
27
|
+
data[offset + 1],
|
|
28
|
+
data[offset + 2],
|
|
29
|
+
data[offset + 3]
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function readU64(data, offset) {
|
|
33
|
+
if (offset < 0 || offset + 8 > data.length) return null;
|
|
34
|
+
const dataView = view(data);
|
|
35
|
+
return BigInt(dataView.getUint32(offset, false)) << 32n | BigInt(dataView.getUint32(offset + 4, false));
|
|
36
|
+
}
|
|
37
|
+
function parseBox(data, start, limit) {
|
|
38
|
+
if (start < 0 || limit > data.length || start + 8 > limit) return null;
|
|
39
|
+
const dataView = view(data);
|
|
40
|
+
const shortSize = dataView.getUint32(start, false);
|
|
41
|
+
let headerSize = 8;
|
|
42
|
+
let size;
|
|
43
|
+
if (shortSize === 0) {
|
|
44
|
+
size = limit - start;
|
|
45
|
+
} else if (shortSize === 1) {
|
|
46
|
+
if (start + 16 > limit) return null;
|
|
47
|
+
const extendedSize = readU64(data, start + 8);
|
|
48
|
+
if (extendedSize === null || extendedSize > BigInt(Number.MAX_SAFE_INTEGER)) return null;
|
|
49
|
+
headerSize = 16;
|
|
50
|
+
size = Number(extendedSize);
|
|
51
|
+
} else {
|
|
52
|
+
size = shortSize;
|
|
53
|
+
}
|
|
54
|
+
if (size < headerSize || start + size > limit) return null;
|
|
55
|
+
return {
|
|
56
|
+
type: boxType(data, start + 4),
|
|
57
|
+
start,
|
|
58
|
+
bodyStart: start + headerSize,
|
|
59
|
+
end: start + size
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function parseBoxes(data, start, end) {
|
|
63
|
+
if (start < 0 || end < start || end > data.length) return null;
|
|
64
|
+
const boxes = [];
|
|
65
|
+
let offset = start;
|
|
66
|
+
while (offset < end) {
|
|
67
|
+
const box = parseBox(data, offset, end);
|
|
68
|
+
if (!box || box.end <= offset) return null;
|
|
69
|
+
boxes.push(box);
|
|
70
|
+
offset = box.end;
|
|
71
|
+
}
|
|
72
|
+
return offset === end ? boxes : null;
|
|
73
|
+
}
|
|
74
|
+
function children(data, parent) {
|
|
75
|
+
return parseBoxes(data, parent.bodyStart, parent.end);
|
|
76
|
+
}
|
|
77
|
+
function exactlyOne(boxes, type) {
|
|
78
|
+
const matches = boxes.filter((box) => box.type === type);
|
|
79
|
+
return matches.length === 1 ? matches[0] : null;
|
|
80
|
+
}
|
|
81
|
+
function parseFullBox(data, box) {
|
|
82
|
+
if (box.bodyStart + 4 > box.end) return null;
|
|
83
|
+
const versionAndFlags = view(data).getUint32(box.bodyStart, false);
|
|
84
|
+
return {
|
|
85
|
+
version: versionAndFlags >>> 24,
|
|
86
|
+
flags: versionAndFlags & 16777215,
|
|
87
|
+
bodyStart: box.bodyStart + 4
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function parseTkhdTrackId(data, box) {
|
|
91
|
+
const full = parseFullBox(data, box);
|
|
92
|
+
if (!full || full.flags & ~15) return null;
|
|
93
|
+
const bodyLength = box.end - full.bodyStart;
|
|
94
|
+
const trackIdOffset = full.version === 0 ? full.bodyStart + 8 : full.version === 1 ? full.bodyStart + 16 : -1;
|
|
95
|
+
const expectedBodyLength = full.version === 0 ? 80 : full.version === 1 ? 92 : -1;
|
|
96
|
+
if (trackIdOffset < 0 || bodyLength !== expectedBodyLength) return null;
|
|
97
|
+
return view(data).getUint32(trackIdOffset, false);
|
|
98
|
+
}
|
|
99
|
+
function parseMdhdTimescale(data, box) {
|
|
100
|
+
const full = parseFullBox(data, box);
|
|
101
|
+
if (!full || full.flags !== 0) return null;
|
|
102
|
+
const bodyLength = box.end - full.bodyStart;
|
|
103
|
+
const timescaleOffset = full.version === 0 ? full.bodyStart + 8 : full.version === 1 ? full.bodyStart + 16 : -1;
|
|
104
|
+
const expectedBodyLength = full.version === 0 ? 20 : full.version === 1 ? 32 : -1;
|
|
105
|
+
if (timescaleOffset < 0 || bodyLength !== expectedBodyLength) return null;
|
|
106
|
+
return view(data).getUint32(timescaleOffset, false);
|
|
107
|
+
}
|
|
108
|
+
function parseHandlerType(data, box) {
|
|
109
|
+
const full = parseFullBox(data, box);
|
|
110
|
+
if (!full || full.version !== 0 || full.flags !== 0 || full.bodyStart + 20 > box.end) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return boxType(data, full.bodyStart + 4);
|
|
114
|
+
}
|
|
115
|
+
function editListHasEntries(data, box) {
|
|
116
|
+
const full = parseFullBox(data, box);
|
|
117
|
+
if (!full || full.flags !== 0 || full.version !== 0 && full.version !== 1) return null;
|
|
118
|
+
if (full.bodyStart + 4 > box.end) return null;
|
|
119
|
+
const entryCount = view(data).getUint32(full.bodyStart, false);
|
|
120
|
+
const entrySize = full.version === 0 ? 12 : 20;
|
|
121
|
+
const expectedEnd = full.bodyStart + 4 + entryCount * entrySize;
|
|
122
|
+
if (!Number.isSafeInteger(expectedEnd) || expectedEnd !== box.end) return null;
|
|
123
|
+
return entryCount !== 0;
|
|
124
|
+
}
|
|
125
|
+
function parseTrack(data, trak) {
|
|
126
|
+
const trakChildren = children(data, trak);
|
|
127
|
+
if (!trakChildren) return null;
|
|
128
|
+
const tkhd = exactlyOne(trakChildren, "tkhd");
|
|
129
|
+
const mdia = exactlyOne(trakChildren, "mdia");
|
|
130
|
+
if (!tkhd || !mdia) return null;
|
|
131
|
+
const trackId = parseTkhdTrackId(data, tkhd);
|
|
132
|
+
if (trackId === null || trackId === 0) return null;
|
|
133
|
+
const mdiaChildren = children(data, mdia);
|
|
134
|
+
if (!mdiaChildren) return null;
|
|
135
|
+
const mdhd = exactlyOne(mdiaChildren, "mdhd");
|
|
136
|
+
const hdlr = exactlyOne(mdiaChildren, "hdlr");
|
|
137
|
+
if (!mdhd || !hdlr) return null;
|
|
138
|
+
const timescale = parseMdhdTimescale(data, mdhd);
|
|
139
|
+
const handlerType = parseHandlerType(data, hdlr);
|
|
140
|
+
if (timescale === null || timescale === 0 || handlerType === null) return null;
|
|
141
|
+
const edtsBoxes = trakChildren.filter((box) => box.type === "edts");
|
|
142
|
+
if (edtsBoxes.length > 1) return null;
|
|
143
|
+
let hasEdits = false;
|
|
144
|
+
if (edtsBoxes.length === 1) {
|
|
145
|
+
const edtsChildren = children(data, edtsBoxes[0]);
|
|
146
|
+
if (!edtsChildren) return null;
|
|
147
|
+
const editLists = edtsChildren.filter((box) => box.type === "elst");
|
|
148
|
+
if (editLists.length > 1) return null;
|
|
149
|
+
if (editLists.length === 1) {
|
|
150
|
+
const result = editListHasEntries(data, editLists[0]);
|
|
151
|
+
if (result === null) return null;
|
|
152
|
+
hasEdits = result;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return { trackId, handlerType, timescale, hasEdits };
|
|
156
|
+
}
|
|
157
|
+
function parseTrex(data, box) {
|
|
158
|
+
const full = parseFullBox(data, box);
|
|
159
|
+
if (!full || full.version !== 0 || full.flags !== 0 || box.end - full.bodyStart !== 20) {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
const dataView = view(data);
|
|
163
|
+
const trackId = dataView.getUint32(full.bodyStart, false);
|
|
164
|
+
const defaultSampleDuration = dataView.getUint32(full.bodyStart + 8, false);
|
|
165
|
+
const defaultSampleSize = dataView.getUint32(full.bodyStart + 12, false);
|
|
166
|
+
return {
|
|
167
|
+
trackId,
|
|
168
|
+
timescale: 0,
|
|
169
|
+
...defaultSampleDuration === 0 ? {} : { defaultSampleDuration },
|
|
170
|
+
...defaultSampleSize === 0 ? {} : { defaultSampleSize }
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function parseIsoBmffInitializationTiming(data) {
|
|
174
|
+
const topLevel = parseBoxes(data, 0, data.length);
|
|
175
|
+
if (!topLevel) return null;
|
|
176
|
+
const ftyp = exactlyOne(topLevel, "ftyp");
|
|
177
|
+
const moov = exactlyOne(topLevel, "moov");
|
|
178
|
+
if (!ftyp || !moov || ftyp.start > moov.start) return null;
|
|
179
|
+
if (topLevel.some((box) => box.type === "moof" || box.type === "mdat")) return null;
|
|
180
|
+
const moovChildren = children(data, moov);
|
|
181
|
+
if (!moovChildren) return null;
|
|
182
|
+
const parsedTracks = [];
|
|
183
|
+
for (const trak of moovChildren.filter((box) => box.type === "trak")) {
|
|
184
|
+
const parsed = parseTrack(data, trak);
|
|
185
|
+
if (!parsed) return null;
|
|
186
|
+
parsedTracks.push(parsed);
|
|
187
|
+
}
|
|
188
|
+
const mediaTracks = parsedTracks.filter(
|
|
189
|
+
(track) => track.handlerType === "vide" || track.handlerType === "soun"
|
|
190
|
+
);
|
|
191
|
+
if (mediaTracks.length !== 1) return null;
|
|
192
|
+
const mediaTrack = mediaTracks[0];
|
|
193
|
+
if (mediaTrack.hasEdits) return null;
|
|
194
|
+
const mvex = exactlyOne(moovChildren, "mvex");
|
|
195
|
+
if (!mvex) return null;
|
|
196
|
+
const mvexChildren = children(data, mvex);
|
|
197
|
+
if (!mvexChildren) return null;
|
|
198
|
+
const trexEntries = [];
|
|
199
|
+
for (const trexBox of mvexChildren.filter((box) => box.type === "trex")) {
|
|
200
|
+
const trex2 = parseTrex(data, trexBox);
|
|
201
|
+
if (!trex2) return null;
|
|
202
|
+
trexEntries.push(trex2);
|
|
203
|
+
}
|
|
204
|
+
const matchingTrex = trexEntries.filter((trex2) => trex2.trackId === mediaTrack.trackId);
|
|
205
|
+
if (matchingTrex.length !== 1) return null;
|
|
206
|
+
const trex = matchingTrex[0];
|
|
207
|
+
return {
|
|
208
|
+
trackId: mediaTrack.trackId,
|
|
209
|
+
timescale: mediaTrack.timescale,
|
|
210
|
+
...trex.defaultSampleDuration === void 0 ? {} : { defaultSampleDuration: trex.defaultSampleDuration },
|
|
211
|
+
...trex.defaultSampleSize === void 0 ? {} : { defaultSampleSize: trex.defaultSampleSize }
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
function parseMfhdSequence(data, box) {
|
|
215
|
+
const full = parseFullBox(data, box);
|
|
216
|
+
if (!full || full.version !== 0 || full.flags !== 0 || box.end - full.bodyStart !== 4) {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
return view(data).getUint32(full.bodyStart, false);
|
|
220
|
+
}
|
|
221
|
+
function parseTfhd(data, box) {
|
|
222
|
+
const full = parseFullBox(data, box);
|
|
223
|
+
if (!full || full.version !== 0 || (full.flags & ~TFHD_KNOWN_FLAGS) !== 0) return null;
|
|
224
|
+
if ((full.flags & TFHD_BASE_DATA_OFFSET_PRESENT) !== 0 || (full.flags & TFHD_DEFAULT_BASE_IS_MOOF) === 0 || (full.flags & TFHD_DURATION_IS_EMPTY) !== 0) {
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
const dataView = view(data);
|
|
228
|
+
let offset = full.bodyStart;
|
|
229
|
+
if (offset + 4 > box.end) return null;
|
|
230
|
+
const trackId = dataView.getUint32(offset, false);
|
|
231
|
+
offset += 4;
|
|
232
|
+
if ((full.flags & TFHD_SAMPLE_DESCRIPTION_INDEX_PRESENT) !== 0) {
|
|
233
|
+
if (offset + 4 > box.end) return null;
|
|
234
|
+
offset += 4;
|
|
235
|
+
}
|
|
236
|
+
let defaultSampleDuration;
|
|
237
|
+
if ((full.flags & TFHD_DEFAULT_SAMPLE_DURATION_PRESENT) !== 0) {
|
|
238
|
+
if (offset + 4 > box.end) return null;
|
|
239
|
+
defaultSampleDuration = dataView.getUint32(offset, false);
|
|
240
|
+
offset += 4;
|
|
241
|
+
}
|
|
242
|
+
let defaultSampleSize;
|
|
243
|
+
if ((full.flags & TFHD_DEFAULT_SAMPLE_SIZE_PRESENT) !== 0) {
|
|
244
|
+
if (offset + 4 > box.end) return null;
|
|
245
|
+
defaultSampleSize = dataView.getUint32(offset, false);
|
|
246
|
+
offset += 4;
|
|
247
|
+
}
|
|
248
|
+
if ((full.flags & TFHD_DEFAULT_SAMPLE_FLAGS_PRESENT) !== 0) {
|
|
249
|
+
if (offset + 4 > box.end) return null;
|
|
250
|
+
offset += 4;
|
|
251
|
+
}
|
|
252
|
+
if (offset !== box.end) return null;
|
|
253
|
+
return {
|
|
254
|
+
trackId,
|
|
255
|
+
...defaultSampleDuration === void 0 ? {} : { defaultSampleDuration },
|
|
256
|
+
...defaultSampleSize === void 0 ? {} : { defaultSampleSize }
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function parseTfdt(data, box) {
|
|
260
|
+
const full = parseFullBox(data, box);
|
|
261
|
+
if (!full || full.flags !== 0) return null;
|
|
262
|
+
if (full.version === 0 && box.end - full.bodyStart === 4) {
|
|
263
|
+
return BigInt(view(data).getUint32(full.bodyStart, false));
|
|
264
|
+
}
|
|
265
|
+
if (full.version === 1 && box.end - full.bodyStart === 8) {
|
|
266
|
+
return readU64(data, full.bodyStart);
|
|
267
|
+
}
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
function parseMdatLayout(data, offset) {
|
|
271
|
+
if (offset < 0 || offset + 8 > data.length || boxType(data, offset + 4) !== "mdat") return null;
|
|
272
|
+
const dataView = view(data);
|
|
273
|
+
const shortSize = dataView.getUint32(offset, false);
|
|
274
|
+
let headerSize = 8;
|
|
275
|
+
let declaredSize;
|
|
276
|
+
if (shortSize === 0) {
|
|
277
|
+
return null;
|
|
278
|
+
} else if (shortSize === 1) {
|
|
279
|
+
const extended = readU64(data, offset + 8);
|
|
280
|
+
if (extended === null) return null;
|
|
281
|
+
headerSize = 16;
|
|
282
|
+
declaredSize = extended;
|
|
283
|
+
} else {
|
|
284
|
+
declaredSize = BigInt(shortSize);
|
|
285
|
+
}
|
|
286
|
+
if (declaredSize < BigInt(headerSize) || declaredSize < BigInt(data.length - offset)) {
|
|
287
|
+
return null;
|
|
288
|
+
}
|
|
289
|
+
const declaredEnd = BigInt(offset) + declaredSize;
|
|
290
|
+
if (declaredEnd > U64_MAX) return null;
|
|
291
|
+
return { dataStart: BigInt(offset + headerSize), declaredEnd };
|
|
292
|
+
}
|
|
293
|
+
function resolvedDefault(entryValue, tfhdValue, trexValue) {
|
|
294
|
+
const value = entryValue ?? tfhdValue ?? trexValue;
|
|
295
|
+
return value === void 0 || value === 0 ? null : value;
|
|
296
|
+
}
|
|
297
|
+
function parseTrunSamples(data, box, moofStart, baseDecodeTime, tfhd, track, mdat, maxSamples) {
|
|
298
|
+
const full = parseFullBox(data, box);
|
|
299
|
+
if (!full || full.version !== 0 && full.version !== 1 || (full.flags & ~TRUN_KNOWN_FLAGS) !== 0 || (full.flags & TRUN_DATA_OFFSET_PRESENT) === 0 || (full.flags & TRUN_FIRST_SAMPLE_FLAGS_PRESENT) !== 0 && (full.flags & TRUN_SAMPLE_FLAGS_PRESENT) !== 0) {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
const dataView = view(data);
|
|
303
|
+
let offset = full.bodyStart;
|
|
304
|
+
if (offset + 8 > box.end) return null;
|
|
305
|
+
const sampleCount = dataView.getUint32(offset, false);
|
|
306
|
+
offset += 4;
|
|
307
|
+
if (sampleCount === 0 || sampleCount > maxSamples) return null;
|
|
308
|
+
const relativeDataOffset = dataView.getInt32(offset, false);
|
|
309
|
+
offset += 4;
|
|
310
|
+
if (relativeDataOffset < 0) return null;
|
|
311
|
+
const dataOffset = BigInt(relativeDataOffset);
|
|
312
|
+
const absoluteDataOffset = BigInt(moofStart) + dataOffset;
|
|
313
|
+
if (absoluteDataOffset > BigInt(data.length) || absoluteDataOffset < mdat.dataStart) return null;
|
|
314
|
+
if ((full.flags & TRUN_FIRST_SAMPLE_FLAGS_PRESENT) !== 0) {
|
|
315
|
+
if (offset + 4 > box.end) return null;
|
|
316
|
+
offset += 4;
|
|
317
|
+
}
|
|
318
|
+
let decodeTime = baseDecodeTime;
|
|
319
|
+
let bytePosition = dataOffset;
|
|
320
|
+
const samples = [];
|
|
321
|
+
for (let index = 0; index < sampleCount; index++) {
|
|
322
|
+
let entryDuration;
|
|
323
|
+
if ((full.flags & TRUN_SAMPLE_DURATION_PRESENT) !== 0) {
|
|
324
|
+
if (offset + 4 > box.end) return null;
|
|
325
|
+
entryDuration = dataView.getUint32(offset, false);
|
|
326
|
+
offset += 4;
|
|
327
|
+
}
|
|
328
|
+
let entrySize;
|
|
329
|
+
if ((full.flags & TRUN_SAMPLE_SIZE_PRESENT) !== 0) {
|
|
330
|
+
if (offset + 4 > box.end) return null;
|
|
331
|
+
entrySize = dataView.getUint32(offset, false);
|
|
332
|
+
offset += 4;
|
|
333
|
+
}
|
|
334
|
+
if ((full.flags & TRUN_SAMPLE_FLAGS_PRESENT) !== 0) {
|
|
335
|
+
if (offset + 4 > box.end) return null;
|
|
336
|
+
offset += 4;
|
|
337
|
+
}
|
|
338
|
+
let compositionOffset = 0;
|
|
339
|
+
if ((full.flags & TRUN_SAMPLE_CTS_OFFSET_PRESENT) !== 0) {
|
|
340
|
+
if (offset + 4 > box.end) return null;
|
|
341
|
+
compositionOffset = full.version === 1 ? dataView.getInt32(offset, false) : dataView.getUint32(offset, false);
|
|
342
|
+
offset += 4;
|
|
343
|
+
}
|
|
344
|
+
if (offset > box.end) return null;
|
|
345
|
+
const duration = resolvedDefault(
|
|
346
|
+
entryDuration,
|
|
347
|
+
tfhd.defaultSampleDuration,
|
|
348
|
+
track.defaultSampleDuration
|
|
349
|
+
);
|
|
350
|
+
const size = resolvedDefault(entrySize, tfhd.defaultSampleSize, track.defaultSampleSize);
|
|
351
|
+
if (duration === null || size === null) return null;
|
|
352
|
+
const sampleEnd = bytePosition + BigInt(size);
|
|
353
|
+
const absoluteSampleEnd = BigInt(moofStart) + sampleEnd;
|
|
354
|
+
if (absoluteSampleEnd > mdat.declaredEnd || absoluteSampleEnd > U64_MAX) return null;
|
|
355
|
+
const presentationTime = decodeTime + BigInt(compositionOffset);
|
|
356
|
+
if (presentationTime < I64_MIN || presentationTime > I64_MAX) return null;
|
|
357
|
+
samples.push({
|
|
358
|
+
decodeTime,
|
|
359
|
+
presentationTime,
|
|
360
|
+
duration,
|
|
361
|
+
timescale: track.timescale,
|
|
362
|
+
size,
|
|
363
|
+
bytePosition
|
|
364
|
+
});
|
|
365
|
+
decodeTime += BigInt(duration);
|
|
366
|
+
if (decodeTime > U64_MAX) return null;
|
|
367
|
+
bytePosition = sampleEnd;
|
|
368
|
+
}
|
|
369
|
+
return offset === box.end ? samples : null;
|
|
370
|
+
}
|
|
371
|
+
function parseIsoBmffMovieFragmentTiming(data, track, maxSamples) {
|
|
372
|
+
if (!Number.isInteger(maxSamples) || maxSamples <= 0) return null;
|
|
373
|
+
const first = parseBox(data, 0, data.length);
|
|
374
|
+
if (!first) return null;
|
|
375
|
+
const moof = first.type === "styp" ? parseBox(data, first.end, data.length) : first;
|
|
376
|
+
if (!moof || moof.type !== "moof" || moof.end >= data.length) return null;
|
|
377
|
+
const moofChildren = children(data, moof);
|
|
378
|
+
if (!moofChildren) return null;
|
|
379
|
+
const mfhd = exactlyOne(moofChildren, "mfhd");
|
|
380
|
+
const traf = exactlyOne(moofChildren, "traf");
|
|
381
|
+
if (!mfhd || !traf) return null;
|
|
382
|
+
const movieFragmentSequenceNumber = parseMfhdSequence(data, mfhd);
|
|
383
|
+
if (movieFragmentSequenceNumber === null || movieFragmentSequenceNumber === 0) return null;
|
|
384
|
+
const trafChildren = children(data, traf);
|
|
385
|
+
if (!trafChildren) return null;
|
|
386
|
+
const tfhdBox = exactlyOne(trafChildren, "tfhd");
|
|
387
|
+
const tfdtBox = exactlyOne(trafChildren, "tfdt");
|
|
388
|
+
const trunBox = exactlyOne(trafChildren, "trun");
|
|
389
|
+
if (!tfhdBox || !tfdtBox || !trunBox) return null;
|
|
390
|
+
const tfhd = parseTfhd(data, tfhdBox);
|
|
391
|
+
const baseDecodeTime = parseTfdt(data, tfdtBox);
|
|
392
|
+
if (!tfhd || tfhd.trackId !== track.trackId || baseDecodeTime === null) return null;
|
|
393
|
+
const mdat = parseMdatLayout(data, moof.end);
|
|
394
|
+
if (!mdat) return null;
|
|
395
|
+
const samples = parseTrunSamples(
|
|
396
|
+
data,
|
|
397
|
+
trunBox,
|
|
398
|
+
moof.start,
|
|
399
|
+
baseDecodeTime,
|
|
400
|
+
tfhd,
|
|
401
|
+
track,
|
|
402
|
+
mdat,
|
|
403
|
+
maxSamples
|
|
404
|
+
);
|
|
405
|
+
if (!samples) return null;
|
|
406
|
+
return { movieFragmentSequenceNumber, samples };
|
|
407
|
+
}
|
|
408
|
+
function sameTrack(a, b) {
|
|
409
|
+
return a.trackId === b.trackId && a.timescale === b.timescale && a.defaultSampleDuration === b.defaultSampleDuration && a.defaultSampleSize === b.defaultSampleSize;
|
|
410
|
+
}
|
|
411
|
+
function sameSample(a, b) {
|
|
412
|
+
return a.decodeTime === b.decodeTime && a.presentationTime === b.presentationTime && a.duration === b.duration && a.timescale === b.timescale && a.size === b.size && a.bytePosition === b.bytePosition;
|
|
413
|
+
}
|
|
414
|
+
var IsoBmffTimingResolver = class {
|
|
415
|
+
constructor(maxPendingSamples) {
|
|
416
|
+
this.maxPendingSamples = maxPendingSamples;
|
|
417
|
+
if (!Number.isInteger(maxPendingSamples) || maxPendingSamples <= 0) {
|
|
418
|
+
throw new Error("[IsoBmffTimingResolver] maxPendingSamples must be a positive integer");
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
#track = null;
|
|
422
|
+
#fragments = /* @__PURE__ */ new Map();
|
|
423
|
+
#pendingSamples = 0;
|
|
424
|
+
#evictedSamples = 0;
|
|
425
|
+
#lastMovieFragmentRejection = null;
|
|
426
|
+
get pendingSampleCount() {
|
|
427
|
+
return this.#pendingSamples;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Slots reclaimed by window displacement rather than by delivery or
|
|
431
|
+
* abandonment. Deliberately separate from the combiner's own release count:
|
|
432
|
+
* "nobody ever saw this sample" and "the combiner gave up on it" are
|
|
433
|
+
* different failures with different owners, and one number cannot say which.
|
|
434
|
+
*/
|
|
435
|
+
get evictedSampleCount() {
|
|
436
|
+
return this.#evictedSamples;
|
|
437
|
+
}
|
|
438
|
+
/** Typed reason for the most recent rejected movie fragment. */
|
|
439
|
+
get lastMovieFragmentRejection() {
|
|
440
|
+
return this.#lastMovieFragmentRejection;
|
|
441
|
+
}
|
|
442
|
+
addInitialization(data) {
|
|
443
|
+
const timing = parseIsoBmffInitializationTiming(data);
|
|
444
|
+
if (!timing) return false;
|
|
445
|
+
if (this.#track) return sameTrack(this.#track, timing);
|
|
446
|
+
this.#track = timing;
|
|
447
|
+
return true;
|
|
448
|
+
}
|
|
449
|
+
addMovieFragment(mpuSequenceNumber, data, additionalSampleLimit = this.maxPendingSamples) {
|
|
450
|
+
this.#lastMovieFragmentRejection = null;
|
|
451
|
+
if (!Number.isInteger(additionalSampleLimit) || additionalSampleLimit < 0) {
|
|
452
|
+
this.#lastMovieFragmentRejection = "invalid";
|
|
453
|
+
return false;
|
|
454
|
+
}
|
|
455
|
+
if (!this.#track || !isU32(mpuSequenceNumber)) {
|
|
456
|
+
this.#lastMovieFragmentRejection = "invalid";
|
|
457
|
+
return false;
|
|
458
|
+
}
|
|
459
|
+
const parsed = parseIsoBmffMovieFragmentTiming(
|
|
460
|
+
data,
|
|
461
|
+
this.#track,
|
|
462
|
+
this.maxPendingSamples
|
|
463
|
+
);
|
|
464
|
+
if (!parsed) {
|
|
465
|
+
this.#lastMovieFragmentRejection = "invalid";
|
|
466
|
+
return false;
|
|
467
|
+
}
|
|
468
|
+
const key = fragmentKey(mpuSequenceNumber, parsed.movieFragmentSequenceNumber);
|
|
469
|
+
const existing = this.#fragments.get(key);
|
|
470
|
+
if (existing) {
|
|
471
|
+
return existing.length === parsed.samples.length && existing.every(
|
|
472
|
+
(sample, index) => sample !== null && sameSample(sample, parsed.samples[index])
|
|
473
|
+
);
|
|
474
|
+
}
|
|
475
|
+
let freed = 0;
|
|
476
|
+
while (this.#fragments.size > 0 && (this.#pendingSamples + parsed.samples.length > this.maxPendingSamples || parsed.samples.length - freed > additionalSampleLimit)) {
|
|
477
|
+
freed += this.#evictOldestFragment();
|
|
478
|
+
}
|
|
479
|
+
if (parsed.samples.length - freed > additionalSampleLimit) {
|
|
480
|
+
this.#lastMovieFragmentRejection = "budget";
|
|
481
|
+
return false;
|
|
482
|
+
}
|
|
483
|
+
if (this.#pendingSamples + parsed.samples.length > this.maxPendingSamples) {
|
|
484
|
+
this.#lastMovieFragmentRejection = "budget";
|
|
485
|
+
return false;
|
|
486
|
+
}
|
|
487
|
+
this.#fragments.set(key, [...parsed.samples]);
|
|
488
|
+
this.#pendingSamples += parsed.samples.length;
|
|
489
|
+
return true;
|
|
490
|
+
}
|
|
491
|
+
sampleTiming(mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber) {
|
|
492
|
+
if (!isU32(mpuSequenceNumber) || !isU32(movieFragmentSequenceNumber) || movieFragmentSequenceNumber === 0 || !isU32(sampleNumber) || sampleNumber === 0) {
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
const samples = this.#fragments.get(
|
|
496
|
+
fragmentKey(mpuSequenceNumber, movieFragmentSequenceNumber)
|
|
497
|
+
);
|
|
498
|
+
return samples?.[sampleNumber - 1] ?? null;
|
|
499
|
+
}
|
|
500
|
+
consumeSample(mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber, expected) {
|
|
501
|
+
const samples = this.#fragments.get(
|
|
502
|
+
fragmentKey(mpuSequenceNumber, movieFragmentSequenceNumber)
|
|
503
|
+
);
|
|
504
|
+
const sample = samples?.[sampleNumber - 1];
|
|
505
|
+
if (!sample || !sameSample(sample, expected)) return false;
|
|
506
|
+
return this.#clearSlot(mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber);
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Free the budget slot of a sample that will never be delivered.
|
|
510
|
+
*
|
|
511
|
+
* `consumeSample` is the delivery path and is the only decrement on a
|
|
512
|
+
* healthy stream. A sample whose data units never complete is never
|
|
513
|
+
* delivered; window displacement in `addMovieFragment` eventually reclaims
|
|
514
|
+
* it, but only after it has aged out of the whole window. This path frees
|
|
515
|
+
* the slot as soon as the combiner knows the sample is gone, so the budget
|
|
516
|
+
* tracks what is actually in flight rather than what has merely aged.
|
|
517
|
+
*
|
|
518
|
+
* The caller is whoever abandoned the sample, so the release is driven by
|
|
519
|
+
* the abandonment itself rather than by a timer, an LRU, or an age bound --
|
|
520
|
+
* the slot is freed exactly when its sample provably cannot arrive, which
|
|
521
|
+
* is a protocol event the combiner already detects and counts.
|
|
522
|
+
*
|
|
523
|
+
* Deliberately takes no `expected` timing: the caller is discarding, not
|
|
524
|
+
* matching, and requiring it would make the release fail exactly when the
|
|
525
|
+
* timing entry is the thing being reclaimed. Returns false when the slot
|
|
526
|
+
* was already freed, so a double release cannot drive the count negative.
|
|
527
|
+
*/
|
|
528
|
+
releaseSample(mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber) {
|
|
529
|
+
return this.#clearSlot(mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber);
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Drop the oldest pending fragment whole and return the slots it held.
|
|
533
|
+
*
|
|
534
|
+
* Oldest is insertion order, which for a moof stream is arrival order, so
|
|
535
|
+
* this is the least-recently-declared timing -- the entries least likely to
|
|
536
|
+
* still have data units in flight.
|
|
537
|
+
*/
|
|
538
|
+
#evictOldestFragment() {
|
|
539
|
+
const oldest = this.#fragments.keys().next().value;
|
|
540
|
+
if (oldest === void 0) return 0;
|
|
541
|
+
const samples = this.#fragments.get(oldest);
|
|
542
|
+
let live = 0;
|
|
543
|
+
for (const sample of samples) if (sample !== null) live++;
|
|
544
|
+
this.#fragments.delete(oldest);
|
|
545
|
+
this.#pendingSamples -= live;
|
|
546
|
+
this.#evictedSamples += live;
|
|
547
|
+
return live;
|
|
548
|
+
}
|
|
549
|
+
/** Null one slot, decrement the budget, and drop the fragment when empty. */
|
|
550
|
+
#clearSlot(mpuSequenceNumber, movieFragmentSequenceNumber, sampleNumber) {
|
|
551
|
+
if (!isU32(mpuSequenceNumber) || !isU32(movieFragmentSequenceNumber) || movieFragmentSequenceNumber === 0 || !isU32(sampleNumber) || sampleNumber === 0) {
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
const key = fragmentKey(mpuSequenceNumber, movieFragmentSequenceNumber);
|
|
555
|
+
const samples = this.#fragments.get(key);
|
|
556
|
+
const index = sampleNumber - 1;
|
|
557
|
+
if (!samples || !samples[index]) return false;
|
|
558
|
+
samples[index] = null;
|
|
559
|
+
this.#pendingSamples--;
|
|
560
|
+
if (samples.every((value) => value === null)) this.#fragments.delete(key);
|
|
561
|
+
return true;
|
|
562
|
+
}
|
|
563
|
+
reset() {
|
|
564
|
+
this.#track = null;
|
|
565
|
+
this.#fragments.clear();
|
|
566
|
+
this.#pendingSamples = 0;
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
function fragmentKey(mpuSequenceNumber, movieFragmentSequenceNumber) {
|
|
570
|
+
return `${mpuSequenceNumber}:${movieFragmentSequenceNumber}`;
|
|
571
|
+
}
|
|
572
|
+
function isU32(value) {
|
|
573
|
+
return Number.isInteger(value) && value >= 0 && value <= 4294967295;
|
|
574
|
+
}
|
|
575
|
+
function mediaTicksToMicroseconds(ticks, timescale) {
|
|
576
|
+
if (!Number.isInteger(timescale) || timescale <= 0) return null;
|
|
577
|
+
const numerator = ticks * MICROSECONDS_PER_SECOND;
|
|
578
|
+
const scale = BigInt(timescale);
|
|
579
|
+
const whole = numerator / scale;
|
|
580
|
+
const remainder = numerator % scale;
|
|
581
|
+
if (whole < BigInt(Number.MIN_SAFE_INTEGER) || whole > BigInt(Number.MAX_SAFE_INTEGER)) {
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
const result = Number(whole) + Number(remainder) / timescale;
|
|
585
|
+
return Number.isFinite(result) ? result : null;
|
|
586
|
+
}
|
|
587
|
+
export {
|
|
588
|
+
IsoBmffTimingResolver,
|
|
589
|
+
mediaTicksToMicroseconds,
|
|
590
|
+
parseIsoBmffInitializationTiming,
|
|
591
|
+
parseIsoBmffMovieFragmentTiming
|
|
592
|
+
};
|
|
593
|
+
//# sourceMappingURL=iso-bmff-timing.js.map
|