@blockcast/mmt-container 0.4.0-main.bb90ce9247fa → 0.4.0-main.c73a82eb3ed8

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.
Files changed (111) hide show
  1. package/README.md +6 -4
  2. package/dist/browser-runtime.js +958 -345
  3. package/dist/browser-runtime.js.map +4 -4
  4. package/dist/carp-catalog.d.ts +5 -3
  5. package/dist/carp-catalog.d.ts.map +1 -1
  6. package/dist/carp-catalog.js +22 -5
  7. package/dist/carp-catalog.js.map +3 -3
  8. package/dist/catalog-fec-params.d.ts +5 -2
  9. package/dist/catalog-fec-params.d.ts.map +1 -1
  10. package/dist/catalog-fec-params.js +104 -37
  11. package/dist/catalog-fec-params.js.map +4 -4
  12. package/dist/catalog-network-source.js +3 -0
  13. package/dist/catalog-network-source.js.map +3 -3
  14. package/dist/delivery-catalog.js +85 -221
  15. package/dist/delivery-catalog.js.map +4 -4
  16. package/dist/fec-manager.d.ts +15 -0
  17. package/dist/fec-manager.d.ts.map +1 -1
  18. package/dist/fec-manager.js +99 -39
  19. package/dist/fec-manager.js.map +3 -3
  20. package/dist/fec-state.d.ts +3 -2
  21. package/dist/fec-state.d.ts.map +1 -1
  22. package/dist/fec-state.js +30 -11
  23. package/dist/fec-state.js.map +4 -4
  24. package/dist/fec-worker-setup.d.ts.map +1 -1
  25. package/dist/fec-worker-setup.js +13 -2
  26. package/dist/fec-worker-setup.js.map +3 -3
  27. package/dist/index.d.ts +3 -2
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +10 -0
  30. package/dist/index.js.map +2 -2
  31. package/dist/iso-block-locator.js +3 -0
  32. package/dist/iso-block-locator.js.map +3 -3
  33. package/dist/mfu-reassembler.js +24 -13
  34. package/dist/mfu-reassembler.js.map +3 -3
  35. package/dist/mmtp-container-parser.d.ts.map +1 -1
  36. package/dist/mmtp-container-parser.js +96 -22
  37. package/dist/mmtp-container-parser.js.map +3 -3
  38. package/dist/mmtp-container-parser.no-modules.js +645 -49
  39. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  40. package/dist/mmtp-decode-pipeline.js +96 -22
  41. package/dist/mmtp-decode-pipeline.js.map +3 -3
  42. package/dist/mmtp-fec-session.d.ts +156 -0
  43. package/dist/mmtp-fec-session.d.ts.map +1 -0
  44. package/dist/mmtp-fec-session.js +522 -0
  45. package/dist/mmtp-fec-session.js.map +7 -0
  46. package/dist/mmtp-router.d.ts +14 -4
  47. package/dist/mmtp-router.d.ts.map +1 -1
  48. package/dist/mmtp-router.js +156 -22
  49. package/dist/mmtp-router.js.map +3 -3
  50. package/dist/multicast-input.js +3 -0
  51. package/dist/multicast-input.js.map +3 -3
  52. package/dist/multicast-manager.d.ts +70 -2
  53. package/dist/multicast-manager.d.ts.map +1 -1
  54. package/dist/multicast-manager.js +489 -303
  55. package/dist/multicast-manager.js.map +4 -4
  56. package/dist/multicast-transport.d.ts +6 -2
  57. package/dist/multicast-transport.d.ts.map +1 -1
  58. package/dist/multicast-transport.js +93 -224
  59. package/dist/multicast-transport.js.map +4 -4
  60. package/dist/multicast-unwrap.js +24 -13
  61. package/dist/multicast-unwrap.js.map +3 -3
  62. package/dist/no-modules.d.ts +2 -0
  63. package/dist/no-modules.d.ts.map +1 -1
  64. package/dist/no-modules.js +596 -37
  65. package/dist/no-modules.js.map +4 -4
  66. package/dist/repair-fetch.d.ts +23 -1
  67. package/dist/repair-fetch.d.ts.map +1 -1
  68. package/dist/repair-fetch.js +38 -10
  69. package/dist/repair-fetch.js.map +3 -3
  70. package/dist/repair-layers.js +3 -0
  71. package/dist/repair-layers.js.map +3 -3
  72. package/dist/sample-combiner.d.ts +7 -1
  73. package/dist/sample-combiner.d.ts.map +1 -1
  74. package/dist/sample-combiner.js +14 -2
  75. package/dist/sample-combiner.js.map +2 -2
  76. package/dist/signaling.d.ts +2 -2
  77. package/dist/signaling.d.ts.map +1 -1
  78. package/dist/signaling.js +6 -3
  79. package/dist/signaling.js.map +3 -3
  80. package/dist/timestamp-codec.js +24 -13
  81. package/dist/timestamp-codec.js.map +3 -3
  82. package/dist/wasm-mfu-reassembler.js +3 -0
  83. package/dist/wasm-mfu-reassembler.js.map +3 -3
  84. package/dist/wasm-mmtp-container-parser.js +96 -22
  85. package/dist/wasm-mmtp-container-parser.js.map +3 -3
  86. package/package.json +5 -5
  87. package/schemas/catalog.schema.json +5 -0
  88. package/src/carp-catalog.ts +39 -10
  89. package/src/catalog-fec-params.ts +42 -18
  90. package/src/fec-manager.ts +111 -49
  91. package/src/fec-state.ts +6 -10
  92. package/src/fec-worker-setup.ts +16 -1
  93. package/src/index.ts +21 -0
  94. package/src/mmtp-container-parser.ts +75 -7
  95. package/src/mmtp-fec-session.ts +514 -0
  96. package/src/mmtp-router.ts +101 -5
  97. package/src/multicast-manager.ts +223 -9
  98. package/src/multicast-transport.ts +14 -3
  99. package/src/no-modules.ts +2 -0
  100. package/src/repair-fetch.ts +79 -14
  101. package/src/sample-combiner.ts +15 -2
  102. package/src/signaling.ts +2 -2
  103. package/test-vectors/catalog/README.md +13 -1
  104. package/test-vectors/catalog/negative/fec-iso-symbol-size-below-floor.json +28 -0
  105. package/test-vectors/catalog/negative/fec-reed-solomon-iso-symbol-size-13.json +28 -0
  106. package/test-vectors/catalog/negative/fec-repair-overlay-source-symbols-zero.json +43 -0
  107. package/test-vectors/catalog/negative/fec-repair-symbols-zero.json +28 -0
  108. package/test-vectors/catalog/negative/fec-source-symbols-zero.json +28 -0
  109. package/test-vectors/catalog/negative/fec-symbol-size-zero.json +28 -0
  110. package/test-vectors/catalog/section-codes.json +6 -0
  111. package/test-vectors/catalog-validation.json +95 -0
package/README.md CHANGED
@@ -121,7 +121,7 @@ function parseAlFecMessage(buf: Uint8Array): AlFecMessage | null // every FEC
121
121
  function parseMoqRepairFrame(buf: Uint8Array): MoqRepairFrame
122
122
  ```
123
123
 
124
- Constants worth knowing: `MMTP_HEADER_SIZE = 12`, `MPU_HEADER_SIZE = 8`, `MFU_DU_HEADER_SIZE_TIMED = 14`, `PACKET_TYPE_MPU = 0x00`, `PACKET_TYPE_REPAIR = 0x03`, `ALFEC_MESSAGE_ID = 0x0203`, `FEC_CODE_RAPTORQ = 2`.
124
+ Constants worth knowing: `MMTP_HEADER_SIZE = 12`, `MPU_HEADER_SIZE = 8`, `MFU_DU_HEADER_SIZE_TIMED = 14`, `PACKET_TYPE_MPU = 0x00`, `PACKET_TYPE_REPAIR = 0x03`, `ALFEC_MESSAGE_ID = 0x0203`, `FEC_CODE_RAPTORQ = 3`, `FEC_CODE_REED_SOLOMON = 1`.
125
125
 
126
126
  ```ts
127
127
  import { parseMMTPHeader, extractMFUPayload } from "@blockcast/mmt-base"
@@ -135,7 +135,7 @@ if (hdr.packetType === 0x00) { // MPU
135
135
 
136
136
  ### MFU reassembler (`./mfu`)
137
137
 
138
- Stateful reassembler for fragmented MFUs per ISO/IEC 23008-1:2023 §9.2.3.3 and the repository's contiguous-source producer profile. It partitions bounded continuation state by physical stream, MPU, and wrapping terminal source-packet sequence (`packet_sequence + fragment_counter`), queues FI=2/FI=3 by run and counter until FI=1 and any missing predecessor arrive, then propagates FI=1's intrinsic DU identity while draining the exact countdown. The terminal sequence is transport association only. ISO-permitted interleaving remains separated and incomplete; there is no scope, timestamp, SS_ID, or arrival-order fallback. Recovered packets use the authored u32 sequence from the reconstructed MMTP header.
138
+ Stateful reassembler for fragmented MFUs per ISO/IEC 23008-1:2023 §9.2.3.3 and the repository's contiguous-source producer profile. It partitions bounded continuation state by physical stream, MPU, and wrapping terminal source-packet sequence (`packet_sequence + fragment_counter`), queues FI=2/FI=3 by run and counter until FI=1 and any missing predecessor arrive, then propagates FI=1's intrinsic DU identity while draining the exact countdown. The terminal sequence is transport association only. ISO-permitted interleaving remains separated and incomplete; there is no scope, timestamp, SS_ID, or arrival-order fallback. The router feeds a recovered packet under the wire u32 sequence its SS_ID maps to through the stream's received FEC sources, since a hop may re-stamp the sequence after protection.
139
139
 
140
140
  ```ts
141
141
  interface MFUReassemblerOptions {
@@ -265,7 +265,7 @@ per-commit `0.1.0-main.<sha>` prerelease from `stamp-prerelease.mjs`), and a
265
265
  > Superseded by BLO-40665. Every package is now bumped in lockstep by a `v*`
266
266
  > tag and the sibling ranges move with it, so the objection above no longer
267
267
  > applies -- it was an argument against bumping *one* package. The set is at
268
- > `0.3.0`; see `RELEASES.md`.
268
+ > `0.4.0`; see `RELEASES.md`.
269
269
 
270
270
  #### Track-role convention (Phase 14)
271
271
 
@@ -278,7 +278,7 @@ This is **project-specific**, not in any IETF draft yet. The container's switchi
278
278
  | `video/repair` | `repair` | FEC repair-symbol leg, cross-CDN federated |
279
279
  | `video` (no slash) | `single` | Legacy single-track stream (D-04) |
280
280
 
281
- Empty names, unknown suffixes, trailing slashes, and any non-ASCII / control characters all throw at parse time (T-14-01 fuzz hardening at `carp-catalog.ts:49-57`). Multi-track switching sets must include all three roles or `validateSwitchingSet` reports the missing roles.
281
+ Empty names, unknown suffixes, trailing slashes, and any non-ASCII / control characters all throw at parse time (T-14-01 fuzz hardening at `carp-catalog.ts:49-57`). Multi-track switching sets must include `base` and `repair` or `validateSwitchingSet` reports the missing roles; `delta` is optional, since base is self-decodable and a base-only set plays in base-only mode (BLO-49199).
282
282
 
283
283
  ```ts
284
284
  import { parseTrackRole, validateSwitchingSet } from "@blockcast/mmt-container/carp-catalog"
@@ -289,6 +289,8 @@ parseTrackRole("video/foo") // throws "unknown role suffix"
289
289
 
290
290
  validateSwitchingSet(["v/base", "v/delta", "v/repair"]) // { ok: true }
291
291
  validateSwitchingSet(["v/base", "v/delta"]) // { ok: false, missing: ["repair"] }
292
+ validateSwitchingSet(["v/base", "v/repair"]) // { ok: true } — base-only
293
+ validateSwitchingSet(["v/delta", "v/repair"]) // { ok: false, missing: ["base"] }
292
294
  ```
293
295
 
294
296
  ### FEC manager (`./fec-manager`)