@blockcast/mmt-container 0.3.0 → 0.4.0-main.1cd3cdea89da

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 (605) hide show
  1. package/README.md +33 -16
  2. package/dist/browser-runtime.js +14814 -14255
  3. package/dist/browser-runtime.js.map +4 -4
  4. package/dist/carp-catalog.d.ts +24 -19
  5. package/dist/carp-catalog.d.ts.map +1 -1
  6. package/dist/carp-catalog.js +29 -14
  7. package/dist/carp-catalog.js.map +4 -4
  8. package/dist/catalog-fec-params.d.ts +88 -28
  9. package/dist/catalog-fec-params.d.ts.map +1 -1
  10. package/dist/catalog-fec-params.js +60 -23
  11. package/dist/catalog-fec-params.js.map +4 -4
  12. package/dist/catalog-network-source.js +1 -7
  13. package/dist/catalog-network-source.js.map +4 -4
  14. package/dist/cmaf-block-assembler.d.ts +0 -2
  15. package/dist/cmaf-block-assembler.d.ts.map +1 -1
  16. package/dist/cmaf-block-assembler.js +0 -1
  17. package/dist/cmaf-block-assembler.js.map +2 -2
  18. package/dist/cmcd-producer.d.ts.map +1 -1
  19. package/dist/cmcd-producer.js +0 -4
  20. package/dist/cmcd-producer.js.map +2 -2
  21. package/dist/delivery-catalog.d.ts +124 -0
  22. package/dist/delivery-catalog.d.ts.map +1 -0
  23. package/dist/delivery-catalog.js +1857 -0
  24. package/dist/delivery-catalog.js.map +7 -0
  25. package/dist/delta-fallback-config.d.ts +42 -0
  26. package/dist/delta-fallback-config.d.ts.map +1 -0
  27. package/dist/delta-fallback-config.js +59 -0
  28. package/dist/delta-fallback-config.js.map +7 -0
  29. package/dist/fec-manager.d.ts +52 -30
  30. package/dist/fec-manager.d.ts.map +1 -1
  31. package/dist/fec-manager.js +338 -293
  32. package/dist/fec-manager.js.map +4 -4
  33. package/dist/fec-state.d.ts +19 -31
  34. package/dist/fec-state.d.ts.map +1 -1
  35. package/dist/fec-state.js +4 -10
  36. package/dist/fec-state.js.map +4 -4
  37. package/dist/fec-worker-setup.d.ts +18 -14
  38. package/dist/fec-worker-setup.d.ts.map +1 -1
  39. package/dist/fec-worker-setup.js +81 -96
  40. package/dist/fec-worker-setup.js.map +4 -4
  41. package/dist/index.d.ts +5 -3
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +16 -0
  44. package/dist/index.js.map +2 -2
  45. package/dist/iso-block-locator.js +1 -7
  46. package/dist/iso-block-locator.js.map +4 -4
  47. package/dist/media-router.d.ts +20 -8
  48. package/dist/media-router.d.ts.map +1 -1
  49. package/dist/media-router.js +46 -21
  50. package/dist/media-router.js.map +2 -2
  51. package/dist/mfu-reassembler.js +24 -30
  52. package/dist/mfu-reassembler.js.map +4 -4
  53. package/dist/mmtp-container-parser.d.ts +14 -11
  54. package/dist/mmtp-container-parser.d.ts.map +1 -1
  55. package/dist/mmtp-container-parser.js +126 -99
  56. package/dist/mmtp-container-parser.js.map +4 -4
  57. package/dist/mmtp-container-parser.no-modules.js +151 -108
  58. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  59. package/dist/mmtp-decode-pipeline.js +126 -99
  60. package/dist/mmtp-decode-pipeline.js.map +4 -4
  61. package/dist/mmtp-router.d.ts +51 -29
  62. package/dist/mmtp-router.d.ts.map +1 -1
  63. package/dist/mmtp-router.js +260 -326
  64. package/dist/mmtp-router.js.map +4 -4
  65. package/dist/multicast-input.js +1 -7
  66. package/dist/multicast-input.js.map +4 -4
  67. package/dist/multicast-manager.d.ts +72 -6
  68. package/dist/multicast-manager.d.ts.map +1 -1
  69. package/dist/multicast-manager.js +882 -673
  70. package/dist/multicast-manager.js.map +4 -4
  71. package/dist/multicast-transport.d.ts +1 -1
  72. package/dist/multicast-transport.d.ts.map +1 -1
  73. package/dist/multicast-transport.js +44 -26
  74. package/dist/multicast-transport.js.map +4 -4
  75. package/dist/multicast-unwrap.js +29 -35
  76. package/dist/multicast-unwrap.js.map +4 -4
  77. package/dist/no-modules.js +147 -106
  78. package/dist/no-modules.js.map +4 -4
  79. package/dist/repair-fetch.d.ts +116 -21
  80. package/dist/repair-fetch.d.ts.map +1 -1
  81. package/dist/repair-fetch.js +114 -34
  82. package/dist/repair-fetch.js.map +4 -4
  83. package/dist/repair-layers.d.ts +18 -7
  84. package/dist/repair-layers.d.ts.map +1 -1
  85. package/dist/repair-layers.js +12 -10
  86. package/dist/repair-layers.js.map +4 -4
  87. package/dist/signaling.js +2 -11
  88. package/dist/signaling.js.map +4 -4
  89. package/dist/timestamp-codec.js +24 -30
  90. package/dist/timestamp-codec.js.map +4 -4
  91. package/dist/track-session.d.ts +7 -0
  92. package/dist/track-session.d.ts.map +1 -1
  93. package/dist/track-session.js +15 -8
  94. package/dist/track-session.js.map +2 -2
  95. package/dist/wasm-mfu-reassembler.js +1 -7
  96. package/dist/wasm-mfu-reassembler.js.map +4 -4
  97. package/dist/wasm-mmtp-container-parser.js +126 -99
  98. package/dist/wasm-mmtp-container-parser.js.map +4 -4
  99. package/package.json +7 -14
  100. package/schemas/catalog.schema.json +3 -3
  101. package/src/carp-catalog.ts +46 -24
  102. package/src/catalog-fec-params.ts +173 -64
  103. package/src/cmaf-block-assembler.ts +1 -4
  104. package/src/cmcd-producer.ts +0 -6
  105. package/src/delivery-catalog.ts +498 -0
  106. package/src/delta-fallback-config.ts +72 -0
  107. package/src/fec-manager.ts +457 -334
  108. package/src/fec-state.ts +20 -32
  109. package/src/fec-worker-setup.ts +109 -90
  110. package/src/index.ts +32 -0
  111. package/src/media-router.ts +59 -21
  112. package/src/mmtp-container-parser.ts +106 -20
  113. package/src/mmtp-router.ts +189 -330
  114. package/src/multicast-manager.ts +265 -86
  115. package/src/multicast-transport.ts +16 -9
  116. package/src/repair-fetch.ts +273 -43
  117. package/src/repair-layers.ts +28 -8
  118. package/src/track-session.ts +28 -9
  119. package/test-vectors/catalog/README.md +37 -17
  120. package/test-vectors/catalog/negative/fec-block-profile-retired.json +52 -0
  121. package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +1 -1
  122. package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +1 -1
  123. package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +1 -1
  124. package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +1 -1
  125. package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +1 -1
  126. package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +1 -1
  127. package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +1 -1
  128. package/test-vectors/catalog/negative/multicast-endpoint-relay-address.json +39 -0
  129. package/test-vectors/catalog/negative/multicast-network-source-empty.json +1 -1
  130. package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +1 -1
  131. package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +1 -1
  132. package/test-vectors/catalog/positive/fec-layered-repair.json +2 -2
  133. package/test-vectors/catalog/positive/fec-multicast.json +2 -1
  134. package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +38 -0
  135. package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +2 -1
  136. package/test-vectors/catalog-timing.json +356 -0
  137. package/test-vectors/catalog-validation.json +40 -5
  138. package/test-vectors/delivery-catalog/README.md +11 -0
  139. package/test-vectors/delivery-catalog/negative/missing-block-profile.json +58 -0
  140. package/test-vectors/delivery-catalog/negative/packet-id-signaling.json +59 -0
  141. package/test-vectors/delivery-catalog/negative/retired-k-padded-block-profile.json +59 -0
  142. package/test-vectors/delivery-catalog/positive/dash.json +56 -0
  143. package/test-vectors/delivery-catalog/positive/mmtp-source-only.json +43 -0
  144. package/node_modules/@blockcast/fec-worker/README.md +0 -223
  145. package/node_modules/@blockcast/fec-worker/dist/.build-stamp +0 -0
  146. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +0 -38
  147. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +0 -1
  148. package/node_modules/@blockcast/fec-worker/dist/block-order.js +0 -78
  149. package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +0 -1
  150. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +0 -93
  151. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +0 -1
  152. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +0 -346
  153. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +0 -1
  154. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +0 -380
  155. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +0 -1
  156. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js +0 -11
  157. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.js.map +0 -1
  158. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts +0 -14
  159. package/node_modules/@blockcast/fec-worker/dist/fec-worker.d.ts.map +0 -1
  160. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +0 -859
  161. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +0 -7
  162. package/node_modules/@blockcast/fec-worker/dist/index.d.ts +0 -10
  163. package/node_modules/@blockcast/fec-worker/dist/index.d.ts.map +0 -1
  164. package/node_modules/@blockcast/fec-worker/dist/index.js +0 -8
  165. package/node_modules/@blockcast/fec-worker/dist/index.js.map +0 -1
  166. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts +0 -20
  167. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.d.ts.map +0 -1
  168. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js +0 -370
  169. package/node_modules/@blockcast/fec-worker/dist/shred-fec-worker.js.map +0 -7
  170. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts +0 -104
  171. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.d.ts.map +0 -1
  172. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js +0 -181
  173. package/node_modules/@blockcast/fec-worker/dist/shred-worker-client.js.map +0 -1
  174. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts +0 -194
  175. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.d.ts.map +0 -1
  176. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js +0 -62
  177. package/node_modules/@blockcast/fec-worker/dist/shred-worker-types.js.map +0 -1
  178. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts +0 -9
  179. package/node_modules/@blockcast/fec-worker/dist/transfer.d.ts.map +0 -1
  180. package/node_modules/@blockcast/fec-worker/dist/transfer.js +0 -13
  181. package/node_modules/@blockcast/fec-worker/dist/transfer.js.map +0 -1
  182. package/node_modules/@blockcast/fec-worker/package.json +0 -59
  183. package/node_modules/@blockcast/fec-worker/src/block-order.ts +0 -93
  184. package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +0 -392
  185. package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +0 -399
  186. package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +0 -1502
  187. package/node_modules/@blockcast/fec-worker/src/index.ts +0 -35
  188. package/node_modules/@blockcast/fec-worker/src/shred-fec-worker.ts +0 -589
  189. package/node_modules/@blockcast/fec-worker/src/shred-worker-client.ts +0 -222
  190. package/node_modules/@blockcast/fec-worker/src/shred-worker-types.ts +0 -209
  191. package/node_modules/@blockcast/fec-worker/src/transfer.ts +0 -12
  192. package/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
  193. package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  194. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
  195. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
  196. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
  197. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
  198. package/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
  199. package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
  200. package/node_modules/@blockcast/mmt-base/README.md +0 -134
  201. package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  202. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
  203. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
  204. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
  205. package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
  206. package/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
  207. package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
  208. package/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
  209. package/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
  210. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
  211. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
  212. package/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
  213. package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
  214. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
  215. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
  216. package/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
  217. package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
  218. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
  219. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
  220. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
  221. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
  222. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
  223. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
  224. package/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
  225. package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
  226. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
  227. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
  228. package/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
  229. package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
  230. package/node_modules/@blockcast/mmt-base/package.json +0 -49
  231. package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
  232. package/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
  233. package/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
  234. package/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
  235. package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
  236. package/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
  237. package/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
  238. package/node_modules/@blockcast/mmt-fec/README.md +0 -271
  239. package/node_modules/@blockcast/mmt-fec/dist/.build-stamp +0 -0
  240. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts +0 -82
  241. package/node_modules/@blockcast/mmt-fec/dist/block-manager.d.ts.map +0 -1
  242. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js +0 -296
  243. package/node_modules/@blockcast/mmt-fec/dist/block-manager.js.map +0 -1
  244. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts +0 -106
  245. package/node_modules/@blockcast/mmt-fec/dist/block-processor.d.ts.map +0 -1
  246. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js +0 -288
  247. package/node_modules/@blockcast/mmt-fec/dist/block-processor.js.map +0 -1
  248. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts +0 -46
  249. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.d.ts.map +0 -1
  250. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js +0 -96
  251. package/node_modules/@blockcast/mmt-fec/dist/cmaf-recovery.js.map +0 -1
  252. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts +0 -33
  253. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.d.ts.map +0 -1
  254. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js +0 -57
  255. package/node_modules/@blockcast/mmt-fec/dist/cmaf-symbols.js.map +0 -1
  256. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts +0 -205
  257. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +0 -1
  258. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +0 -240
  259. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +0 -1
  260. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +0 -28
  261. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +0 -1
  262. package/node_modules/@blockcast/mmt-fec/dist/index.js +0 -28
  263. package/node_modules/@blockcast/mmt-fec/dist/index.js.map +0 -1
  264. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts +0 -20
  265. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.d.ts.map +0 -1
  266. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js +0 -28
  267. package/node_modules/@blockcast/mmt-fec/dist/loc-symbols.js.map +0 -1
  268. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +0 -258
  269. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +0 -1
  270. package/node_modules/@blockcast/mmt-fec/dist/oti.js +0 -382
  271. package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +0 -1
  272. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts +0 -41
  273. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.d.ts.map +0 -1
  274. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js +0 -81
  275. package/node_modules/@blockcast/mmt-fec/dist/reorder-buffer.js.map +0 -1
  276. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts +0 -82
  277. package/node_modules/@blockcast/mmt-fec/dist/repair-group.d.ts.map +0 -1
  278. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js +0 -170
  279. package/node_modules/@blockcast/mmt-fec/dist/repair-group.js.map +0 -1
  280. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
  281. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  282. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
  283. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
  284. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
  285. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
  286. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
  287. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
  288. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +0 -134
  289. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  290. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
  291. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
  292. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
  293. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
  294. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
  295. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
  296. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
  297. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
  298. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
  299. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
  300. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
  301. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
  302. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
  303. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
  304. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
  305. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
  306. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
  307. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
  308. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
  309. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
  310. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
  311. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
  312. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
  313. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
  314. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
  315. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
  316. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
  317. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
  318. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +0 -49
  319. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
  320. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
  321. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
  322. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
  323. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
  324. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
  325. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
  326. package/node_modules/@blockcast/mmt-fec/package.json +0 -79
  327. package/node_modules/@blockcast/mmt-fec/src/block-manager.ts +0 -371
  328. package/node_modules/@blockcast/mmt-fec/src/block-processor.ts +0 -439
  329. package/node_modules/@blockcast/mmt-fec/src/cmaf-recovery.ts +0 -127
  330. package/node_modules/@blockcast/mmt-fec/src/cmaf-symbols.ts +0 -68
  331. package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +0 -310
  332. package/node_modules/@blockcast/mmt-fec/src/index.ts +0 -94
  333. package/node_modules/@blockcast/mmt-fec/src/loc-symbols.ts +0 -34
  334. package/node_modules/@blockcast/mmt-fec/src/oti.ts +0 -463
  335. package/node_modules/@blockcast/mmt-fec/src/reorder-buffer.ts +0 -101
  336. package/node_modules/@blockcast/mmt-fec/src/repair-group.ts +0 -195
  337. package/node_modules/@blockcast/mmt-manifest-verify/dist/.build-stamp +0 -0
  338. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts +0 -28
  339. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.d.ts.map +0 -1
  340. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js +0 -128
  341. package/node_modules/@blockcast/mmt-manifest-verify/dist/admission.js.map +0 -1
  342. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts +0 -4
  343. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.d.ts.map +0 -1
  344. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js +0 -4
  345. package/node_modules/@blockcast/mmt-manifest-verify/dist/index.js.map +0 -1
  346. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts +0 -37
  347. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.d.ts.map +0 -1
  348. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js +0 -179
  349. package/node_modules/@blockcast/mmt-manifest-verify/dist/source-auth.js.map +0 -1
  350. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts +0 -99
  351. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.d.ts.map +0 -1
  352. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js +0 -492
  353. package/node_modules/@blockcast/mmt-manifest-verify/dist/verifier.js.map +0 -1
  354. package/node_modules/@blockcast/mmt-manifest-verify/package.json +0 -45
  355. package/node_modules/@blockcast/mmt-manifest-verify/src/admission.ts +0 -171
  356. package/node_modules/@blockcast/mmt-manifest-verify/src/index.ts +0 -3
  357. package/node_modules/@blockcast/mmt-manifest-verify/src/source-auth.ts +0 -230
  358. package/node_modules/@blockcast/mmt-manifest-verify/src/verifier.ts +0 -669
  359. package/node_modules/@noble/hashes/LICENSE +0 -21
  360. package/node_modules/@noble/hashes/README.md +0 -521
  361. package/node_modules/@noble/hashes/_assert.d.ts +0 -17
  362. package/node_modules/@noble/hashes/_assert.d.ts.map +0 -1
  363. package/node_modules/@noble/hashes/_assert.js +0 -18
  364. package/node_modules/@noble/hashes/_assert.js.map +0 -1
  365. package/node_modules/@noble/hashes/_blake.d.ts +0 -14
  366. package/node_modules/@noble/hashes/_blake.d.ts.map +0 -1
  367. package/node_modules/@noble/hashes/_blake.js +0 -50
  368. package/node_modules/@noble/hashes/_blake.js.map +0 -1
  369. package/node_modules/@noble/hashes/_md.d.ts +0 -51
  370. package/node_modules/@noble/hashes/_md.d.ts.map +0 -1
  371. package/node_modules/@noble/hashes/_md.js +0 -162
  372. package/node_modules/@noble/hashes/_md.js.map +0 -1
  373. package/node_modules/@noble/hashes/_u64.d.ts +0 -55
  374. package/node_modules/@noble/hashes/_u64.d.ts.map +0 -1
  375. package/node_modules/@noble/hashes/_u64.js +0 -90
  376. package/node_modules/@noble/hashes/_u64.js.map +0 -1
  377. package/node_modules/@noble/hashes/argon2.d.ts +0 -32
  378. package/node_modules/@noble/hashes/argon2.d.ts.map +0 -1
  379. package/node_modules/@noble/hashes/argon2.js +0 -401
  380. package/node_modules/@noble/hashes/argon2.js.map +0 -1
  381. package/node_modules/@noble/hashes/blake1.d.ts +0 -106
  382. package/node_modules/@noble/hashes/blake1.d.ts.map +0 -1
  383. package/node_modules/@noble/hashes/blake1.js +0 -459
  384. package/node_modules/@noble/hashes/blake1.js.map +0 -1
  385. package/node_modules/@noble/hashes/blake2.d.ts +0 -116
  386. package/node_modules/@noble/hashes/blake2.d.ts.map +0 -1
  387. package/node_modules/@noble/hashes/blake2.js +0 -420
  388. package/node_modules/@noble/hashes/blake2.js.map +0 -1
  389. package/node_modules/@noble/hashes/blake2b.d.ts +0 -11
  390. package/node_modules/@noble/hashes/blake2b.d.ts.map +0 -1
  391. package/node_modules/@noble/hashes/blake2b.js +0 -14
  392. package/node_modules/@noble/hashes/blake2b.js.map +0 -1
  393. package/node_modules/@noble/hashes/blake2s.d.ts +0 -20
  394. package/node_modules/@noble/hashes/blake2s.d.ts.map +0 -1
  395. package/node_modules/@noble/hashes/blake2s.js +0 -24
  396. package/node_modules/@noble/hashes/blake2s.js.map +0 -1
  397. package/node_modules/@noble/hashes/blake3.d.ts +0 -54
  398. package/node_modules/@noble/hashes/blake3.d.ts.map +0 -1
  399. package/node_modules/@noble/hashes/blake3.js +0 -255
  400. package/node_modules/@noble/hashes/blake3.js.map +0 -1
  401. package/node_modules/@noble/hashes/crypto.d.ts +0 -2
  402. package/node_modules/@noble/hashes/crypto.d.ts.map +0 -1
  403. package/node_modules/@noble/hashes/crypto.js +0 -5
  404. package/node_modules/@noble/hashes/crypto.js.map +0 -1
  405. package/node_modules/@noble/hashes/cryptoNode.d.ts +0 -2
  406. package/node_modules/@noble/hashes/cryptoNode.d.ts.map +0 -1
  407. package/node_modules/@noble/hashes/cryptoNode.js +0 -18
  408. package/node_modules/@noble/hashes/cryptoNode.js.map +0 -1
  409. package/node_modules/@noble/hashes/eskdf.d.ts +0 -47
  410. package/node_modules/@noble/hashes/eskdf.d.ts.map +0 -1
  411. package/node_modules/@noble/hashes/eskdf.js +0 -166
  412. package/node_modules/@noble/hashes/eskdf.js.map +0 -1
  413. package/node_modules/@noble/hashes/esm/_assert.d.ts +0 -17
  414. package/node_modules/@noble/hashes/esm/_assert.d.ts.map +0 -1
  415. package/node_modules/@noble/hashes/esm/_assert.js +0 -15
  416. package/node_modules/@noble/hashes/esm/_assert.js.map +0 -1
  417. package/node_modules/@noble/hashes/esm/_blake.d.ts +0 -14
  418. package/node_modules/@noble/hashes/esm/_blake.d.ts.map +0 -1
  419. package/node_modules/@noble/hashes/esm/_blake.js +0 -45
  420. package/node_modules/@noble/hashes/esm/_blake.js.map +0 -1
  421. package/node_modules/@noble/hashes/esm/_md.d.ts +0 -51
  422. package/node_modules/@noble/hashes/esm/_md.d.ts.map +0 -1
  423. package/node_modules/@noble/hashes/esm/_md.js +0 -155
  424. package/node_modules/@noble/hashes/esm/_md.js.map +0 -1
  425. package/node_modules/@noble/hashes/esm/_u64.d.ts +0 -55
  426. package/node_modules/@noble/hashes/esm/_u64.d.ts.map +0 -1
  427. package/node_modules/@noble/hashes/esm/_u64.js +0 -67
  428. package/node_modules/@noble/hashes/esm/_u64.js.map +0 -1
  429. package/node_modules/@noble/hashes/esm/argon2.d.ts +0 -32
  430. package/node_modules/@noble/hashes/esm/argon2.d.ts.map +0 -1
  431. package/node_modules/@noble/hashes/esm/argon2.js +0 -392
  432. package/node_modules/@noble/hashes/esm/argon2.js.map +0 -1
  433. package/node_modules/@noble/hashes/esm/blake1.d.ts +0 -106
  434. package/node_modules/@noble/hashes/esm/blake1.d.ts.map +0 -1
  435. package/node_modules/@noble/hashes/esm/blake1.js +0 -452
  436. package/node_modules/@noble/hashes/esm/blake1.js.map +0 -1
  437. package/node_modules/@noble/hashes/esm/blake2.d.ts +0 -116
  438. package/node_modules/@noble/hashes/esm/blake2.d.ts.map +0 -1
  439. package/node_modules/@noble/hashes/esm/blake2.js +0 -413
  440. package/node_modules/@noble/hashes/esm/blake2.js.map +0 -1
  441. package/node_modules/@noble/hashes/esm/blake2b.d.ts +0 -11
  442. package/node_modules/@noble/hashes/esm/blake2b.d.ts.map +0 -1
  443. package/node_modules/@noble/hashes/esm/blake2b.js +0 -11
  444. package/node_modules/@noble/hashes/esm/blake2b.js.map +0 -1
  445. package/node_modules/@noble/hashes/esm/blake2s.d.ts +0 -20
  446. package/node_modules/@noble/hashes/esm/blake2s.d.ts.map +0 -1
  447. package/node_modules/@noble/hashes/esm/blake2s.js +0 -21
  448. package/node_modules/@noble/hashes/esm/blake2s.js.map +0 -1
  449. package/node_modules/@noble/hashes/esm/blake3.d.ts +0 -54
  450. package/node_modules/@noble/hashes/esm/blake3.d.ts.map +0 -1
  451. package/node_modules/@noble/hashes/esm/blake3.js +0 -251
  452. package/node_modules/@noble/hashes/esm/blake3.js.map +0 -1
  453. package/node_modules/@noble/hashes/esm/crypto.d.ts +0 -2
  454. package/node_modules/@noble/hashes/esm/crypto.d.ts.map +0 -1
  455. package/node_modules/@noble/hashes/esm/crypto.js +0 -2
  456. package/node_modules/@noble/hashes/esm/crypto.js.map +0 -1
  457. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts +0 -2
  458. package/node_modules/@noble/hashes/esm/cryptoNode.d.ts.map +0 -1
  459. package/node_modules/@noble/hashes/esm/cryptoNode.js +0 -15
  460. package/node_modules/@noble/hashes/esm/cryptoNode.js.map +0 -1
  461. package/node_modules/@noble/hashes/esm/eskdf.d.ts +0 -47
  462. package/node_modules/@noble/hashes/esm/eskdf.d.ts.map +0 -1
  463. package/node_modules/@noble/hashes/esm/eskdf.js +0 -160
  464. package/node_modules/@noble/hashes/esm/eskdf.js.map +0 -1
  465. package/node_modules/@noble/hashes/esm/hkdf.d.ts +0 -36
  466. package/node_modules/@noble/hashes/esm/hkdf.d.ts.map +0 -1
  467. package/node_modules/@noble/hashes/esm/hkdf.js +0 -82
  468. package/node_modules/@noble/hashes/esm/hkdf.js.map +0 -1
  469. package/node_modules/@noble/hashes/esm/hmac.d.ts +0 -35
  470. package/node_modules/@noble/hashes/esm/hmac.d.ts.map +0 -1
  471. package/node_modules/@noble/hashes/esm/hmac.js +0 -86
  472. package/node_modules/@noble/hashes/esm/hmac.js.map +0 -1
  473. package/node_modules/@noble/hashes/esm/index.d.ts +0 -2
  474. package/node_modules/@noble/hashes/esm/index.d.ts.map +0 -1
  475. package/node_modules/@noble/hashes/esm/index.js +0 -33
  476. package/node_modules/@noble/hashes/esm/index.js.map +0 -1
  477. package/node_modules/@noble/hashes/esm/legacy.d.ts +0 -71
  478. package/node_modules/@noble/hashes/esm/legacy.d.ts.map +0 -1
  479. package/node_modules/@noble/hashes/esm/legacy.js +0 -281
  480. package/node_modules/@noble/hashes/esm/legacy.js.map +0 -1
  481. package/node_modules/@noble/hashes/esm/package.json +0 -10
  482. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts +0 -23
  483. package/node_modules/@noble/hashes/esm/pbkdf2.d.ts.map +0 -1
  484. package/node_modules/@noble/hashes/esm/pbkdf2.js +0 -97
  485. package/node_modules/@noble/hashes/esm/pbkdf2.js.map +0 -1
  486. package/node_modules/@noble/hashes/esm/ripemd160.d.ts +0 -13
  487. package/node_modules/@noble/hashes/esm/ripemd160.d.ts.map +0 -1
  488. package/node_modules/@noble/hashes/esm/ripemd160.js +0 -13
  489. package/node_modules/@noble/hashes/esm/ripemd160.js.map +0 -1
  490. package/node_modules/@noble/hashes/esm/scrypt.d.ts +0 -34
  491. package/node_modules/@noble/hashes/esm/scrypt.d.ts.map +0 -1
  492. package/node_modules/@noble/hashes/esm/scrypt.js +0 -228
  493. package/node_modules/@noble/hashes/esm/scrypt.js.map +0 -1
  494. package/node_modules/@noble/hashes/esm/sha1.d.ts +0 -11
  495. package/node_modules/@noble/hashes/esm/sha1.d.ts.map +0 -1
  496. package/node_modules/@noble/hashes/esm/sha1.js +0 -11
  497. package/node_modules/@noble/hashes/esm/sha1.js.map +0 -1
  498. package/node_modules/@noble/hashes/esm/sha2.d.ts +0 -159
  499. package/node_modules/@noble/hashes/esm/sha2.d.ts.map +0 -1
  500. package/node_modules/@noble/hashes/esm/sha2.js +0 -375
  501. package/node_modules/@noble/hashes/esm/sha2.js.map +0 -1
  502. package/node_modules/@noble/hashes/esm/sha256.d.ts +0 -20
  503. package/node_modules/@noble/hashes/esm/sha256.d.ts.map +0 -1
  504. package/node_modules/@noble/hashes/esm/sha256.js +0 -20
  505. package/node_modules/@noble/hashes/esm/sha256.js.map +0 -1
  506. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts +0 -142
  507. package/node_modules/@noble/hashes/esm/sha3-addons.d.ts.map +0 -1
  508. package/node_modules/@noble/hashes/esm/sha3-addons.js +0 -393
  509. package/node_modules/@noble/hashes/esm/sha3-addons.js.map +0 -1
  510. package/node_modules/@noble/hashes/esm/sha3.d.ts +0 -53
  511. package/node_modules/@noble/hashes/esm/sha3.d.ts.map +0 -1
  512. package/node_modules/@noble/hashes/esm/sha3.js +0 -234
  513. package/node_modules/@noble/hashes/esm/sha3.js.map +0 -1
  514. package/node_modules/@noble/hashes/esm/sha512.d.ts +0 -26
  515. package/node_modules/@noble/hashes/esm/sha512.d.ts.map +0 -1
  516. package/node_modules/@noble/hashes/esm/sha512.js +0 -26
  517. package/node_modules/@noble/hashes/esm/sha512.js.map +0 -1
  518. package/node_modules/@noble/hashes/esm/utils.d.ts +0 -161
  519. package/node_modules/@noble/hashes/esm/utils.d.ts.map +0 -1
  520. package/node_modules/@noble/hashes/esm/utils.js +0 -281
  521. package/node_modules/@noble/hashes/esm/utils.js.map +0 -1
  522. package/node_modules/@noble/hashes/hkdf.d.ts +0 -36
  523. package/node_modules/@noble/hashes/hkdf.d.ts.map +0 -1
  524. package/node_modules/@noble/hashes/hkdf.js +0 -88
  525. package/node_modules/@noble/hashes/hkdf.js.map +0 -1
  526. package/node_modules/@noble/hashes/hmac.d.ts +0 -35
  527. package/node_modules/@noble/hashes/hmac.d.ts.map +0 -1
  528. package/node_modules/@noble/hashes/hmac.js +0 -91
  529. package/node_modules/@noble/hashes/hmac.js.map +0 -1
  530. package/node_modules/@noble/hashes/index.d.ts +0 -1
  531. package/node_modules/@noble/hashes/index.d.ts.map +0 -1
  532. package/node_modules/@noble/hashes/index.js +0 -33
  533. package/node_modules/@noble/hashes/index.js.map +0 -1
  534. package/node_modules/@noble/hashes/legacy.d.ts +0 -71
  535. package/node_modules/@noble/hashes/legacy.d.ts.map +0 -1
  536. package/node_modules/@noble/hashes/legacy.js +0 -287
  537. package/node_modules/@noble/hashes/legacy.js.map +0 -1
  538. package/node_modules/@noble/hashes/package.json +0 -266
  539. package/node_modules/@noble/hashes/pbkdf2.d.ts +0 -23
  540. package/node_modules/@noble/hashes/pbkdf2.d.ts.map +0 -1
  541. package/node_modules/@noble/hashes/pbkdf2.js +0 -101
  542. package/node_modules/@noble/hashes/pbkdf2.js.map +0 -1
  543. package/node_modules/@noble/hashes/ripemd160.d.ts +0 -13
  544. package/node_modules/@noble/hashes/ripemd160.d.ts.map +0 -1
  545. package/node_modules/@noble/hashes/ripemd160.js +0 -16
  546. package/node_modules/@noble/hashes/ripemd160.js.map +0 -1
  547. package/node_modules/@noble/hashes/scrypt.d.ts +0 -34
  548. package/node_modules/@noble/hashes/scrypt.d.ts.map +0 -1
  549. package/node_modules/@noble/hashes/scrypt.js +0 -232
  550. package/node_modules/@noble/hashes/scrypt.js.map +0 -1
  551. package/node_modules/@noble/hashes/sha1.d.ts +0 -11
  552. package/node_modules/@noble/hashes/sha1.d.ts.map +0 -1
  553. package/node_modules/@noble/hashes/sha1.js +0 -14
  554. package/node_modules/@noble/hashes/sha1.js.map +0 -1
  555. package/node_modules/@noble/hashes/sha2.d.ts +0 -159
  556. package/node_modules/@noble/hashes/sha2.d.ts.map +0 -1
  557. package/node_modules/@noble/hashes/sha2.js +0 -384
  558. package/node_modules/@noble/hashes/sha2.js.map +0 -1
  559. package/node_modules/@noble/hashes/sha256.d.ts +0 -20
  560. package/node_modules/@noble/hashes/sha256.d.ts.map +0 -1
  561. package/node_modules/@noble/hashes/sha256.js +0 -23
  562. package/node_modules/@noble/hashes/sha256.js.map +0 -1
  563. package/node_modules/@noble/hashes/sha3-addons.d.ts +0 -142
  564. package/node_modules/@noble/hashes/sha3-addons.d.ts.map +0 -1
  565. package/node_modules/@noble/hashes/sha3-addons.js +0 -402
  566. package/node_modules/@noble/hashes/sha3-addons.js.map +0 -1
  567. package/node_modules/@noble/hashes/sha3.d.ts +0 -53
  568. package/node_modules/@noble/hashes/sha3.d.ts.map +0 -1
  569. package/node_modules/@noble/hashes/sha3.js +0 -239
  570. package/node_modules/@noble/hashes/sha3.js.map +0 -1
  571. package/node_modules/@noble/hashes/sha512.d.ts +0 -26
  572. package/node_modules/@noble/hashes/sha512.d.ts.map +0 -1
  573. package/node_modules/@noble/hashes/sha512.js +0 -29
  574. package/node_modules/@noble/hashes/sha512.js.map +0 -1
  575. package/node_modules/@noble/hashes/src/_assert.ts +0 -22
  576. package/node_modules/@noble/hashes/src/_blake.ts +0 -50
  577. package/node_modules/@noble/hashes/src/_md.ts +0 -176
  578. package/node_modules/@noble/hashes/src/_u64.ts +0 -91
  579. package/node_modules/@noble/hashes/src/argon2.ts +0 -497
  580. package/node_modules/@noble/hashes/src/blake1.ts +0 -534
  581. package/node_modules/@noble/hashes/src/blake2.ts +0 -486
  582. package/node_modules/@noble/hashes/src/blake2b.ts +0 -10
  583. package/node_modules/@noble/hashes/src/blake2s.ts +0 -20
  584. package/node_modules/@noble/hashes/src/blake3.ts +0 -272
  585. package/node_modules/@noble/hashes/src/crypto.ts +0 -9
  586. package/node_modules/@noble/hashes/src/cryptoNode.ts +0 -15
  587. package/node_modules/@noble/hashes/src/eskdf.ts +0 -187
  588. package/node_modules/@noble/hashes/src/hkdf.ts +0 -88
  589. package/node_modules/@noble/hashes/src/hmac.ts +0 -94
  590. package/node_modules/@noble/hashes/src/index.ts +0 -31
  591. package/node_modules/@noble/hashes/src/legacy.ts +0 -293
  592. package/node_modules/@noble/hashes/src/pbkdf2.ts +0 -122
  593. package/node_modules/@noble/hashes/src/ripemd160.ts +0 -12
  594. package/node_modules/@noble/hashes/src/scrypt.ts +0 -257
  595. package/node_modules/@noble/hashes/src/sha1.ts +0 -10
  596. package/node_modules/@noble/hashes/src/sha2.ts +0 -402
  597. package/node_modules/@noble/hashes/src/sha256.ts +0 -24
  598. package/node_modules/@noble/hashes/src/sha3-addons.ts +0 -499
  599. package/node_modules/@noble/hashes/src/sha3.ts +0 -258
  600. package/node_modules/@noble/hashes/src/sha512.ts +0 -34
  601. package/node_modules/@noble/hashes/src/utils.ts +0 -395
  602. package/node_modules/@noble/hashes/utils.d.ts +0 -161
  603. package/node_modules/@noble/hashes/utils.d.ts.map +0 -1
  604. package/node_modules/@noble/hashes/utils.js +0 -313
  605. package/node_modules/@noble/hashes/utils.js.map +0 -1
@@ -1,271 +0,0 @@
1
- # @blockcast/mmt-fec
2
-
3
- Container-agnostic RaptorQ (RFC 6330) geometry and recovery primitives: block lifecycle, OTI parsing, CMAF/LOC symbol splitting, MoQ ↔ FEC coordinate derivation, and reorder buffering. The canonical stateful WASM decoder is owned by `@blockcast/mmt-container` or `@blockcast/fec-worker`, both of which consume libmmt's [`mmt-wasm`](../../mmt-wasm) `MmtFecDecoder` directly.
4
-
5
- ```bash
6
- pnpm add @blockcast/mmt-fec
7
- ```
8
-
9
- ## Quick start
10
-
11
- ```ts
12
- import { FecBlockManager, processFecBlock } from "@blockcast/mmt-fec"
13
- import { buildOTIFromCatalog, computeFecTimeout, deriveFecInterleaveDepth } from "@blockcast/mmt-fec"
14
-
15
- // Catalog says K=32 source symbols, P=8 repair, T=1320 byte symbols,
16
- // interleaveDepthMs=200 (the FULL FEC block span in ms, §5.1), framerate=30.
17
- const K = 32
18
- const T = 1320
19
- const interleaveDepthMs = 200
20
- const fps = 30
21
- const gopDurationMs = 1000 / fps
22
-
23
- const oti = buildOTIFromCatalog(K, T)
24
- const D = deriveFecInterleaveDepth(interleaveDepthMs, gopDurationMs)
25
- const timeoutMs = computeFecTimeout(interleaveDepthMs, 3.0)
26
- const blocks = new FecBlockManager({ k: K, timeoutMs })
27
-
28
- // `recovered` comes from the container/worker-owned MmtFecDecoder.
29
- if (recoveredBlock) {
30
- // K source symbols concatenated. Split them back into MFU fragments under
31
- // the catalog fec.blockProfile (required; there is no default profile or T).
32
- const { symbols } = processFecBlock(recoveredBlock, { blockProfile: "k-padded-v1", k: K, symbolSize: T })
33
- for (const s of symbols) reassembler.addFragment(s.fragment)
34
- }
35
- ```
36
-
37
- ## Exports
38
-
39
- Mirrors `package.json#exports`. Each subpath is a tree-shakeable entry point.
40
-
41
- | Subpath | Module | Purpose |
42
- |---------|--------|---------|
43
- | `.` | `src/index.ts` | Re-export aggregator (everything below) |
44
- | `./block-manager` | `src/block-manager.ts` | `FecBlockManager` — block state machine with timeout-driven repair fallback |
45
- | `./block-processor` | `src/block-processor.ts` | `processFecBlock` — split a decoded block back into MMTP/MFU fragments |
46
- | `./reorder-buffer` | `src/reorder-buffer.ts` | `ReorderBuffer<T>` — sequence-ordered flush for FEC-interleaved streams |
47
- | `./cmaf` | `src/cmaf-symbols.ts` | `splitToSymbols`, `recoverFromSymbols`, `computeK` — CMAF chunk ↔ symbols |
48
- | `./cmaf-recovery` | `src/cmaf-recovery.ts` | `CmafFecRecovery` — stateful recovery for CMAF chunks + LOC frames |
49
- | `./loc` | `src/loc-symbols.ts` | `splitFrameToSymbol`, `recoverFrameFromSymbol` — LOC 1:1 frame ↔ symbol |
50
-
51
- The aggregator entry also re-exports OTI helpers (`buildOTI`, `buildOTIFromCatalog`, `parseOTI`, `computeFecTimeout`, `parseRepairPacket`) the block-geometry mappers (`FecBlockMapper`, `NullBlockMapper`, `ObjectBlockMapper`, `createMapper`, `recoveredPacketMediaGroup`), and the `iso-ssbg1-v1` MoQ repair group helpers (`extSsStart`, `extendSsId`, `repairFetchRange`, `repairGroupIdMatches`). Canonical MMTP Source FEC Payload ID parsing lives in `@blockcast/mmt-base`; canonical LOC FEC source information lives in `@blockcast/mmt-container`.
52
-
53
- ## Architecture
54
-
55
- ```
56
- Application / container / worker
57
- ├─ owns mmt-wasm MmtFecDecoder state
58
- ├─ feeds ISO SS_ID and Repair FEC Payload ID coordinates
59
- └─ passes recovered blocks into @blockcast/mmt-fec
60
- ├─ FecBlockManager
61
- ├─ processFecBlock
62
- ├─ ReorderBuffer
63
- ├─ FecBlockMapper
64
- └─ CMAF / LOC recovery helpers
65
- ```
66
-
67
- The TypeScript package contains geometry and block-lifecycle glue, not codec
68
- code. Stateful WASM ownership and symbol marshalling live in the composing
69
- container or worker.
70
-
71
- ## Block lifecycle
72
-
73
- `FecBlockManager` (`src/block-manager.ts:127`) runs the per-block state machine. State constants live in `FEC_STATE` (`src/block-manager.ts:19`).
74
-
75
- | State | Trigger | Next |
76
- |-------|---------|------|
77
- | `EMPTY` (0) | Block instantiated | `COLLECTING` on first symbol |
78
- | `COLLECTING` (1) | Symbols arriving, fewer than K total | `COMPLETE` on Kth source, or `FALLBACK` on timeout |
79
- | `COMPLETE` (2) | K source symbols received — no FEC decode needed | `DECODED` |
80
- | `FALLBACK` (3) | `timeoutMs` elapsed before K reached — `repairCallback(blockId, missingEsis)` fires (e.g. WebTransport NACK) | `DECODED` if K reached after repairs, else `FAILED` after another `timeoutMs` |
81
- | `DECODED` (4) | Block assembled, `decodeCallback(blockId, data)` fires, block evicted from map | terminal |
82
- | `FAILED` (5) | Insufficient symbols after second timeout | terminal — block dropped, `blocksFailed` incremented |
83
-
84
- ```
85
- addSourcePacket / addRepairPacket
86
- │
87
- ▼
88
- EMPTY ──first symbol──► COLLECTING ──Kth symbol──► COMPLETE / DECODED
89
- │
90
- timeoutMs
91
- │
92
- ▼
93
- FALLBACK ──repairs fill K──► DECODED
94
- │
95
- 2×timeoutMs (no repair)
96
- │
97
- ▼
98
- FAILED
99
- ```
100
-
101
- `maxBlocks` (default 64) caps in-flight blocks; on overflow, the oldest by `createdAt` is evicted (`#evictOldestBlock`, `src/block-manager.ts:350`). All values must come from the catalog — `timeoutMs` and `k` throw on `<= 0` (`src/block-manager.ts:145`), matching libmmt's "no defaults, no magic floors" rule.
102
-
103
- ### `processFecBlock` — block → MFU fragments
104
-
105
- The WASM decoder hands back `K * symbolSize` bytes (K source symbols concatenated). `processFecBlock` (`src/block-processor.ts:68`) walks each symbol, parses its MMTP header, extracts the MFU payload via `@blockcast/mmt-base`'s `extractMFUPayload`, and emits a `ParsedFecSymbol[]` sorted with wrapping 32-bit MMTP serial-number arithmetic (source-symbol index breaks duplicate ties) — undoing FEC interleaving so the reassembler sees `FI=1` before `FI=2/3` for the same MPU, including across `0xffff_ffff → 0`.
106
-
107
- Both `processFecBlock` and `processFecSymbol` require the stream's catalog `fec.blockProfile`, and `processFecBlock` requires the symbol size T; neither is defaulted. Under `k-padded-v1` a recovered fixed-width symbol is trimmed only at the ISO-declared end (`MPU start + 2 + payload_length`), extended by an ALTA trailer only when one begins exactly there, and the remaining bytes must be uniform decoder padding. Under `iso-ssbg1-v1` (ISO/IEC 23008-1 C.3.3 ssbg_mode1) the symbol is `u16 length || packet || 00h padding`: the length field alone delimits the packet, and a length past the symbol or non-zero padding is counted as `bad_ssbg1_length`. Either way the processor never infers packet boundaries from MFU contents or alternate length conventions.
108
-
109
- ```ts
110
- interface ParsedFecSymbol {
111
- index: number // 0..K-1
112
- packetId: number // MMTP packet ID (1=video, 2=audio by convention)
113
- packetSequenceNumber: number
114
- fragmentType: number // 0=init (ftyp+moov), 2=MFU data
115
- fragment: { mpuSequenceNumber, fragmentationIndicator, fragmentCounter,
116
- data, timestamp, rapFlag }
117
- isKeyframe: boolean
118
- rawSymbol: Uint8Array
119
- }
120
- ```
121
-
122
- Pass `ownerPacketId` to filter out cross-track noise (e.g. zero-padded recovery slots whose `packetId === 0`) — important when the decoder backfills missing slots with zeros that happen to parse as a valid MMTP header.
123
-
124
- ## Reorder buffer
125
-
126
- `ReorderBuffer<T>` (`src/reorder-buffer.ts:26`) is a generic sequence-ordered flush buffer. FEC interleaving causes frames to *complete* out of decode order (e.g. block-N+3 finishes before block-N+1 because the missing symbol arrived first); H.264/HEVC P-frames reference the previous frame, so feeding them out of order to `VideoDecoder` produces green-tinted artifacts from reference-frame mismatch.
127
-
128
- ```ts
129
- const reorder = new ReorderBuffer<EncodedVideoChunk>({
130
- maxSize: K, // size to FEC block depth
131
- getSequence: (c) => c.timestamp,
132
- isKeyframe: (c) => c.type === "key",
133
- })
134
- for (const ready of reorder.push(chunk)) decoder.decode(ready)
135
- ```
136
-
137
- Behaviour (`src/reorder-buffer.ts:39`):
138
- - In-order pushes flush immediately — zero added latency on well-ordered streams.
139
- - Out-of-order pushes buffer until the gap fills.
140
- - Keyframes flush all pending then emit themselves (random access point).
141
- - `maxSize` overflow force-flushes the front of the buffer.
142
- - Stale frames (`seq <= lastFlushedSeq`) are dropped.
143
-
144
- **Capacity:** size `maxSize` to one FEC block depth (K). The buffer only needs to span the maximum possible inter-arrival gap, which is bounded by FEC interleave depth — anything larger means FEC has already given up. Used on the WebCodecs decode path; **not** needed for MSE (the browser's source buffer handles ordering internally).
145
-
146
- ## CMAF & LOC recovery
147
-
148
- `CmafFecRecovery` (`src/cmaf-recovery.ts:33`) is the stateful wrapper that bridges the CMAF/LOC delivery path (whole chunks or raw frames) to a packet-oriented `FecDecoder`. Three feed modes:
149
-
150
- | Method | Input | Use |
151
- |--------|-------|-----|
152
- | `feedSourceChunk(sbn, chunk)` | Whole CMAF chunk over unicast | Splits into K symbols (`splitToSymbols`), registers them all so the decoder can mint cross-block repair if requested. Returns the chunk as-is. |
153
- | `feedSourceSymbol(sbn, esi, sym)` | Multicast packet | Adds one symbol; returns recovered chunk if K reached. |
154
- | `feedRepairSymbol(sbn, esi, sym)` | Repair-track packet | Adds repair; returns recovered chunk on success. |
155
-
156
- The `FecDecoder` interface (`src/cmaf-recovery.ts`) is the minimum surface the
157
- composing application supplies. The recovery class strips zero-padding using
158
- the chunk's known `originalLength` (recorded on `feedSourceChunk` or stored at
159
- recovery time).
160
-
161
- `./cmaf` exports the pure splitting primitives (`splitToSymbols`, `recoverFromSymbols`, `computeK`) and `./loc` exports the LOC variant (`splitFrameToSymbol`, `recoverFrameFromSymbol`) where each frame maps 1:1 to a single symbol — pad up or truncate to `symbolSize`, no sub-block math.
162
-
163
- The higher-level `FecManager` that orchestrates CMSF catalog parsing, base/delta/repair track wiring, and per-track block-mapper construction lives in `@blockcast/mmt-container/fec-manager` — that's the file most consumers will actually instantiate. This package provides the primitives `FecManager` is built on.
164
-
165
- ## OTI and FEC payload IDs
166
-
167
- `./oti` exposes the 12-byte RFC 6330 Common + Scheme-Specific OTI codec (`src/oti.ts:33`):
168
-
169
- ```ts
170
- buildOTIFromCatalog(K, T) // fixed profile: F=K*T, Z=1, N=1, Al=8
171
- parseOTI(otiBytes) // returns { transferLength, symbolSize, ... K }
172
- computeFecTimeout(interleaveDepthMs, safetyFactor=3)
173
- // interleaveDepthMs * safetyFactor (K-independent)
174
- parseRepairPacket(mmtpPacket) // ISO 23008-1 §C.5.3 repair FEC PID
175
- ```
176
-
177
- `computeFecTimeout` derives the block-recovery deadline from the catalog interleave value — see `src/oti.ts:121`. The catalog's `interleaveDepthMs` IS the full FEC block span (§5.1), so the timeout is `interleaveDepthMs * safetyFactor`, independent of K; the safety factor is the only tunable. **Do not** hardcode `setTimeout` values upstream.
178
-
179
- `./` (root) exposes the catalog block geometry via `FecBlockMapper` (`k`, `d`, `interleaveDepthMs`, `gopDurationMs`, `pacingThresholdMs`, and the required `blockProfile`). It does not map MoQ groups to FEC blocks: a recovered packet's media group comes from its own header (`mediaGroupOf` / `recoveredPacketMediaGroup`), and `fromSsId` is the `k-padded-v1` SS_ID locator that throws under `iso-ssbg1-v1`, whose blocks are located by `(SS_Start, SSB_length)` range membership. `NullBlockMapper` (no FEC, no profile) and `ObjectBlockMapper` (§9.1 object FEC, `k-padded-v1` only) keep their identity `derive`. Under `iso-ssbg1-v1` the MoQ repair group id is the 62-bit wrap-epoch-extended SS_Start (`extSsStart`); a receiver that lost SS_ID x in a block it has not delimited FETCHes `repairFetchRange(x, K, { previousBlockStart })`, or `repairFetchRange(x, K, { reference })` from its wrap-epoch reference when no delimited block ends before x (draft-ramadan-moq-fec §7.5), and discards a repair object whose Group ID fails `repairGroupIdMatches`.
180
-
181
- ## WASM module loading
182
-
183
- This package does not load WASM. The host imports one application-owned module,
184
- and the container or worker consumes its actual `MmtFecDecoder` export. No
185
- package depends on generated output inside this checkout.
186
-
187
- ```ts
188
- const wasm = await import("mmt-wasm") // exact host import-map specifier
189
- await wasm.default()
190
- const decoder = new wasm.MmtFecDecoder(interleaveDepth, trackType === "video")
191
- decoder.configure_params(K, T)
192
-
193
- decoder.add_source(ssId, sourcePacket, performance.now())
194
- decoder.add_repair(ssStart, K, rsId, repairSymbol, performance.now())
195
- ```
196
-
197
- Construction policy plus K/T configuration are mandatory; the decoder has no
198
- unconfigured slow path or guessed geometry. Those three-argument `add_source`
199
- and five-argument `add_repair` signatures are
200
- the source-owned wasm-bindgen contract. Do not reconstruct a different
201
- `MoqFec*` binding API from generated artifacts.
202
-
203
- The upstream Rust crate is `mmt-wasm` in this repo (`../../mmt-wasm`). Build it
204
- from the repository root with an external destination:
205
-
206
- ```bash
207
- BLOCKCAST_MMT_WASM_BUILD_ROOT=/tmp/blockcast-libmmt-wasm make mmt-wasm
208
- ```
209
-
210
- Its FEC implementation uses the pure-Rust `raptorq` crate from the sibling
211
- `fec-raptorq` checkout.
212
-
213
- ## RFC 6330 + AL-FEC parameters
214
-
215
- This package is parameter-driven. `FecBlockManager` throws if `timeoutMs <= 0`
216
- or `k <= 0` (`src/block-manager.ts`); all values flow from the CMSF catalog.
217
-
218
- Common broadcast configuration (also documented in the parent README):
219
-
220
- | Param | Typical | Catalog source |
221
- |-------|---------|----------------|
222
- | `T` (symbol size) | 1312 / 1320 bytes | `fec.symbolSize` |
223
- | `K` (source symbols) | 32 | `fec.sourceSymbols` |
224
- | `P` (repair symbols) | 8 (25% overhead) | `fec.repairSymbols` |
225
- | Interleave depth | 200 ms block span (D = positive round-half-up(ms / GOP), minimum 1) | `fec.interleaveDepthMs` |
226
- | `Al` (alignment) | 8 | (OTI byte 11) |
227
-
228
- Specs:
229
- - **RFC 6330** — RaptorQ Forward Error Correction Scheme (incl. §3.3.2.1 interleaved scheme)
230
- - **ISO/IEC 23008-1:2023** — MMT, Annex C; Amendment 1:2025 — AL-FEC framework
231
- - **ATSC A/331 §6.4** — cross-session FEC (one repair flow protecting many source flows)
232
- - **draft-ramadan-moq-fec-00** — AL-FEC over MoQ wire format and §8.3 SBN/ESI derivation, §9.1 object-mode FEC
233
-
234
- ## Performance
235
-
236
- SIMD is a property of the application-owned WASM build. Verify the generated
237
- binary during `make mmt-wasm`; this TypeScript package does not infer it.
238
-
239
- - **x86_64**: AVX2 (256-bit) → SSSE3 (128-bit) fallback
240
- - **ARM64**: NEON
241
- - **Other**: scalar fallback
242
-
243
- The TypeScript layer is allocation-conscious but not zero-copy — symbols cross the WASM boundary as `Uint8Array` copies. The hot allocation lives in `#assembleBlock` (`src/block-manager.ts:335`) and the per-symbol concatenation in `processFecBlock`. Block eviction happens immediately on terminal state (`DECODED` / `FAILED`) — symbols are released the moment the callback returns, no GC delay. For the pure off-main-thread variant with structured-clone-free `ArrayBuffer` transfers, use `@blockcast/fec-worker`.
244
-
245
- Block deadlines are owned by the composing container/transport policy. This
246
- package does not start a global cleanup interval.
247
-
248
- ## Testing
249
-
250
- ```bash
251
- npm ci # install this package from a clean checkout
252
- npm test # vitest run (resolves local dependencies from source)
253
- npm run test:watch # vitest watch
254
- npm run typecheck # tsc --noEmit
255
- npm run build # tsc → dist/
256
- ```
257
-
258
- Test files live next to source (`src/*.test.ts`) and cover `FecBlockManager` (state-machine transitions and timeout fallback), `processFecBlock` (interleaving sort, packet-id filtering, malformed-symbol counting), `ReorderBuffer` (gap fill, keyframe flush, overflow), `CmafFecRecovery` (chunk + symbol + repair feed paths), `FecBlockMapper` (geometry and locators under both block profiles, plus the null and object mappers), the `iso-ssbg1-v1` repair group helpers, the shared `vectors/fec-block-profile` cases, and `cmaf-symbols` / `loc-symbols` (round-trip split/recover).
259
-
260
- ## Related packages
261
-
262
- | Package | Relationship |
263
- |---------|-------------|
264
- | [`mmt-wasm`](../../mmt-wasm) | Rust crate compiled to WebAssembly — provides the canonical `MmtFecDecoder` |
265
- | [`@blockcast/fec-worker`](../fec-worker) | Web Worker owner of `MmtFecDecoder`; keeps decode off the main thread with transferable `ArrayBuffer`s |
266
- | [`@blockcast/mmt-container`](../container) | Higher-level integration: CMSF catalog parser, MMTP container, MFU reassembler, and `FecManager` |
267
- | [`@blockcast/mmt-transport`](../transport) | MoQ / SSM / AMT / DRIAD transport manager; emits raw packets and owns no decoder state |
268
-
269
- ## License
270
-
271
- Apache-2.0 — see `LICENSE`.
File without changes
@@ -1,82 +0,0 @@
1
- /**
2
- * FEC Block State Machine for Multicast
3
- *
4
- * Manages FEC block collection, timeout-based fallback, and WebTransport
5
- * repair integration. Tracks source and repair symbols per block, triggering
6
- * decode when complete or requesting repairs when timed out.
7
- *
8
- * State Machine:
9
- * EMPTY → COLLECTING → COMPLETE → DECODED
10
- * ↓
11
- * FALLBACK (timeout) → WebTransport repair → DECODED
12
- *
13
- * Per draft-ramadan-moq-fec-00 Section 4.2:
14
- * - k source symbols complete a block (no FEC decode needed)
15
- * - After timeout, missing symbols are requested via WebTransport
16
- * - With k symbols (source + repair), FEC decode recovers block
17
- */
18
- export declare const FEC_STATE: {
19
- readonly EMPTY: 0;
20
- readonly COLLECTING: 1;
21
- readonly COMPLETE: 2;
22
- readonly FALLBACK: 3;
23
- readonly DECODED: 4;
24
- readonly FAILED: 5;
25
- };
26
- export type FecState = (typeof FEC_STATE)[keyof typeof FEC_STATE];
27
- export interface FecBlockManagerOptions {
28
- /** Block timeout (ms). Derive from catalog: interleaveDepthMs or frameDurationMs * K. Required. */
29
- timeoutMs: number;
30
- /** K — source symbols per block from catalog fec.sourceSymbols. Required for interleaved mode.
31
- * For object FEC (§9.1), this is the max K — actual K varies per block via addSourcePacket/addRepairPacket blockK param. */
32
- k: number;
33
- /** Max concurrent blocks in flight. Resource bound, not timing — default 64. */
34
- maxBlocks?: number;
35
- }
36
- export interface FecBlockStats {
37
- sourcePackets: number;
38
- repairPackets: number;
39
- blocksComplete: number;
40
- blocksRecovered: number;
41
- blocksFailed: number;
42
- fallbackRequests: number;
43
- activeBlocks: number;
44
- recoveryRate: number;
45
- }
46
- /**
47
- * FEC Block Manager
48
- *
49
- * Manages multiple FEC blocks, handling:
50
- * - Source symbol registration
51
- * - Repair symbol registration
52
- * - Timeout-based WebTransport fallback
53
- * - Block completion and decoding
54
- */
55
- export declare class FecBlockManager {
56
- #private;
57
- maxBlocks: number;
58
- constructor(options: FecBlockManagerOptions);
59
- setRepairCallback(callback: (blockId: number, missingEsis: number[]) => void): void;
60
- setDecodeCallback(callback: (blockId: number, data: Uint8Array) => void): void;
61
- updateParams(params: {
62
- k?: number;
63
- timeoutMs?: number;
64
- }): void;
65
- /**
66
- * Add a source symbol to a block.
67
- * @param blockK — per-block K for object FEC (§9.1). When provided, overrides
68
- * the global K for this block. For interleaved mode, omit (uses global K).
69
- */
70
- addSourcePacket(blockId: number, esi: number, data: Uint8Array, blockK?: number): Uint8Array | null;
71
- /**
72
- * Add a repair symbol to a block.
73
- * @param blockK — per-block K from SSB_length in the Repair FEC Payload ID
74
- * (ISO 23008-1 C.5.3). RSB_length is a different field: the repair symbol
75
- * count, which under layered repair is the base-layer total P, not K.
76
- * Required for object FEC; omit for interleaved mode.
77
- */
78
- addRepairPacket(blockId: number, esi: number, data: Uint8Array, blockK?: number): Uint8Array | null;
79
- getStats(): FecBlockStats;
80
- reset(): void;
81
- }
82
- //# sourceMappingURL=block-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block-manager.d.ts","sourceRoot":"","sources":["../src/block-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,SAAS;;;;;;;CAOZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACtC,mGAAmG;IACnG,SAAS,EAAE,MAAM,CAAC;IAClB;iIAC6H;IAC7H,CAAC,EAAE,MAAM,CAAC;IACV,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACrB;AAqED;;;;;;;;GAQG;AACH,qBAAa,eAAe;;IAI3B,SAAS,EAAE,MAAM,CAAC;gBAaN,OAAO,EAAE,sBAAsB;IAQ3C,iBAAiB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,IAAI;IAInF,iBAAiB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAI9E,YAAY,CAAC,MAAM,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI;IAK9D;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAgBnG;;;;;;OAMG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAoBnG,QAAQ,IAAI,aAAa;IAWzB,KAAK,IAAI,IAAI;CAmJb"}
@@ -1,296 +0,0 @@
1
- /**
2
- * FEC Block State Machine for Multicast
3
- *
4
- * Manages FEC block collection, timeout-based fallback, and WebTransport
5
- * repair integration. Tracks source and repair symbols per block, triggering
6
- * decode when complete or requesting repairs when timed out.
7
- *
8
- * State Machine:
9
- * EMPTY → COLLECTING → COMPLETE → DECODED
10
- * ↓
11
- * FALLBACK (timeout) → WebTransport repair → DECODED
12
- *
13
- * Per draft-ramadan-moq-fec-00 Section 4.2:
14
- * - k source symbols complete a block (no FEC decode needed)
15
- * - After timeout, missing symbols are requested via WebTransport
16
- * - With k symbols (source + repair), FEC decode recovers block
17
- */
18
- export const FEC_STATE = {
19
- EMPTY: 0,
20
- COLLECTING: 1,
21
- COMPLETE: 2,
22
- FALLBACK: 3,
23
- DECODED: 4,
24
- FAILED: 5,
25
- };
26
- /**
27
- * Individual FEC Block.
28
- * Tracks symbols and state for a single source block.
29
- */
30
- class FecBlock {
31
- blockId;
32
- state = FEC_STATE.EMPTY;
33
- sourceSymbols = new Map();
34
- repairSymbols = new Map();
35
- k;
36
- timeoutHandle;
37
- createdAt;
38
- decodedAt;
39
- constructor(blockId, k) {
40
- this.blockId = blockId;
41
- this.k = k;
42
- this.createdAt = performance.now();
43
- }
44
- addSourceSymbol(esi, data) {
45
- if (this.state >= FEC_STATE.COMPLETE)
46
- return false;
47
- this.sourceSymbols.set(esi, data);
48
- this.state = FEC_STATE.COLLECTING;
49
- if (this.sourceSymbols.size >= this.k) {
50
- this.state = FEC_STATE.COMPLETE;
51
- return true;
52
- }
53
- return false;
54
- }
55
- addRepairSymbol(esi, data) {
56
- if (this.state >= FEC_STATE.DECODED)
57
- return false;
58
- this.repairSymbols.set(esi, data);
59
- const totalSymbols = this.sourceSymbols.size + this.repairSymbols.size;
60
- if (totalSymbols >= this.k) {
61
- return true;
62
- }
63
- return false;
64
- }
65
- getMissingEsis() {
66
- const missing = [];
67
- for (let esi = 0; esi < this.k; esi++) {
68
- if (!this.sourceSymbols.has(esi) && !this.repairSymbols.has(esi)) {
69
- missing.push(esi);
70
- }
71
- }
72
- return missing;
73
- }
74
- isDecodable() {
75
- return this.sourceSymbols.size + this.repairSymbols.size >= this.k;
76
- }
77
- clearTimeout() {
78
- if (this.timeoutHandle !== undefined) {
79
- clearTimeout(this.timeoutHandle);
80
- this.timeoutHandle = undefined;
81
- }
82
- }
83
- }
84
- /**
85
- * FEC Block Manager
86
- *
87
- * Manages multiple FEC blocks, handling:
88
- * - Source symbol registration
89
- * - Repair symbol registration
90
- * - Timeout-based WebTransport fallback
91
- * - Block completion and decoding
92
- */
93
- export class FecBlockManager {
94
- #blocks = new Map();
95
- #timeoutMs;
96
- #k;
97
- maxBlocks;
98
- #repairCallback = null;
99
- #decodeCallback = null;
100
- #stats = {
101
- sourcePackets: 0,
102
- repairPackets: 0,
103
- blocksComplete: 0,
104
- blocksRecovered: 0,
105
- blocksFailed: 0,
106
- fallbackRequests: 0,
107
- };
108
- constructor(options) {
109
- if (options.timeoutMs <= 0)
110
- throw new Error('[FecBlockManager] timeoutMs must be > 0 (derive from catalog FEC config)');
111
- if (options.k <= 0)
112
- throw new Error('[FecBlockManager] k must be > 0 (from catalog fec.sourceSymbols)');
113
- this.#timeoutMs = options.timeoutMs;
114
- this.#k = options.k;
115
- this.maxBlocks = options.maxBlocks ?? 64;
116
- }
117
- setRepairCallback(callback) {
118
- this.#repairCallback = callback;
119
- }
120
- setDecodeCallback(callback) {
121
- this.#decodeCallback = callback;
122
- }
123
- updateParams(params) {
124
- if (params.k !== undefined)
125
- this.#k = params.k;
126
- if (params.timeoutMs !== undefined)
127
- this.#timeoutMs = params.timeoutMs;
128
- }
129
- /**
130
- * Add a source symbol to a block.
131
- * @param blockK — per-block K for object FEC (§9.1). When provided, overrides
132
- * the global K for this block. For interleaved mode, omit (uses global K).
133
- */
134
- addSourcePacket(blockId, esi, data, blockK) {
135
- this.#stats.sourcePackets++;
136
- let block = this.#blocks.get(blockId);
137
- if (!block) {
138
- block = this.#createBlock(blockId, blockK);
139
- }
140
- const complete = block.addSourceSymbol(esi, data);
141
- if (complete) {
142
- return this.#completeBlock(block);
143
- }
144
- return null;
145
- }
146
- /**
147
- * Add a repair symbol to a block.
148
- * @param blockK — per-block K from SSB_length in the Repair FEC Payload ID
149
- * (ISO 23008-1 C.5.3). RSB_length is a different field: the repair symbol
150
- * count, which under layered repair is the base-layer total P, not K.
151
- * Required for object FEC; omit for interleaved mode.
152
- */
153
- addRepairPacket(blockId, esi, data, blockK) {
154
- this.#stats.repairPackets++;
155
- let block = this.#blocks.get(blockId);
156
- if (!block) {
157
- block = this.#createBlock(blockId, blockK);
158
- }
159
- else if (blockK && block.k !== blockK) {
160
- // Object FEC: repair reveals actual K — update block if first repair arrives
161
- // before enough source symbols to infer K.
162
- block.k = blockK;
163
- }
164
- const canDecode = block.addRepairSymbol(esi, data);
165
- if (canDecode && block.state !== FEC_STATE.DECODED) {
166
- return this.#decodeBlock(block);
167
- }
168
- return null;
169
- }
170
- getStats() {
171
- return {
172
- ...this.#stats,
173
- activeBlocks: this.#blocks.size,
174
- recoveryRate: this.#stats.blocksComplete > 0
175
- ? (this.#stats.blocksRecovered / this.#stats.blocksComplete) * 100
176
- : 100,
177
- };
178
- }
179
- reset() {
180
- for (const block of this.#blocks.values()) {
181
- block.clearTimeout();
182
- }
183
- this.#blocks.clear();
184
- this.#stats = {
185
- sourcePackets: 0,
186
- repairPackets: 0,
187
- blocksComplete: 0,
188
- blocksRecovered: 0,
189
- blocksFailed: 0,
190
- fallbackRequests: 0,
191
- };
192
- }
193
- /**
194
- * @param blockK — per-block K for object FEC (§9.1). Falls back to global #k.
195
- */
196
- #createBlock(blockId, blockK) {
197
- if (this.#blocks.size >= this.maxBlocks) {
198
- this.#evictOldestBlock();
199
- }
200
- const k = blockK ?? this.#k;
201
- if (k <= 0) {
202
- throw new Error(`[FecBlockManager] Cannot create block ${blockId}: K=${k}. Derive K from catalog (interleaved) or frame size (object §9.1).`);
203
- }
204
- const block = new FecBlock(blockId, k);
205
- this.#blocks.set(blockId, block);
206
- block.timeoutHandle = setTimeout(() => {
207
- this.#onBlockTimeout(blockId);
208
- }, this.#timeoutMs);
209
- return block;
210
- }
211
- #onBlockTimeout(blockId) {
212
- const block = this.#blocks.get(blockId);
213
- if (!block || block.state >= FEC_STATE.COMPLETE) {
214
- return;
215
- }
216
- block.state = FEC_STATE.FALLBACK;
217
- this.#stats.fallbackRequests++;
218
- const missingEsis = block.getMissingEsis();
219
- if (missingEsis.length > 0 && this.#repairCallback) {
220
- console.log(`[FecBlockManager] Block ${blockId} timeout, requesting ${missingEsis.length} repair symbols`);
221
- this.#repairCallback(blockId, missingEsis);
222
- }
223
- block.timeoutHandle = setTimeout(() => {
224
- if (block.state === FEC_STATE.FALLBACK) {
225
- block.state = FEC_STATE.FAILED;
226
- this.#stats.blocksFailed++;
227
- // Throttle: log only every 50th failure to avoid console flood
228
- if (this.#stats.blocksFailed <= 3 || this.#stats.blocksFailed % 50 === 0) {
229
- console.warn(`[FecBlockManager] Block ${blockId} failed - insufficient symbols (total: ${this.#stats.blocksFailed})`);
230
- }
231
- this.#blocks.delete(blockId);
232
- }
233
- }, this.#timeoutMs * 2);
234
- }
235
- #completeBlock(block) {
236
- block.clearTimeout();
237
- block.state = FEC_STATE.DECODED;
238
- block.decodedAt = performance.now();
239
- this.#stats.blocksComplete++;
240
- const data = this.#assembleBlock(block);
241
- if (this.#decodeCallback) {
242
- this.#decodeCallback(block.blockId, data);
243
- }
244
- // GC: block reached terminal state — release symbols immediately.
245
- // No delay needed: callers already have the assembled data.
246
- this.#blocks.delete(block.blockId);
247
- return data;
248
- }
249
- #decodeBlock(block) {
250
- block.clearTimeout();
251
- block.state = FEC_STATE.DECODED;
252
- block.decodedAt = performance.now();
253
- this.#stats.blocksComplete++;
254
- this.#stats.blocksRecovered++;
255
- console.log(`[FecBlockManager] Block ${block.blockId} recovered via FEC ` +
256
- `(${block.sourceSymbols.size} source + ${block.repairSymbols.size} repair)`);
257
- // TODO: Integrate with RaptorQ WASM decoder for actual FEC recovery
258
- const data = this.#assembleBlock(block);
259
- if (this.#decodeCallback) {
260
- this.#decodeCallback(block.blockId, data);
261
- }
262
- // GC: block reached terminal state — release symbols immediately.
263
- this.#blocks.delete(block.blockId);
264
- return data;
265
- }
266
- #assembleBlock(block) {
267
- const esis = [...block.sourceSymbols.keys()].sort((a, b) => a - b);
268
- const totalSize = esis.reduce((sum, esi) => sum + block.sourceSymbols.get(esi).length, 0);
269
- const result = new Uint8Array(totalSize);
270
- let offset = 0;
271
- for (const esi of esis) {
272
- const symbol = block.sourceSymbols.get(esi);
273
- result.set(symbol, offset);
274
- offset += symbol.length;
275
- }
276
- return result;
277
- }
278
- #evictOldestBlock() {
279
- let oldest = null;
280
- let oldestTime = Infinity;
281
- for (const block of this.#blocks.values()) {
282
- if (block.createdAt < oldestTime) {
283
- oldestTime = block.createdAt;
284
- oldest = block;
285
- }
286
- }
287
- if (oldest) {
288
- oldest.clearTimeout();
289
- if (oldest.state < FEC_STATE.DECODED) {
290
- this.#stats.blocksFailed++;
291
- }
292
- this.#blocks.delete(oldest.blockId);
293
- }
294
- }
295
- }
296
- //# sourceMappingURL=block-manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block-manager.js","sourceRoot":"","sources":["../src/block-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,UAAU,EAAE,CAAC;IACb,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;CACA,CAAC;AAyBX;;;GAGG;AACH,MAAM,QAAQ;IACb,OAAO,CAAS;IAChB,KAAK,GAAa,SAAS,CAAC,KAAK,CAAC;IAClC,aAAa,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC9C,aAAa,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC9C,CAAC,CAAS;IACV,aAAa,CAA4C;IACzD,SAAS,CAAS;IAClB,SAAS,CAAqB;IAE9B,YAAY,OAAe,EAAE,CAAS;QACrC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACX,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;IACpC,CAAC;IAED,eAAe,CAAC,GAAW,EAAE,IAAgB;QAC5C,IAAI,IAAI,CAAC,KAAK,IAAI,SAAS,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAC;QAEnD,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAClC,IAAI,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