@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,781 @@
|
|
|
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 __privateWrapper = (obj, member, setter, getter) => ({
|
|
9
|
+
set _(value) {
|
|
10
|
+
__privateSet(obj, member, value, setter);
|
|
11
|
+
},
|
|
12
|
+
get _() {
|
|
13
|
+
return __privateGet(obj, member, getter);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// src/mmtp-to-cmaf.ts
|
|
18
|
+
function box(type, ...children) {
|
|
19
|
+
let size = 8;
|
|
20
|
+
for (const c of children) size += c.length;
|
|
21
|
+
const buf = new Uint8Array(size);
|
|
22
|
+
new DataView(buf.buffer).setUint32(0, size);
|
|
23
|
+
buf[4] = type.charCodeAt(0);
|
|
24
|
+
buf[5] = type.charCodeAt(1);
|
|
25
|
+
buf[6] = type.charCodeAt(2);
|
|
26
|
+
buf[7] = type.charCodeAt(3);
|
|
27
|
+
let pos = 8;
|
|
28
|
+
for (const c of children) {
|
|
29
|
+
buf.set(c, pos);
|
|
30
|
+
pos += c.length;
|
|
31
|
+
}
|
|
32
|
+
return buf;
|
|
33
|
+
}
|
|
34
|
+
function fullBox(type, version, flags, ...children) {
|
|
35
|
+
let size = 12;
|
|
36
|
+
for (const c of children) size += c.length;
|
|
37
|
+
const buf = new Uint8Array(size);
|
|
38
|
+
const dv = new DataView(buf.buffer);
|
|
39
|
+
dv.setUint32(0, size);
|
|
40
|
+
buf[4] = type.charCodeAt(0);
|
|
41
|
+
buf[5] = type.charCodeAt(1);
|
|
42
|
+
buf[6] = type.charCodeAt(2);
|
|
43
|
+
buf[7] = type.charCodeAt(3);
|
|
44
|
+
dv.setUint32(8, version << 24 | flags & 16777215);
|
|
45
|
+
let pos = 12;
|
|
46
|
+
for (const c of children) {
|
|
47
|
+
buf.set(c, pos);
|
|
48
|
+
pos += c.length;
|
|
49
|
+
}
|
|
50
|
+
return buf;
|
|
51
|
+
}
|
|
52
|
+
function u32(v) {
|
|
53
|
+
const b = new Uint8Array(4);
|
|
54
|
+
new DataView(b.buffer).setUint32(0, v);
|
|
55
|
+
return b;
|
|
56
|
+
}
|
|
57
|
+
var KEYFRAME_FLAGS = 33554432;
|
|
58
|
+
var DELTA_FLAGS = 16842752;
|
|
59
|
+
var UINT32_MAX = 4294967295;
|
|
60
|
+
var MAX_TRACK_ID = UINT32_MAX - 1;
|
|
61
|
+
var INT32_MIN = -2147483648;
|
|
62
|
+
var INT32_MAX = 2147483647;
|
|
63
|
+
function assertTrackId(trackId, label) {
|
|
64
|
+
if (!Number.isInteger(trackId) || trackId <= 0 || trackId > MAX_TRACK_ID) {
|
|
65
|
+
throw new RangeError(`${label} must be an integer in 1..${MAX_TRACK_ID}, got ${trackId}`);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function assertTimescale(timescale, label) {
|
|
69
|
+
if (!Number.isInteger(timescale) || timescale <= 0 || timescale > UINT32_MAX) {
|
|
70
|
+
throw new RangeError(`${label} must be an integer in 1..${UINT32_MAX}, got ${timescale}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function assertCompositionTimeOffsets(samples) {
|
|
74
|
+
for (let i = 0; i < samples.length; i++) {
|
|
75
|
+
const offset = samples[i].compositionTimeOffset;
|
|
76
|
+
if (offset !== void 0 && (!Number.isInteger(offset) || offset < INT32_MIN || offset > INT32_MAX)) {
|
|
77
|
+
throw new RangeError(
|
|
78
|
+
`sample ${i} compositionTimeOffset must be an integer in ${INT32_MIN}..${INT32_MAX}, got ${offset}`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function encodeMultiSampleSegment(samples, baseDecodeTime, sequence, trackId = 1) {
|
|
84
|
+
if (samples.length === 0) return new Uint8Array(0);
|
|
85
|
+
assertTrackId(trackId, "trackId");
|
|
86
|
+
assertCompositionTimeOffsets(samples);
|
|
87
|
+
const mfhd = fullBox("mfhd", 0, 0, u32(sequence));
|
|
88
|
+
const tfhd = fullBox("tfhd", 0, 131072, u32(trackId));
|
|
89
|
+
const tfdtBody = new Uint8Array(8);
|
|
90
|
+
const tfdtView = new DataView(tfdtBody.buffer);
|
|
91
|
+
tfdtView.setUint32(0, Math.floor(baseDecodeTime / 4294967296));
|
|
92
|
+
tfdtView.setUint32(4, baseDecodeTime >>> 0);
|
|
93
|
+
const tfdt = fullBox("tfdt", 1, 0, tfdtBody);
|
|
94
|
+
const hasCompositionTimeOffset = samples.some((sample) => sample.compositionTimeOffset !== void 0);
|
|
95
|
+
const trunVersion = hasCompositionTimeOffset ? 1 : 0;
|
|
96
|
+
const trunFlags = 1793 | (hasCompositionTimeOffset ? 2048 : 0);
|
|
97
|
+
const sampleCount = samples.length;
|
|
98
|
+
const sampleEntrySize = hasCompositionTimeOffset ? 16 : 12;
|
|
99
|
+
const trunBody = new Uint8Array(8 + sampleCount * sampleEntrySize);
|
|
100
|
+
const trunView = new DataView(trunBody.buffer);
|
|
101
|
+
trunView.setUint32(0, sampleCount);
|
|
102
|
+
trunView.setUint32(4, 0);
|
|
103
|
+
for (let i = 0; i < sampleCount; i++) {
|
|
104
|
+
const s = samples[i];
|
|
105
|
+
const off = 8 + i * sampleEntrySize;
|
|
106
|
+
trunView.setUint32(off, s.duration >>> 0);
|
|
107
|
+
trunView.setUint32(off + 4, s.data.length);
|
|
108
|
+
trunView.setUint32(off + 8, s.keyframe ? KEYFRAME_FLAGS : DELTA_FLAGS);
|
|
109
|
+
if (hasCompositionTimeOffset) {
|
|
110
|
+
trunView.setInt32(off + 12, s.compositionTimeOffset ?? 0);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const trun = fullBox("trun", trunVersion, trunFlags, trunBody);
|
|
114
|
+
const traf = box("traf", tfhd, tfdt, trun);
|
|
115
|
+
const moof = box("moof", mfhd, traf);
|
|
116
|
+
let mdatSize = 0;
|
|
117
|
+
for (const s of samples) mdatSize += s.data.length;
|
|
118
|
+
const mdatPayload = new Uint8Array(mdatSize);
|
|
119
|
+
let pos = 0;
|
|
120
|
+
for (const s of samples) {
|
|
121
|
+
mdatPayload.set(s.data, pos);
|
|
122
|
+
pos += s.data.length;
|
|
123
|
+
}
|
|
124
|
+
const mdat = box("mdat", mdatPayload);
|
|
125
|
+
const dataOffsetPos = 8 + mfhd.length + 8 + tfhd.length + tfdt.length + 12 + 4;
|
|
126
|
+
new DataView(moof.buffer).setUint32(dataOffsetPos, moof.length + 8);
|
|
127
|
+
const result = new Uint8Array(moof.length + mdat.length);
|
|
128
|
+
result.set(moof, 0);
|
|
129
|
+
result.set(mdat, moof.length);
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
function generateGreenFillNAL(avcC, width, height) {
|
|
133
|
+
if (avcC.length < 8) return new Uint8Array(0);
|
|
134
|
+
const lengthSize = (avcC[4] & 3) + 1;
|
|
135
|
+
let offset = 5;
|
|
136
|
+
const numSPS = avcC[offset++] & 31;
|
|
137
|
+
const nals = [];
|
|
138
|
+
for (let i = 0; i < numSPS; i++) {
|
|
139
|
+
if (offset + 2 > avcC.length) break;
|
|
140
|
+
const spsLen = avcC[offset] << 8 | avcC[offset + 1];
|
|
141
|
+
offset += 2;
|
|
142
|
+
if (offset + spsLen > avcC.length) break;
|
|
143
|
+
const sps = avcC.subarray(offset, offset + spsLen);
|
|
144
|
+
const framed = new Uint8Array(4 + sps.length);
|
|
145
|
+
new DataView(framed.buffer).setUint32(0, sps.length);
|
|
146
|
+
framed.set(sps, 4);
|
|
147
|
+
nals.push(framed);
|
|
148
|
+
offset += spsLen;
|
|
149
|
+
}
|
|
150
|
+
if (offset < avcC.length) {
|
|
151
|
+
const numPPS = avcC[offset++];
|
|
152
|
+
for (let i = 0; i < numPPS; i++) {
|
|
153
|
+
if (offset + 2 > avcC.length) break;
|
|
154
|
+
const ppsLen = avcC[offset] << 8 | avcC[offset + 1];
|
|
155
|
+
offset += 2;
|
|
156
|
+
if (offset + ppsLen > avcC.length) break;
|
|
157
|
+
const pps = avcC.subarray(offset, offset + ppsLen);
|
|
158
|
+
const framed = new Uint8Array(4 + pps.length);
|
|
159
|
+
new DataView(framed.buffer).setUint32(0, pps.length);
|
|
160
|
+
framed.set(pps, 4);
|
|
161
|
+
nals.push(framed);
|
|
162
|
+
offset += ppsLen;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
const mbWidth = Math.ceil(width / 16);
|
|
166
|
+
const mbHeight = Math.ceil(height / 16);
|
|
167
|
+
const totalMBs = mbWidth * mbHeight;
|
|
168
|
+
const idrSlice = new Uint8Array([
|
|
169
|
+
101,
|
|
170
|
+
// nal_ref_idc=3, nal_type=5 (IDR)
|
|
171
|
+
136,
|
|
172
|
+
// slice header: first_mb_in_slice=0, slice_type=7 (I)
|
|
173
|
+
128,
|
|
174
|
+
// pps_id=0, frame_num=0, idr_pic_id=0
|
|
175
|
+
64
|
|
176
|
+
// slice data: mb_skip_run covering remaining MBs
|
|
177
|
+
// Truncated — decoder will error-conceal remaining MBs as green/gray
|
|
178
|
+
]);
|
|
179
|
+
const idrFramed = new Uint8Array(4 + idrSlice.length);
|
|
180
|
+
new DataView(idrFramed.buffer).setUint32(0, idrSlice.length);
|
|
181
|
+
idrFramed.set(idrSlice, 4);
|
|
182
|
+
nals.push(idrFramed);
|
|
183
|
+
let totalLen = 0;
|
|
184
|
+
for (const n of nals) totalLen += n.length;
|
|
185
|
+
const result = new Uint8Array(totalLen);
|
|
186
|
+
let p = 0;
|
|
187
|
+
for (const n of nals) {
|
|
188
|
+
result.set(n, p);
|
|
189
|
+
p += n.length;
|
|
190
|
+
}
|
|
191
|
+
return result;
|
|
192
|
+
}
|
|
193
|
+
function generateSilenceFrame(codec, sampleRate, channels) {
|
|
194
|
+
if (codec.startsWith("opus") || codec.startsWith("Opus")) {
|
|
195
|
+
return generateSilenceOpus(channels);
|
|
196
|
+
}
|
|
197
|
+
return generateSilenceAAC(sampleRate, channels);
|
|
198
|
+
}
|
|
199
|
+
function generateSilenceAAC(sampleRate, channels) {
|
|
200
|
+
if (channels >= 2) {
|
|
201
|
+
return new Uint8Array([
|
|
202
|
+
33,
|
|
203
|
+
0,
|
|
204
|
+
73,
|
|
205
|
+
144,
|
|
206
|
+
2,
|
|
207
|
+
25,
|
|
208
|
+
0,
|
|
209
|
+
35,
|
|
210
|
+
128
|
|
211
|
+
]);
|
|
212
|
+
}
|
|
213
|
+
return new Uint8Array([
|
|
214
|
+
1,
|
|
215
|
+
0,
|
|
216
|
+
2,
|
|
217
|
+
0,
|
|
218
|
+
0,
|
|
219
|
+
0,
|
|
220
|
+
0
|
|
221
|
+
]);
|
|
222
|
+
}
|
|
223
|
+
function generateSilenceOpus(channels) {
|
|
224
|
+
return new Uint8Array([248, 255, 254]);
|
|
225
|
+
}
|
|
226
|
+
function normalizeAacSampleForCmaf(data) {
|
|
227
|
+
if (data.length < 7 || data[0] !== 255 || (data[1] & 246) !== 240) {
|
|
228
|
+
return data;
|
|
229
|
+
}
|
|
230
|
+
const headerLength = data[1] & 1 ? 7 : 9;
|
|
231
|
+
if (data.length <= headerLength) return data;
|
|
232
|
+
const frameLength = (data[3] & 3) << 11 | data[4] << 3 | (data[5] & 224) >>> 5;
|
|
233
|
+
if (frameLength !== data.length || frameLength <= headerLength) return data;
|
|
234
|
+
return data.subarray(headerLength);
|
|
235
|
+
}
|
|
236
|
+
function encodeDataSegment(data, timestamp, duration, keyframe, sequence, trackId = 1, compositionTimeOffset) {
|
|
237
|
+
assertTrackId(trackId, "trackId");
|
|
238
|
+
assertCompositionTimeOffsets([{ compositionTimeOffset }]);
|
|
239
|
+
if (compositionTimeOffset !== void 0) {
|
|
240
|
+
return encodeMultiSampleSegment(
|
|
241
|
+
[{ data, duration, keyframe, compositionTimeOffset }],
|
|
242
|
+
timestamp,
|
|
243
|
+
sequence,
|
|
244
|
+
trackId
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
const sampleFlags = keyframe ? KEYFRAME_FLAGS : DELTA_FLAGS;
|
|
248
|
+
const mfhd = fullBox("mfhd", 0, 0, u32(sequence));
|
|
249
|
+
const tfhd = fullBox("tfhd", 0, 131072, u32(trackId));
|
|
250
|
+
const tfdtBody = new Uint8Array(8);
|
|
251
|
+
const tfdtView = new DataView(tfdtBody.buffer);
|
|
252
|
+
tfdtView.setUint32(0, Math.floor(timestamp / 4294967296));
|
|
253
|
+
tfdtView.setUint32(4, timestamp >>> 0);
|
|
254
|
+
const tfdt = fullBox("tfdt", 1, 0, tfdtBody);
|
|
255
|
+
const trunBody = new Uint8Array(20);
|
|
256
|
+
const trunView = new DataView(trunBody.buffer);
|
|
257
|
+
trunView.setUint32(0, 1);
|
|
258
|
+
trunView.setUint32(4, 0);
|
|
259
|
+
trunView.setUint32(8, duration >>> 0);
|
|
260
|
+
trunView.setUint32(12, data.length);
|
|
261
|
+
trunView.setUint32(16, sampleFlags);
|
|
262
|
+
const trun = fullBox("trun", 0, 1793, trunBody);
|
|
263
|
+
const traf = box("traf", tfhd, tfdt, trun);
|
|
264
|
+
const moof = box("moof", mfhd, traf);
|
|
265
|
+
const mdat = box("mdat", data);
|
|
266
|
+
const dataOffsetPos = 8 + mfhd.length + 8 + tfhd.length + tfdt.length + 12 + 4;
|
|
267
|
+
new DataView(moof.buffer).setUint32(dataOffsetPos, moof.length + 8);
|
|
268
|
+
const result = new Uint8Array(moof.length + mdat.length);
|
|
269
|
+
result.set(moof, 0);
|
|
270
|
+
result.set(mdat, moof.length);
|
|
271
|
+
return result;
|
|
272
|
+
}
|
|
273
|
+
function buildVideoInitSegment(avcC, width, height, timescale = 1e6, trackId = 1) {
|
|
274
|
+
assertTrackId(trackId, "video trackId");
|
|
275
|
+
assertTimescale(timescale, "video timescale");
|
|
276
|
+
const ftyp = box("ftyp", new Uint8Array([
|
|
277
|
+
105,
|
|
278
|
+
115,
|
|
279
|
+
111,
|
|
280
|
+
109,
|
|
281
|
+
0,
|
|
282
|
+
0,
|
|
283
|
+
2,
|
|
284
|
+
0,
|
|
285
|
+
105,
|
|
286
|
+
115,
|
|
287
|
+
111,
|
|
288
|
+
109,
|
|
289
|
+
105,
|
|
290
|
+
115,
|
|
291
|
+
111,
|
|
292
|
+
54,
|
|
293
|
+
109,
|
|
294
|
+
112,
|
|
295
|
+
52,
|
|
296
|
+
49
|
|
297
|
+
]));
|
|
298
|
+
const avcCBox = box("avcC", avcC);
|
|
299
|
+
const avc1Body = new Uint8Array(78 + avcCBox.length);
|
|
300
|
+
const avc1View = new DataView(avc1Body.buffer);
|
|
301
|
+
avc1View.setUint16(6, 1);
|
|
302
|
+
avc1View.setUint16(24, width);
|
|
303
|
+
avc1View.setUint16(26, height);
|
|
304
|
+
avc1View.setUint32(28, 4718592);
|
|
305
|
+
avc1View.setUint32(32, 4718592);
|
|
306
|
+
avc1View.setUint16(40, 1);
|
|
307
|
+
avc1View.setUint16(74, 24);
|
|
308
|
+
avc1View.setInt16(76, -1);
|
|
309
|
+
avc1Body.set(avcCBox, 78);
|
|
310
|
+
const avc1 = box("avc1", avc1Body);
|
|
311
|
+
const stsd = fullBox("stsd", 0, 0, u32(1), avc1);
|
|
312
|
+
const stbl = box(
|
|
313
|
+
"stbl",
|
|
314
|
+
stsd,
|
|
315
|
+
fullBox("stts", 0, 0, u32(0)),
|
|
316
|
+
fullBox("stsc", 0, 0, u32(0)),
|
|
317
|
+
fullBox("stsz", 0, 0, u32(0), u32(0)),
|
|
318
|
+
fullBox("stco", 0, 0, u32(0))
|
|
319
|
+
);
|
|
320
|
+
const dinf = box("dinf", fullBox("dref", 0, 0, u32(1), fullBox("url ", 0, 1)));
|
|
321
|
+
const minf = box("minf", fullBox("vmhd", 0, 1), dinf, stbl);
|
|
322
|
+
const hdlr = fullBox("hdlr", 0, 0, new Uint8Array([
|
|
323
|
+
0,
|
|
324
|
+
0,
|
|
325
|
+
0,
|
|
326
|
+
0,
|
|
327
|
+
118,
|
|
328
|
+
105,
|
|
329
|
+
100,
|
|
330
|
+
101,
|
|
331
|
+
0,
|
|
332
|
+
0,
|
|
333
|
+
0,
|
|
334
|
+
0,
|
|
335
|
+
0,
|
|
336
|
+
0,
|
|
337
|
+
0,
|
|
338
|
+
0,
|
|
339
|
+
0,
|
|
340
|
+
0,
|
|
341
|
+
0,
|
|
342
|
+
0,
|
|
343
|
+
86,
|
|
344
|
+
105,
|
|
345
|
+
100,
|
|
346
|
+
101,
|
|
347
|
+
111,
|
|
348
|
+
0
|
|
349
|
+
]));
|
|
350
|
+
const mdhdBody = new Uint8Array(20);
|
|
351
|
+
new DataView(mdhdBody.buffer).setUint32(8, timescale);
|
|
352
|
+
const mdhd = fullBox("mdhd", 0, 0, mdhdBody);
|
|
353
|
+
const mdia = box("mdia", mdhd, hdlr, minf);
|
|
354
|
+
const tkhdBody = new Uint8Array(80);
|
|
355
|
+
const tkhdView = new DataView(tkhdBody.buffer);
|
|
356
|
+
tkhdView.setUint32(8, trackId);
|
|
357
|
+
tkhdView.setUint32(36, 65536);
|
|
358
|
+
tkhdView.setUint32(52, 65536);
|
|
359
|
+
tkhdView.setUint32(64, 1073741824);
|
|
360
|
+
tkhdView.setUint32(72, width << 16);
|
|
361
|
+
tkhdView.setUint32(76, height << 16);
|
|
362
|
+
const tkhd = fullBox("tkhd", 0, 3, tkhdBody);
|
|
363
|
+
const trak = box("trak", tkhd, mdia);
|
|
364
|
+
const mvhdBody = new Uint8Array(96);
|
|
365
|
+
const mvhdView = new DataView(mvhdBody.buffer);
|
|
366
|
+
mvhdView.setUint32(8, timescale);
|
|
367
|
+
mvhdView.setUint32(16, 65536);
|
|
368
|
+
mvhdView.setUint16(20, 256);
|
|
369
|
+
mvhdView.setUint32(32, 65536);
|
|
370
|
+
mvhdView.setUint32(48, 65536);
|
|
371
|
+
mvhdView.setUint32(60, 1073741824);
|
|
372
|
+
mvhdView.setUint32(92, trackId + 1);
|
|
373
|
+
const mvhd = fullBox("mvhd", 0, 0, mvhdBody);
|
|
374
|
+
const trexBody = new Uint8Array(20);
|
|
375
|
+
new DataView(trexBody.buffer).setUint32(0, trackId);
|
|
376
|
+
new DataView(trexBody.buffer).setUint32(4, 1);
|
|
377
|
+
const mvex = box("mvex", fullBox("trex", 0, 0, trexBody));
|
|
378
|
+
const moov = box("moov", mvhd, trak, mvex);
|
|
379
|
+
const result = new Uint8Array(ftyp.length + moov.length);
|
|
380
|
+
result.set(ftyp, 0);
|
|
381
|
+
result.set(moov, ftyp.length);
|
|
382
|
+
return result;
|
|
383
|
+
}
|
|
384
|
+
function buildAudioInitSegment(sampleRate, channels, asc, timescale, trackId = 1) {
|
|
385
|
+
assertTrackId(trackId, "audio trackId");
|
|
386
|
+
const ts = timescale ?? sampleRate;
|
|
387
|
+
if (!asc) {
|
|
388
|
+
const freqTable = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350];
|
|
389
|
+
const fi = freqTable.indexOf(sampleRate);
|
|
390
|
+
const freqIdx = fi >= 0 ? fi : 15;
|
|
391
|
+
if (freqIdx <= 14) {
|
|
392
|
+
const v = 2 << 11 | freqIdx << 7 | channels << 3;
|
|
393
|
+
asc = new Uint8Array([v >> 8 & 255, v & 255]);
|
|
394
|
+
} else {
|
|
395
|
+
asc = new Uint8Array([
|
|
396
|
+
2 << 3 | 7,
|
|
397
|
+
(8 | sampleRate >> 20 & 7) & 255,
|
|
398
|
+
sampleRate >> 12 & 255,
|
|
399
|
+
sampleRate >> 4 & 255,
|
|
400
|
+
((sampleRate & 15) << 4 | channels << 0) & 255
|
|
401
|
+
]);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
const dsi = new Uint8Array(2 + asc.length);
|
|
405
|
+
dsi[0] = 5;
|
|
406
|
+
dsi[1] = asc.length;
|
|
407
|
+
dsi.set(asc, 2);
|
|
408
|
+
const dcdBody = new Uint8Array(13 + dsi.length);
|
|
409
|
+
dcdBody[0] = 64;
|
|
410
|
+
dcdBody[1] = 21;
|
|
411
|
+
dcdBody.set(dsi, 13);
|
|
412
|
+
const dcd = new Uint8Array(2 + dcdBody.length);
|
|
413
|
+
dcd[0] = 4;
|
|
414
|
+
dcd[1] = dcdBody.length;
|
|
415
|
+
dcd.set(dcdBody, 2);
|
|
416
|
+
const esBody = new Uint8Array(3 + dcd.length);
|
|
417
|
+
esBody[0] = 0;
|
|
418
|
+
esBody[1] = 1;
|
|
419
|
+
esBody[2] = 0;
|
|
420
|
+
esBody.set(dcd, 3);
|
|
421
|
+
const es = new Uint8Array(2 + esBody.length);
|
|
422
|
+
es[0] = 3;
|
|
423
|
+
es[1] = esBody.length;
|
|
424
|
+
es.set(esBody, 2);
|
|
425
|
+
const esdsBox = fullBox("esds", 0, 0, es);
|
|
426
|
+
const mp4aBody = new Uint8Array(28 + esdsBox.length);
|
|
427
|
+
const mp4aView = new DataView(mp4aBody.buffer);
|
|
428
|
+
mp4aView.setUint16(6, 1);
|
|
429
|
+
mp4aView.setUint16(16, channels);
|
|
430
|
+
mp4aView.setUint16(18, 16);
|
|
431
|
+
mp4aView.setUint32(24, sampleRate << 16);
|
|
432
|
+
mp4aBody.set(esdsBox, 28);
|
|
433
|
+
const mp4a = box("mp4a", mp4aBody);
|
|
434
|
+
const stsd = fullBox("stsd", 0, 0, u32(1), mp4a);
|
|
435
|
+
const stbl = box(
|
|
436
|
+
"stbl",
|
|
437
|
+
stsd,
|
|
438
|
+
fullBox("stts", 0, 0, u32(0)),
|
|
439
|
+
fullBox("stsc", 0, 0, u32(0)),
|
|
440
|
+
fullBox("stsz", 0, 0, u32(0), u32(0)),
|
|
441
|
+
fullBox("stco", 0, 0, u32(0))
|
|
442
|
+
);
|
|
443
|
+
const dinf = box("dinf", fullBox("dref", 0, 0, u32(1), fullBox("url ", 0, 1)));
|
|
444
|
+
const minf = box("minf", fullBox("smhd", 0, 0, new Uint8Array(4)), dinf, stbl);
|
|
445
|
+
const hdlr = fullBox("hdlr", 0, 0, new Uint8Array([
|
|
446
|
+
0,
|
|
447
|
+
0,
|
|
448
|
+
0,
|
|
449
|
+
0,
|
|
450
|
+
115,
|
|
451
|
+
111,
|
|
452
|
+
117,
|
|
453
|
+
110,
|
|
454
|
+
0,
|
|
455
|
+
0,
|
|
456
|
+
0,
|
|
457
|
+
0,
|
|
458
|
+
0,
|
|
459
|
+
0,
|
|
460
|
+
0,
|
|
461
|
+
0,
|
|
462
|
+
0,
|
|
463
|
+
0,
|
|
464
|
+
0,
|
|
465
|
+
0,
|
|
466
|
+
83,
|
|
467
|
+
111,
|
|
468
|
+
117,
|
|
469
|
+
110,
|
|
470
|
+
100,
|
|
471
|
+
0
|
|
472
|
+
]));
|
|
473
|
+
const mdhdBody = new Uint8Array(20);
|
|
474
|
+
new DataView(mdhdBody.buffer).setUint32(8, ts);
|
|
475
|
+
const mdhd = fullBox("mdhd", 0, 0, mdhdBody);
|
|
476
|
+
const mdia = box("mdia", mdhd, hdlr, minf);
|
|
477
|
+
const tkhdBody = new Uint8Array(80);
|
|
478
|
+
const tkhdView = new DataView(tkhdBody.buffer);
|
|
479
|
+
tkhdView.setUint32(8, trackId);
|
|
480
|
+
tkhdView.setUint32(36, 65536);
|
|
481
|
+
tkhdView.setUint32(52, 65536);
|
|
482
|
+
tkhdView.setUint32(64, 1073741824);
|
|
483
|
+
const tkhd = fullBox("tkhd", 0, 3, tkhdBody);
|
|
484
|
+
const trak = box("trak", tkhd, mdia);
|
|
485
|
+
const mvhdBody = new Uint8Array(96);
|
|
486
|
+
const mvhdView = new DataView(mvhdBody.buffer);
|
|
487
|
+
mvhdView.setUint32(8, ts);
|
|
488
|
+
mvhdView.setUint32(16, 65536);
|
|
489
|
+
mvhdView.setUint16(20, 256);
|
|
490
|
+
mvhdView.setUint32(32, 65536);
|
|
491
|
+
mvhdView.setUint32(48, 65536);
|
|
492
|
+
mvhdView.setUint32(60, 1073741824);
|
|
493
|
+
mvhdView.setUint32(92, trackId + 1);
|
|
494
|
+
const mvhd = fullBox("mvhd", 0, 0, mvhdBody);
|
|
495
|
+
const trexBody = new Uint8Array(20);
|
|
496
|
+
new DataView(trexBody.buffer).setUint32(0, trackId);
|
|
497
|
+
new DataView(trexBody.buffer).setUint32(4, 1);
|
|
498
|
+
const mvex = box("mvex", fullBox("trex", 0, 0, trexBody));
|
|
499
|
+
const moov = box("moov", mvhd, trak, mvex);
|
|
500
|
+
const ftyp = box("ftyp", new Uint8Array([
|
|
501
|
+
105,
|
|
502
|
+
115,
|
|
503
|
+
111,
|
|
504
|
+
109,
|
|
505
|
+
0,
|
|
506
|
+
0,
|
|
507
|
+
2,
|
|
508
|
+
0,
|
|
509
|
+
105,
|
|
510
|
+
115,
|
|
511
|
+
111,
|
|
512
|
+
109,
|
|
513
|
+
105,
|
|
514
|
+
115,
|
|
515
|
+
111,
|
|
516
|
+
54,
|
|
517
|
+
109,
|
|
518
|
+
112,
|
|
519
|
+
52,
|
|
520
|
+
49
|
|
521
|
+
]));
|
|
522
|
+
const result = new Uint8Array(ftyp.length + moov.length);
|
|
523
|
+
result.set(ftyp, 0);
|
|
524
|
+
result.set(moov, ftyp.length);
|
|
525
|
+
return result;
|
|
526
|
+
}
|
|
527
|
+
var _videoSeq, _audioSeq, _videoInitSegment, _videoInitTrackId, _audioInitSegment, _lastVideoTimestamp, _frameDuration, _videoBaseTs, _audioBaseTs, _videoTrackId, _videoTimescale, _MmtpToCmaf_instances, videoFrameDuration_get, _audioTimescale, _audioSampleCount, _aacFrameSamples;
|
|
528
|
+
var MmtpToCmaf = class {
|
|
529
|
+
constructor() {
|
|
530
|
+
__privateAdd(this, _MmtpToCmaf_instances);
|
|
531
|
+
__privateAdd(this, _videoSeq, 1);
|
|
532
|
+
__privateAdd(this, _audioSeq, 1);
|
|
533
|
+
__privateAdd(this, _videoInitSegment, null);
|
|
534
|
+
// Known only for locally-built init segments. Wire-supplied MPU metadata is
|
|
535
|
+
// intentionally opaque here, so setVideoTrackParams remains the API that
|
|
536
|
+
// lets a caller declare its track geometry before wrapping samples.
|
|
537
|
+
__privateAdd(this, _videoInitTrackId, null);
|
|
538
|
+
__privateAdd(this, _audioInitSegment, null);
|
|
539
|
+
__privateAdd(this, _lastVideoTimestamp, 0);
|
|
540
|
+
// Sticky sample duration in video timescale units, updated from caller-
|
|
541
|
+
// supplied durations or adjacent-timestamp deltas. null means "nothing
|
|
542
|
+
// observed yet", in which case #videoFrameDuration derives ~30fps from the
|
|
543
|
+
// configured timescale (33333 at the 1_000_000 default, i.e. unchanged).
|
|
544
|
+
__privateAdd(this, _frameDuration, null);
|
|
545
|
+
// Per-track rebase: each track anchors on its OWN first sample so
|
|
546
|
+
// baseMediaDecodeTime is never negative. A shared base was wrong — if the
|
|
547
|
+
// first sample of one track arrives later than the other's first sample,
|
|
548
|
+
// the earlier track computes `timestamp - sharedBase` as a negative number,
|
|
549
|
+
// which serializes into tfdt as a huge unsigned uint64 (~2^64 - 46) and
|
|
550
|
+
// Chromium rejects the segment with CHUNK_DEMUXER_ERROR_APPEND_FAILED,
|
|
551
|
+
// closing the MediaSource and detaching all SourceBuffers.
|
|
552
|
+
// For A/V alignment, choose a COMMON anchor: set when the first sample of
|
|
553
|
+
// EITHER track arrives, but only if that sample's timestamp is <= any
|
|
554
|
+
// subsequent track's first sample. Implementation: each track rebases to
|
|
555
|
+
// the minimum timestamp seen across tracks on their respective first sample.
|
|
556
|
+
__privateAdd(this, _videoBaseTs, -1);
|
|
557
|
+
__privateAdd(this, _audioBaseTs, -1);
|
|
558
|
+
// Video track geometry. These pair with the video init segment's tkhd
|
|
559
|
+
// track_ID and mdhd/mvhd timescale: every moof this converter emits must
|
|
560
|
+
// reference the same track at the same rate or the browser either drops the
|
|
561
|
+
// fragment (unknown track) or plays it at the wrong rate. They are
|
|
562
|
+
// configuration rather than stream state, so — unlike the sequence numbers
|
|
563
|
+
// and time bases above — reset() deliberately preserves them, matching the
|
|
564
|
+
// fact that reset() also preserves #videoInitSegment.
|
|
565
|
+
__privateAdd(this, _videoTrackId, 1);
|
|
566
|
+
__privateAdd(this, _videoTimescale, 1e6);
|
|
567
|
+
// Audio timescale from init segment (default 1M µs; real FFmpeg init uses sampleRate).
|
|
568
|
+
// Set by buildAudioInit or setAudioTimescale.
|
|
569
|
+
__privateAdd(this, _audioTimescale, 1e6);
|
|
570
|
+
// Audio sample counter for drift-free baseMediaDecodeTime.
|
|
571
|
+
// AAC frames are exactly 1024 samples at sampleRate. Using sequential
|
|
572
|
+
// counter × 1024 avoids floating-point rounding drift from timestamp conversion.
|
|
573
|
+
__privateAdd(this, _audioSampleCount, 0);
|
|
574
|
+
/** AAC access-unit length in samples. ISO/IEC 14496-3: an AAC-LC frame is
|
|
575
|
+
* exactly 1024 samples at every sample rate — it is not rate-dependent. */
|
|
576
|
+
__privateAdd(this, _aacFrameSamples, 1024);
|
|
577
|
+
}
|
|
578
|
+
/**
|
|
579
|
+
* Point the single-sample video wrappers at a specific track and rate.
|
|
580
|
+
*
|
|
581
|
+
* Call this when the init segment came off the wire (setInitSegmentFromMpu)
|
|
582
|
+
* rather than from buildVideoInit, so the wrappers match the publisher's
|
|
583
|
+
* tkhd/mdhd instead of assuming trackId=1 at microsecond rate. Consumers
|
|
584
|
+
* that build their init through buildVideoInit can pass the same values
|
|
585
|
+
* there instead and skip this call.
|
|
586
|
+
*
|
|
587
|
+
* The rate is settable only until the first single-sample wrap — see the
|
|
588
|
+
* throw below for why.
|
|
589
|
+
*/
|
|
590
|
+
setVideoTrackParams(trackId, timescale) {
|
|
591
|
+
assertTrackId(trackId, "video trackId");
|
|
592
|
+
assertTimescale(timescale, "video timescale");
|
|
593
|
+
if (trackId !== __privateGet(this, _videoTrackId) && __privateGet(this, _videoInitTrackId) !== null) {
|
|
594
|
+
throw new Error(
|
|
595
|
+
`video track ID cannot change from ${__privateGet(this, _videoTrackId)} to ${trackId} after a video init has been cached; replace the init atomically`
|
|
596
|
+
);
|
|
597
|
+
}
|
|
598
|
+
if (timescale !== __privateGet(this, _videoTimescale) && __privateGet(this, _videoBaseTs) >= 0) {
|
|
599
|
+
throw new Error(
|
|
600
|
+
`video timescale cannot change from ${__privateGet(this, _videoTimescale)} to ${timescale} after video samples have been wrapped; call reset() first`
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
__privateSet(this, _videoTrackId, trackId);
|
|
604
|
+
__privateSet(this, _videoTimescale, timescale);
|
|
605
|
+
}
|
|
606
|
+
/** Set init segment from MPU metadata packet (fragment_type=0).
|
|
607
|
+
* These are complete ftyp+moov bytes from FFmpeg — use directly. */
|
|
608
|
+
setInitSegmentFromMpu(data, isAudio) {
|
|
609
|
+
if (isAudio) {
|
|
610
|
+
__privateSet(this, _audioInitSegment, data);
|
|
611
|
+
} else {
|
|
612
|
+
__privateSet(this, _videoInitSegment, data);
|
|
613
|
+
__privateSet(this, _videoInitTrackId, null);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
/** Build init segment from codec config (catalog path — no MPU metadata available).
|
|
617
|
+
* Passing timescale/trackId also configures the wrappers via
|
|
618
|
+
* setVideoTrackParams, so init and media segments cannot disagree. */
|
|
619
|
+
buildVideoInit(avcC, width, height, timescale, trackId) {
|
|
620
|
+
const nextTimescale = timescale ?? __privateGet(this, _videoTimescale);
|
|
621
|
+
const nextTrackId = trackId ?? __privateGet(this, _videoTrackId);
|
|
622
|
+
assertTrackId(nextTrackId, "video trackId");
|
|
623
|
+
assertTimescale(nextTimescale, "video timescale");
|
|
624
|
+
if (nextTimescale !== __privateGet(this, _videoTimescale) && __privateGet(this, _videoBaseTs) >= 0) {
|
|
625
|
+
throw new Error(
|
|
626
|
+
`video timescale cannot change from ${__privateGet(this, _videoTimescale)} to ${nextTimescale} after video samples have been wrapped; call reset() first`
|
|
627
|
+
);
|
|
628
|
+
}
|
|
629
|
+
const init = buildVideoInitSegment(
|
|
630
|
+
avcC,
|
|
631
|
+
width,
|
|
632
|
+
height,
|
|
633
|
+
nextTimescale,
|
|
634
|
+
nextTrackId
|
|
635
|
+
);
|
|
636
|
+
__privateSet(this, _videoTimescale, nextTimescale);
|
|
637
|
+
__privateSet(this, _videoTrackId, nextTrackId);
|
|
638
|
+
__privateSet(this, _videoInitSegment, init);
|
|
639
|
+
__privateSet(this, _videoInitTrackId, nextTrackId);
|
|
640
|
+
}
|
|
641
|
+
buildAudioInit(sampleRate, channels, asc, timescale) {
|
|
642
|
+
const ts = timescale ?? sampleRate;
|
|
643
|
+
__privateSet(this, _audioTimescale, ts);
|
|
644
|
+
__privateSet(this, _audioInitSegment, buildAudioInitSegment(sampleRate, channels, asc, ts));
|
|
645
|
+
}
|
|
646
|
+
get videoInitSegment() {
|
|
647
|
+
return __privateGet(this, _videoInitSegment);
|
|
648
|
+
}
|
|
649
|
+
get audioInitSegment() {
|
|
650
|
+
return __privateGet(this, _audioInitSegment);
|
|
651
|
+
}
|
|
652
|
+
/** Convert a raw video sample to an fMP4 moof+mdat segment. */
|
|
653
|
+
wrapVideoSample(data, timestamp, keyframe, duration) {
|
|
654
|
+
return this.wrapVideoSampleWithTiming(data, timestamp, keyframe, duration).segment;
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Convert a raw video sample and return the exact browser media interval
|
|
658
|
+
* encoded into tfdt/trun. Consumers that correlate SourceBuffer appends with
|
|
659
|
+
* requestVideoFrameCallback must use this rebased timestamp, not the wire or
|
|
660
|
+
* caller-owned timestamp passed above.
|
|
661
|
+
*/
|
|
662
|
+
wrapVideoSampleWithTiming(data, timestamp, keyframe, duration) {
|
|
663
|
+
if (duration !== void 0 && Number.isFinite(duration) && duration > 0) {
|
|
664
|
+
__privateSet(this, _frameDuration, Math.round(duration));
|
|
665
|
+
} else if (__privateGet(this, _lastVideoTimestamp) > 0 && timestamp > __privateGet(this, _lastVideoTimestamp)) {
|
|
666
|
+
const delta = timestamp - __privateGet(this, _lastVideoTimestamp);
|
|
667
|
+
if (delta > 0 && delta < __privateGet(this, _videoTimescale)) __privateSet(this, _frameDuration, delta);
|
|
668
|
+
}
|
|
669
|
+
__privateSet(this, _lastVideoTimestamp, timestamp);
|
|
670
|
+
if (__privateGet(this, _videoBaseTs) < 0) __privateSet(this, _videoBaseTs, timestamp);
|
|
671
|
+
const relTs = timestamp - __privateGet(this, _videoBaseTs);
|
|
672
|
+
const frameDuration = __privateGet(this, _MmtpToCmaf_instances, videoFrameDuration_get);
|
|
673
|
+
return Object.freeze({
|
|
674
|
+
segment: encodeDataSegment(
|
|
675
|
+
data,
|
|
676
|
+
relTs,
|
|
677
|
+
frameDuration,
|
|
678
|
+
keyframe,
|
|
679
|
+
__privateWrapper(this, _videoSeq)._++,
|
|
680
|
+
__privateGet(this, _videoTrackId)
|
|
681
|
+
),
|
|
682
|
+
mediaTimestamp: relTs,
|
|
683
|
+
duration: frameDuration
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
/** Convert an append-safe video batch using the caller-owned timeline.
|
|
687
|
+
* Durations, baseDecodeTime, and compositionTimeOffset are in the
|
|
688
|
+
* configured video timescale. compositionTimeOffset is the signed PTS-DTS
|
|
689
|
+
* delta; its presence selects a version-1 trun for the whole batch.
|
|
690
|
+
* An explicit trackId is range-checked before #videoSeq++ for the same
|
|
691
|
+
* reason as wrapAudioSamples: the encoder's own check fires too late to
|
|
692
|
+
* keep the sequence ungapped. */
|
|
693
|
+
wrapVideoSamples(samples, baseDecodeTime, trackId = __privateGet(this, _videoTrackId)) {
|
|
694
|
+
assertTrackId(trackId, "video trackId");
|
|
695
|
+
assertCompositionTimeOffsets(samples);
|
|
696
|
+
return encodeMultiSampleSegment(samples, baseDecodeTime, __privateWrapper(this, _videoSeq)._++, trackId);
|
|
697
|
+
}
|
|
698
|
+
/** Set audio timescale to match the init segment's mdhd timescale.
|
|
699
|
+
* Call after appending the real encoder init (FT=0 ftyp+moov). */
|
|
700
|
+
setAudioTimescale(timescale) {
|
|
701
|
+
__privateSet(this, _audioTimescale, timescale);
|
|
702
|
+
}
|
|
703
|
+
/** Convert a raw audio sample to an fMP4 moof+mdat segment. */
|
|
704
|
+
wrapAudioSample(data, timestamp, sampleDuration = 21333, compositionTimeOffset) {
|
|
705
|
+
assertCompositionTimeOffsets([{ compositionTimeOffset }]);
|
|
706
|
+
const sampleData = normalizeAacSampleForCmaf(data);
|
|
707
|
+
if (__privateGet(this, _audioBaseTs) < 0) __privateSet(this, _audioBaseTs, timestamp);
|
|
708
|
+
const samplesPerFrame = __privateGet(this, _audioTimescale) !== 1e6 ? __privateGet(this, _aacFrameSamples) : sampleDuration;
|
|
709
|
+
const scaledTs = __privateGet(this, _audioTimescale) !== 1e6 ? __privateGet(this, _audioSampleCount) * samplesPerFrame : timestamp - __privateGet(this, _audioBaseTs);
|
|
710
|
+
__privateWrapper(this, _audioSampleCount)._++;
|
|
711
|
+
return encodeDataSegment(
|
|
712
|
+
sampleData,
|
|
713
|
+
scaledTs,
|
|
714
|
+
samplesPerFrame,
|
|
715
|
+
true,
|
|
716
|
+
__privateWrapper(this, _audioSeq)._++,
|
|
717
|
+
1,
|
|
718
|
+
compositionTimeOffset
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
/** Convert an ordered audio batch using the caller-owned timeline. */
|
|
722
|
+
wrapAudioSamples(samples, baseDecodeTime, trackId = 1) {
|
|
723
|
+
assertTrackId(trackId, "audio trackId");
|
|
724
|
+
assertCompositionTimeOffsets(samples);
|
|
725
|
+
return encodeMultiSampleSegment(
|
|
726
|
+
samples.map((sample) => ({
|
|
727
|
+
data: normalizeAacSampleForCmaf(sample.data),
|
|
728
|
+
duration: sample.duration,
|
|
729
|
+
keyframe: true,
|
|
730
|
+
compositionTimeOffset: sample.compositionTimeOffset
|
|
731
|
+
})),
|
|
732
|
+
baseDecodeTime,
|
|
733
|
+
__privateWrapper(this, _audioSeq)._++,
|
|
734
|
+
trackId
|
|
735
|
+
);
|
|
736
|
+
}
|
|
737
|
+
/** Clear per-stream sequencing and time bases.
|
|
738
|
+
* Cached init segments and the video track geometry survive, so a converter
|
|
739
|
+
* reset mid-subscription keeps emitting moofs the existing init can resolve.
|
|
740
|
+
* Clearing the timescale-denominated timing state also re-opens the video
|
|
741
|
+
* rate for change — this is the sanctioned way to retarget mid-subscription. */
|
|
742
|
+
reset() {
|
|
743
|
+
__privateSet(this, _videoSeq, 1);
|
|
744
|
+
__privateSet(this, _audioSeq, 1);
|
|
745
|
+
__privateSet(this, _audioSampleCount, 0);
|
|
746
|
+
__privateSet(this, _lastVideoTimestamp, 0);
|
|
747
|
+
__privateSet(this, _frameDuration, null);
|
|
748
|
+
__privateSet(this, _videoBaseTs, -1);
|
|
749
|
+
__privateSet(this, _audioBaseTs, -1);
|
|
750
|
+
__privateSet(this, _audioTimescale, 1e6);
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
_videoSeq = new WeakMap();
|
|
754
|
+
_audioSeq = new WeakMap();
|
|
755
|
+
_videoInitSegment = new WeakMap();
|
|
756
|
+
_videoInitTrackId = new WeakMap();
|
|
757
|
+
_audioInitSegment = new WeakMap();
|
|
758
|
+
_lastVideoTimestamp = new WeakMap();
|
|
759
|
+
_frameDuration = new WeakMap();
|
|
760
|
+
_videoBaseTs = new WeakMap();
|
|
761
|
+
_audioBaseTs = new WeakMap();
|
|
762
|
+
_videoTrackId = new WeakMap();
|
|
763
|
+
_videoTimescale = new WeakMap();
|
|
764
|
+
_MmtpToCmaf_instances = new WeakSet();
|
|
765
|
+
videoFrameDuration_get = function() {
|
|
766
|
+
return __privateGet(this, _frameDuration) ?? Math.max(1, Math.round(__privateGet(this, _videoTimescale) / 30));
|
|
767
|
+
};
|
|
768
|
+
_audioTimescale = new WeakMap();
|
|
769
|
+
_audioSampleCount = new WeakMap();
|
|
770
|
+
_aacFrameSamples = new WeakMap();
|
|
771
|
+
export {
|
|
772
|
+
MmtpToCmaf,
|
|
773
|
+
buildAudioInitSegment,
|
|
774
|
+
buildVideoInitSegment,
|
|
775
|
+
encodeDataSegment,
|
|
776
|
+
encodeMultiSampleSegment,
|
|
777
|
+
generateGreenFillNAL,
|
|
778
|
+
generateSilenceFrame,
|
|
779
|
+
normalizeAacSampleForCmaf
|
|
780
|
+
};
|
|
781
|
+
//# sourceMappingURL=mmtp-to-cmaf.js.map
|