@blockcast/mmt-container 0.1.0-main.ce3c8aeb7f68 → 0.1.0-main.d0bb31684c09

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 (248) hide show
  1. package/README.md +93 -6
  2. package/dist/block-policy.d.ts +314 -0
  3. package/dist/block-policy.d.ts.map +1 -0
  4. package/dist/block-policy.js +466 -0
  5. package/dist/block-policy.js.map +7 -0
  6. package/dist/browser-runtime.js +5797 -926
  7. package/dist/browser-runtime.js.map +4 -4
  8. package/dist/carp-catalog.d.ts +66 -4
  9. package/dist/carp-catalog.d.ts.map +1 -1
  10. package/dist/carp-catalog.js +49 -24
  11. package/dist/carp-catalog.js.map +3 -3
  12. package/dist/catalog-fec-params.d.ts +35 -10
  13. package/dist/catalog-fec-params.d.ts.map +1 -1
  14. package/dist/catalog-fec-params.js +81 -18
  15. package/dist/catalog-fec-params.js.map +4 -4
  16. package/dist/catalog-network-source.d.ts +25 -2
  17. package/dist/catalog-network-source.d.ts.map +1 -1
  18. package/dist/catalog-network-source.js +21 -2
  19. package/dist/catalog-network-source.js.map +4 -4
  20. package/dist/cmaf-block-assembler.d.ts +60 -11
  21. package/dist/cmaf-block-assembler.d.ts.map +1 -1
  22. package/dist/cmaf-block-assembler.js +403 -206
  23. package/dist/cmaf-block-assembler.js.map +4 -4
  24. package/dist/cmaf-group-batcher.js.map +1 -1
  25. package/dist/cmcd-producer.d.ts.map +1 -1
  26. package/dist/cmcd-producer.js +0 -3
  27. package/dist/cmcd-producer.js.map +2 -2
  28. package/dist/codec-utils.d.ts +144 -8
  29. package/dist/codec-utils.d.ts.map +1 -1
  30. package/dist/codec-utils.js +316 -38
  31. package/dist/codec-utils.js.map +2 -2
  32. package/dist/conceal-timeline.d.ts +146 -0
  33. package/dist/conceal-timeline.d.ts.map +1 -0
  34. package/dist/conceal-timeline.js +137 -0
  35. package/dist/conceal-timeline.js.map +7 -0
  36. package/dist/delivery-gap.d.ts +75 -0
  37. package/dist/delivery-gap.d.ts.map +1 -0
  38. package/dist/delivery-gap.js +88 -0
  39. package/dist/delivery-gap.js.map +7 -0
  40. package/dist/duplicate-ledger.d.ts +197 -0
  41. package/dist/duplicate-ledger.d.ts.map +1 -0
  42. package/dist/duplicate-ledger.js +226 -0
  43. package/dist/duplicate-ledger.js.map +7 -0
  44. package/dist/fec-manager.d.ts +214 -24
  45. package/dist/fec-manager.d.ts.map +1 -1
  46. package/dist/fec-manager.js +1701 -174
  47. package/dist/fec-manager.js.map +4 -4
  48. package/dist/fec-state.d.ts +99 -0
  49. package/dist/fec-state.d.ts.map +1 -0
  50. package/dist/fec-state.js +54 -0
  51. package/dist/fec-state.js.map +7 -0
  52. package/dist/fec-worker-setup.d.ts.map +1 -1
  53. package/dist/fec-worker-setup.js +15 -13
  54. package/dist/fec-worker-setup.js.map +2 -2
  55. package/dist/index.d.ts +15 -11
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +67 -5
  58. package/dist/index.js.map +2 -2
  59. package/dist/media-router.d.ts +14 -3
  60. package/dist/media-router.d.ts.map +1 -1
  61. package/dist/media-router.js +34 -4
  62. package/dist/media-router.js.map +2 -2
  63. package/dist/mfu-reassembler.js +5 -0
  64. package/dist/mfu-reassembler.js.map +3 -3
  65. package/dist/mmtp-container-parser.d.ts +97 -0
  66. package/dist/mmtp-container-parser.d.ts.map +1 -1
  67. package/dist/mmtp-container-parser.js +411 -10
  68. package/dist/mmtp-container-parser.js.map +3 -3
  69. package/dist/mmtp-container-parser.no-modules.js +521 -52
  70. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  71. package/dist/mmtp-decode-pipeline.d.ts +7 -1
  72. package/dist/mmtp-decode-pipeline.d.ts.map +1 -1
  73. package/dist/mmtp-decode-pipeline.js +419 -14
  74. package/dist/mmtp-decode-pipeline.js.map +3 -3
  75. package/dist/mmtp-router.d.ts +233 -16
  76. package/dist/mmtp-router.d.ts.map +1 -1
  77. package/dist/mmtp-router.js +1899 -373
  78. package/dist/mmtp-router.js.map +4 -4
  79. package/dist/mmtp-to-cmaf.d.ts +18 -12
  80. package/dist/mmtp-to-cmaf.d.ts.map +1 -1
  81. package/dist/mmtp-to-cmaf.js +25 -77
  82. package/dist/mmtp-to-cmaf.js.map +2 -2
  83. package/dist/multicast-input.d.ts +64 -2
  84. package/dist/multicast-input.d.ts.map +1 -1
  85. package/dist/multicast-input.js +123 -14
  86. package/dist/multicast-input.js.map +3 -3
  87. package/dist/multicast-manager.d.ts +298 -23
  88. package/dist/multicast-manager.d.ts.map +1 -1
  89. package/dist/multicast-manager.js +5765 -1611
  90. package/dist/multicast-manager.js.map +4 -4
  91. package/dist/multicast-transport.d.ts +122 -1
  92. package/dist/multicast-transport.d.ts.map +1 -1
  93. package/dist/multicast-transport.js +524 -51
  94. package/dist/multicast-transport.js.map +4 -4
  95. package/dist/multicast-unwrap.js +5 -0
  96. package/dist/multicast-unwrap.js.map +3 -3
  97. package/dist/no-modules.d.ts +1 -0
  98. package/dist/no-modules.d.ts.map +1 -1
  99. package/dist/no-modules.js +513 -48
  100. package/dist/no-modules.js.map +3 -3
  101. package/dist/repair-fetch.d.ts +221 -23
  102. package/dist/repair-fetch.d.ts.map +1 -1
  103. package/dist/repair-fetch.js +308 -85
  104. package/dist/repair-fetch.js.map +4 -4
  105. package/dist/signaling.js +429 -95
  106. package/dist/signaling.js.map +3 -3
  107. package/dist/timestamp-codec.js +5 -0
  108. package/dist/timestamp-codec.js.map +3 -3
  109. package/dist/track-pipeline-setup.d.ts +11 -0
  110. package/dist/track-pipeline-setup.d.ts.map +1 -1
  111. package/dist/track-pipeline-setup.js +8 -3
  112. package/dist/track-pipeline-setup.js.map +2 -2
  113. package/dist/track-session.d.ts +16 -0
  114. package/dist/track-session.d.ts.map +1 -1
  115. package/dist/track-session.js +16 -0
  116. package/dist/track-session.js.map +2 -2
  117. package/dist/wasm-mfu-reassembler.js +5 -0
  118. package/dist/wasm-mfu-reassembler.js.map +3 -3
  119. package/dist/wasm-mmtp-container-parser.js +411 -10
  120. package/dist/wasm-mmtp-container-parser.js.map +3 -3
  121. package/node_modules/@blockcast/fec-worker/README.md +8 -4
  122. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts +22 -0
  123. package/node_modules/@blockcast/fec-worker/dist/block-order.d.ts.map +1 -0
  124. package/node_modules/@blockcast/fec-worker/dist/block-order.js +38 -0
  125. package/node_modules/@blockcast/fec-worker/dist/block-order.js.map +1 -0
  126. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts +0 -2
  127. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.d.ts.map +1 -1
  128. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js +0 -8
  129. package/node_modules/@blockcast/fec-worker/dist/fec-worker-client.js.map +1 -1
  130. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts +44 -8
  131. package/node_modules/@blockcast/fec-worker/dist/fec-worker-types.d.ts.map +1 -1
  132. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js +54 -45
  133. package/node_modules/@blockcast/fec-worker/dist/fec-worker.js.map +3 -3
  134. package/node_modules/@blockcast/fec-worker/src/block-order.ts +42 -0
  135. package/node_modules/@blockcast/fec-worker/src/fec-worker-client.ts +0 -9
  136. package/node_modules/@blockcast/fec-worker/src/fec-worker-types.ts +44 -5
  137. package/node_modules/@blockcast/fec-worker/src/fec-worker.ts +84 -66
  138. package/node_modules/@blockcast/mmt-base/README.md +15 -2
  139. package/node_modules/@blockcast/mmt-base/dist/index.d.ts +4 -0
  140. package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -1
  141. package/node_modules/@blockcast/mmt-base/dist/index.js +4 -0
  142. package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -1
  143. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -36
  144. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -1
  145. package/node_modules/@blockcast/mmt-base/dist/mmtp.js +2 -140
  146. package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -1
  147. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
  148. package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
  149. package/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
  150. package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
  151. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
  152. package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
  153. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
  154. package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
  155. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
  156. package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
  157. package/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
  158. package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
  159. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
  160. package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
  161. package/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
  162. package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
  163. package/node_modules/@blockcast/mmt-base/package.json +1 -1
  164. package/node_modules/@blockcast/mmt-base/src/index.ts +4 -0
  165. package/node_modules/@blockcast/mmt-base/src/mmtp.ts +2 -130
  166. package/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
  167. package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
  168. package/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
  169. package/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
  170. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.d.ts.map +1 -1
  171. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js +6 -1
  172. package/node_modules/@blockcast/mmt-fec/dist/fec-block-mapper.js.map +1 -1
  173. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts +1 -1
  174. package/node_modules/@blockcast/mmt-fec/dist/index.d.ts.map +1 -1
  175. package/node_modules/@blockcast/mmt-fec/dist/index.js +1 -1
  176. package/node_modules/@blockcast/mmt-fec/dist/index.js.map +1 -1
  177. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts +89 -3
  178. package/node_modules/@blockcast/mmt-fec/dist/oti.d.ts.map +1 -1
  179. package/node_modules/@blockcast/mmt-fec/dist/oti.js +131 -3
  180. package/node_modules/@blockcast/mmt-fec/dist/oti.js.map +1 -1
  181. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/README.md +15 -2
  182. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts +4 -0
  183. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -1
  184. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js +4 -0
  185. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -1
  186. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -36
  187. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -1
  188. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js +2 -140
  189. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -1
  190. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +18 -0
  191. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +1 -0
  192. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js +18 -0
  193. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +1 -0
  194. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +47 -0
  195. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +1 -0
  196. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js +54 -0
  197. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +1 -0
  198. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +57 -0
  199. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +1 -0
  200. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js +98 -0
  201. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +1 -0
  202. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +312 -0
  203. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +1 -0
  204. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js +637 -0
  205. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/dist/signalling.js.map +1 -0
  206. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/package.json +1 -1
  207. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/index.ts +4 -0
  208. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/mmtp.ts +2 -130
  209. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/net-constants.ts +17 -0
  210. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/ntp-short.ts +67 -0
  211. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/serial-number.ts +107 -0
  212. package/node_modules/@blockcast/mmt-fec/node_modules/@blockcast/mmt-base/src/signalling.ts +862 -0
  213. package/node_modules/@blockcast/mmt-fec/src/fec-block-mapper.ts +7 -1
  214. package/node_modules/@blockcast/mmt-fec/src/index.ts +3 -0
  215. package/node_modules/@blockcast/mmt-fec/src/oti.ts +152 -6
  216. package/package.json +18 -6
  217. package/schemas/catalog.schema.json +7 -32
  218. package/src/block-policy.ts +903 -0
  219. package/src/carp-catalog.ts +104 -32
  220. package/src/catalog-fec-params.ts +98 -20
  221. package/src/catalog-network-source.ts +29 -4
  222. package/src/cmaf-block-assembler.ts +283 -162
  223. package/src/cmcd-producer.ts +0 -5
  224. package/src/codec-utils.ts +426 -53
  225. package/src/conceal-timeline.ts +293 -0
  226. package/src/delivery-gap.ts +147 -0
  227. package/src/duplicate-ledger.ts +372 -0
  228. package/src/fec-manager.ts +1625 -191
  229. package/src/fec-state.ts +173 -0
  230. package/src/fec-worker-setup.ts +63 -5
  231. package/src/index.ts +106 -1
  232. package/src/media-router.ts +54 -8
  233. package/src/mmtp-container-parser.ts +472 -4
  234. package/src/mmtp-decode-pipeline.ts +23 -6
  235. package/src/mmtp-router.ts +1457 -227
  236. package/src/mmtp-to-cmaf.ts +71 -118
  237. package/src/multicast-input.ts +352 -18
  238. package/src/multicast-manager.ts +1104 -97
  239. package/src/multicast-transport.ts +529 -29
  240. package/src/no-modules.ts +1 -0
  241. package/src/repair-fetch.ts +654 -154
  242. package/src/track-pipeline-setup.ts +18 -2
  243. package/src/track-session.ts +16 -0
  244. package/test-vectors/catalog/README.md +28 -2
  245. package/test-vectors/catalog/negative/multicast-network-source-empty.json +43 -0
  246. package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +42 -0
  247. package/test-vectors/catalog-validation.json +469 -25
  248. package/test-vectors/hevc-x265-repeat-headers-v1.json +40 -0
package/README.md CHANGED
@@ -65,6 +65,8 @@ The package exposes a wide subpath surface so consumers can tree-shake aggressiv
65
65
  | `./loc` | LOC FEC extension headers (`FecSourceInfo`, `AuthTag`) |
66
66
  | `./codec-utils` | H.264 helpers — Annex-B ↔ AVCC, SPS/PPS extraction, `mmtpTimestampToMicros`, ADTS wrap |
67
67
  | `./fec-manager` | `FECManager` — per-track FEC decoder lifecycle (sync WASM + Worker variants) |
68
+ | `./block-policy` | Keyframe-protected repair policy — `BlockClassifier`, `repairPriorityForClass`, `decideGap` |
69
+ | `./conceal-timeline` | Sink concealment — `videoConcealModeForCodec`, `HoldLastTimeline`, `AudioGapConcealer` |
68
70
  | `./mmtp-router` | `MmtpRouter` — packet routing with two-phase FEC feed |
69
71
  | `./multicast-transport` | `MulticastTransport` — `window.multicast` gateway `subscribe({ consume: 'bytes' })` wrapper |
70
72
  | `./multicast-manager` | `MulticastManager` — backwards-compat facade composing transport + router + FEC |
@@ -82,7 +84,7 @@ The package exposes a wide subpath surface so consumers can tree-shake aggressiv
82
84
  | `./phase14-catalog-override` | Test-harness catalog override hook (`globalThis.__PHASE14_CATALOG_OVERRIDE`) |
83
85
  | `./align` | Group-id derivation (`groupIdForTicks`, `groupIdFor`, `driftCheck`) — shared with Go sender + Rust relay |
84
86
  | `./mmtp-decode-pipeline` | `MmtpDecodePipeline` — unified MoQ + multicast decode path |
85
- | `./mmtp-to-cmaf` | `MmtpToCmaf` + standalone segment builders (`encodeMultiSampleSegment`, `buildVideoInitSegment`, `generateGreenFillNAL`, `generateSilenceFrame`) |
87
+ | `./mmtp-to-cmaf` | `MmtpToCmaf` + standalone segment builders (`encodeMultiSampleSegment`, `buildVideoInitSegment`, `generateSilenceFrame`) |
86
88
  | `./track-pipeline-setup` | `setupTrackPipeline` — shared wiring for both reference players |
87
89
  | `./track-session` | `TrackSession` + `SessionManager` — per-track state machine (Patent Claim 9) |
88
90
 
@@ -115,7 +117,7 @@ function parseMPUHeader(buf: Uint8Array, offset: number): MPUHeader
115
117
  function extractMFUPayload(packet: Uint8Array): MFUExtraction | null
116
118
  function extractFecPayloadId(packet: Uint8Array): { ssId: number } | null
117
119
  function extractRepairFecPayloadId(packet: Uint8Array): RepairFecId | null
118
- function parseAlFecMessage(buf: Uint8Array): AlFecConfig
120
+ function parseAlFecMessage(buf: Uint8Array): AlFecMessage | null // every FEC flow (Table C.3, Amd 1:2025)
119
121
  function parseMoqRepairFrame(buf: Uint8Array): MoqRepairFrame
120
122
  ```
121
123
 
@@ -190,14 +192,21 @@ interface FecCatalogConfig {
190
192
  }
191
193
 
192
194
  interface MulticastEndpoint {
193
- protocol: "ssm" | "asm" | "amt"
195
+ protocol: "ssm" | "asm" | "amt" | "atsc3"
194
196
  sourceAddress?: string // REQUIRED for SSM
195
197
  groupAddress: string
196
198
  port: number
197
199
  tracks: string[]
198
- relayAddress?: string // REQUIRED for AMT
200
+ // relayAddress?: string — deprecated, read-only (see Breaking, below)
199
201
  }
200
202
 
203
+ // Relay/tuning discovery is catalog-level, not per-endpoint:
204
+ // multicast.networkSource: [{ type: "amt", discovery: "driad" | "manual",
205
+ // relay?: string, port?: number }]
206
+ // `relay` is REQUIRED for discovery: "manual"; "driad" resolves it at runtime.
207
+ // An endpoint-level `relayAddress` is retired — the schema and moq-rs both
208
+ // reject it.
209
+
201
210
  interface TrackTimingConfig {
202
211
  groupDurationMs: number // REQUIRED, positive integer
203
212
  groupDurationTicks?: number // override when ms × timescale isn't integer
@@ -209,6 +218,45 @@ function resolveGroupDurationTicks(timing: TrackTimingConfig, timescale: number)
209
218
  function validateSwitchingSetTiming(...): { ok: true } | { ok: false; ... }
210
219
  ```
211
220
 
221
+ #### Breaking: multicast emitter output (BLO-37834)
222
+
223
+ `multicastFromConfig` / `multicastFromEnv` no longer emit
224
+ `endpoints[].relayAddress` or `amtFallback`. Both are lifted into catalog-level
225
+ `multicast.networkSource` (`{type: "amt", discovery, relay?}`), and a native
226
+ multicast catalog omits `networkSource` entirely (BLO-37926). A reader that
227
+ still looks for `relayAddress` or `amtFallback` reads `undefined`: read
228
+ `networkSource` instead (`catalogAmtNetworkSource` in `./catalog-network-source`
229
+ resolves a dialable AMT relay from it, skipping `discovery: "driad"` entries
230
+ whose `relay` is a DNS name for a runtime lookup rather than an address), and
231
+ keep accepting `relayAddress` from catalogs published before this change until
232
+ every emitter is on it.
233
+
234
+ Inputs are unchanged: `relayAddress` and `amtFallback` are still accepted and
235
+ lifted. An input relay that would not survive into the emitted `networkSource`
236
+ (two endpoints with different relays, one overridden by
237
+ `amtFallback.relayDns` or an explicit `networkSource`, or one matched only by a
238
+ `discovery: "driad"` entry, whose relay is a runtime discovery hint) now throws
239
+ `conflicting_amt_relay` instead of being dropped. For that last case — wanting
240
+ DRIAD *and* a named relay — emit both entries, `[{type: "amt", discovery:
241
+ "manual", relay}, {type: "amt", discovery: "driad"}]`: readers join the first
242
+ non-DRIAD AMT entry, so the manual one carries the relay while the DRIAD one
243
+ keeps the discovery request. An `atsc3` endpoint now
244
+ requires a `{type: "atsc3", …}` entry and throws `atsc3_requires_tuning`
245
+ without one: that entry carries the frequency, PLP, service id and SLS URI,
246
+ which is the only tuning information an ATSC3 receiver has, and the schema
247
+ cannot enforce it because `networkSource` is optional there (a native join has
248
+ none). `version`, `validUntil` and `enabled` are still emitted and still
249
+ outside `$defs/multicast` (the BLO-3323 freshness model, tracked separately).
250
+
251
+ `MulticastInputErrorKind` gains two members, `atsc3_requires_tuning` and
252
+ `invalid_endpoints`. The union is exported, so a consumer that `switch`es on it
253
+ exhaustively needs the two new arms to keep compiling.
254
+
255
+ The package version stays `0.1.0`: consumers pin a libmmt commit (`file:` or the
256
+ per-commit `0.1.0-main.<sha>` prerelease from `stamp-prerelease.mjs`), and a
257
+ `0.2.0` would fall outside the `^0.1.0` range that siblings such as
258
+ `mmt-render` declare.
259
+
212
260
  #### Track-role convention (Phase 14)
213
261
 
214
262
  This is **project-specific**, not in any IETF draft yet. The container's switching-set parser derives its internal role from the last `/`-segment of a track name. MMTP catalogs may also carry the publisher-owned `trackRole` dispatch tag; the canonical schema validates it as a non-empty string. `parseTrackRole` remains the name-based helper for base/delta/repair switching sets (`carp-catalog.ts:41-79`):
@@ -263,6 +311,47 @@ class FECManager {
263
311
 
264
312
  `interleaveDepthMs` is the full FEC block span in **milliseconds** per CARP §5.1, valid range 33 ms (interactive / gaming, `MIN_INTERLEAVE_DEPTH_MS`) to 10 000 ms (broadcast ATSC 3.0). `configure()` warns if a positive value below `MIN_INTERLEAVE_DEPTH_MS` (33) is passed — that is almost certainly a raw frame count, not milliseconds — and such sub-floor values never drive the block timeout (the established timeout is preserved instead of collapsing to ~0).
265
313
 
314
+ ### Keyframe-protected repair (`./block-policy`, `./conceal-timeline`)
315
+
316
+ Every FEC block still gets in-band FEC decode. On top of that:
317
+
318
+ - **Classification.** Each block is `keyframe | delta | unknown | audio`, from
319
+ first-arrival network source evidence only (MMTP R bit, MPU number, MFU
320
+ DU-header sample position) against catalog geometry (framerate,
321
+ `interleaveDepthMs`, keyframe interval). Geometry that cannot be derived
322
+ exactly, or any violated invariant, runs the track `all-protected` (every
323
+ video block `unknown`). Vanished blocks are materialised from SBN evidence.
324
+ A frame split across ADJACENT blocks (a K-close) is expected; only source
325
+ packets whose authored order and SBN order disagree (a round-robin
326
+ interleave) trip `block-not-contiguous`. Pass the catalog track name to
327
+ `configureTrackFec(packetId, config, catalogTrackName)` so ABR rungs that
328
+ share a packetId each classify with their own framerate and GOP; a rung on
329
+ such a packetId without its own geometry runs `stream-geometry-absent`.
330
+ - **Repair priority.** `wireRepairFetch` dispatches P0 (`keyframe`/`unknown`)
331
+ and P1 (`audio`) immediately; P2 (`delta`) only while no P0/P1 is queued or
332
+ in flight, earliest deadline first, preempted by any new P0/P1. No timers.
333
+ - **FETCH priority (draft-ramadan-moq-fec §11.4.5).** The transport gets one
334
+ `RepairFetchRequest { repairTrack, sbn, packetId, signal,
335
+ subscriberPriority }` and puts `subscriberPriority` on the FETCH
336
+ (`undefined` = omit the parameter; the publisher then uses 128,
337
+ draft-ietf-moq-transport-16 §9.2.2.3). P0 requests carry
338
+ `min(sourcePriority, 191)`; P1/P2 carry `max(repairPriority, 192)`. Both
339
+ priorities come from `ResolveRepairTarget` (`catalogRepairTarget` reads
340
+ them from a catalog). A missing source priority omits the parameter; a
341
+ missing repair priority declines the delta/audio FETCH; each emits a
342
+ `repair-priority` lifecycle event. Abort MUST send FETCH_CANCEL, from the
343
+ abort handler.
344
+ - **Stall vs conceal.** FEC tracks release frames in authored order; a frame
345
+ after a gap waits until every block that could hold the missing frames
346
+ resolved. When media was lost, the frame carries `gapBefore`
347
+ (`decideGap`): video stalls only when a RAP may be inside the gap; audio
348
+ never stalls. The same object is the manager's `gap` lifecycle event.
349
+ - **Concealment** is hold-last-good-frame (`HoldLastTimeline`) plus exact
350
+ audio sizing (`AudioGapConcealer`). No bitstream is ever synthesised.
351
+
352
+ Typed evidence is `RepairLifecycleEvent` version 2 and
353
+ `MulticastManager.getBlockPolicyStats()`.
354
+
266
355
  This package depends on the FEC primitives from:
267
356
  - **`@blockcast/mmt-fec`** — RaptorQ WASM decoder + OTI codec + `computeFecTimeout`
268
357
  - **`@blockcast/fec-worker`** — Web Worker host, `FecWorkerClient`, `FecTrackStats`
@@ -293,7 +382,6 @@ Standalone helpers exported from the same module:
293
382
  | `encodeMultiSampleSegment(...)` | Multi-sample moof+mdat (one per FEC block — used by `CmafBlockAssembler`) |
294
383
  | `buildVideoInitSegment(avcC, w, h)` | ftyp + moov for AVC |
295
384
  | `buildAudioInitSegment(sampleRate, channels, asc?, timescale?)` | ftyp + moov for AAC / Opus |
296
- | `generateGreenFillNAL(avcC, w, h)` | Green-fill NAL when a FEC block fails (loss visible) |
297
385
  | `generateSilenceFrame(codec, sampleRate, channels)` | Audio silence frame for FEC-failed audio blocks |
298
386
 
299
387
  Per-track timestamp rebase (`#videoBaseTs` / `#audioBaseTs` at `mmtp-to-cmaf.ts:550-562`) prevents the negative-uint64 `tfdt` bug that kills Chromium MediaSource (`CHUNK_DEMUXER_ERROR_APPEND_FAILED`).
@@ -322,7 +410,6 @@ Vendor keys emitted (BLO-1044):
322
410
  | `x-bc-fec-algo` | FEC config | `none` / `raptorq` / `reed-solomon` |
323
411
  | `x-bc-fec-k`, `x-bc-fec-p` | FEC config | source / repair counts |
324
412
  | `x-bc-fec-recovery` | `recoveryRate` | Block-level recovery, 4 decimal places |
325
- | `x-bc-scu` | green-fill count | Omitted when 0 |
326
413
  | `x-bc-alta-verified`, `x-bc-alta-failures` | ALTA stats | Omitted when ALTA disabled (D-09) |
327
414
  | `x-bc-transport` | `TransportSnapshot.transport` | `native` / `amt` / `moq` |
328
415
  | `x-bc-multicast-group`, `x-bc-multicast-source`, `x-bc-amt-relay` | endpoint | Omitted when null |
@@ -0,0 +1,314 @@
1
+ /**
2
+ * Keyframe-protected FEC repair policy.
3
+ *
4
+ * Every FEC block still gets in-band FEC decode. What this module decides is
5
+ * (1) which blocks may hold a keyframe (RAP), so a block short of K at its
6
+ * repair deadline can be repaired over QUIC with the right priority, and
7
+ * (2) what a sink must do with the first frame released after a gap: stall
8
+ * until the next RAP, or conceal and keep playing.
9
+ *
10
+ * The two decisions are deliberately independent. Classification only sets
11
+ * repair priority. The stall/conceal decision is made again per released gap
12
+ * from the media that is actually missing, so a wrong classification can only
13
+ * lower a block's repair priority; it can never make playback wrong.
14
+ *
15
+ * Everything here is derived from catalog-authored timing and in-band MMTP
16
+ * evidence. There are no timers, no cadence heuristics, and no defaults: a
17
+ * track whose geometry cannot be derived exactly runs in the defined
18
+ * fail-closed mode `all-protected`, where every block is treated as possibly
19
+ * keyframe-bearing.
20
+ *
21
+ * All three players (moqtail, hang, Shaka) consume this one implementation.
22
+ */
23
+ /**
24
+ * Repair class of one FEC block.
25
+ *
26
+ * - `keyframe`: the block holds (or held) a RAP / MPU start.
27
+ * - `delta`: the block provably holds only non-RAP video frames.
28
+ * - `unknown`: neither could be proven; treated exactly like `keyframe`.
29
+ * - `audio`: an audio block.
30
+ */
31
+ export type BlockClass = 'keyframe' | 'delta' | 'unknown' | 'audio';
32
+ /** Repair priority. Lower is more urgent. */
33
+ export type RepairPriority = 0 | 1 | 2;
34
+ export type TrackKind = 'video' | 'audio';
35
+ /** P0 = keyframe/unknown (stall-preventing), P1 = audio, P2 = delta. */
36
+ export declare function repairPriorityForClass(blockClass: BlockClass): RepairPriority;
37
+ export type ClassifierMode = 'classifying' | 'all-protected';
38
+ /** Why a track runs `all-protected`. */
39
+ export type ClassifierReason = 'framerate-absent' | 'keyframe-cadence-absent' | 'keyframe-interval-not-integral' | 'block-spans-gop'
40
+ /**
41
+ * The catalog keyframe interval is not an exact integer number of ticks
42
+ * in the media track's own timescale (ISO-BMFF `mdhd`), so released RAP
43
+ * spacing cannot be verified and hold-last cannot predict the next RAP.
44
+ * Nothing is wrong with the stream; the cadence is simply unprovable.
45
+ */
46
+ | 'keyframe-interval-not-media-integral'
47
+ /**
48
+ * Another stream on this packetId was configured with its own geometry
49
+ * and this one was not, so no geometry provably belongs to it (ABR rungs
50
+ * sharing a packetId).
51
+ */
52
+ | 'stream-geometry-absent' | 'rap-not-mpu-start' | 'mpu-longer-than-gop' | 'block-not-contiguous' | 'rap-spacing-mismatch' | 'mpu-multiple-fragments' | 'block-wider-than-interleave';
53
+ /** Raw catalog timing for one track. Never a resolved cadence. */
54
+ export interface BlockClassifierGeometryInput {
55
+ readonly trackKind: TrackKind;
56
+ /** Catalog `framerate` (frames per second). */
57
+ readonly framerate?: number;
58
+ /** Catalog `fec.interleaveDepthMs`: the full FEC block span (§5.1). */
59
+ readonly interleaveDepthMs: number;
60
+ /** Catalog track `timescale` for `keyframeIntervalTicks`. */
61
+ readonly timescale?: number;
62
+ /** Catalog `keyframeIntervalTicks` (preferred when the timescale is present). */
63
+ readonly keyframeIntervalTicks?: number;
64
+ /** Catalog `keyframeIntervalMs`. */
65
+ readonly keyframeIntervalMs?: number;
66
+ }
67
+ /** Exact keyframe interval as a rational number of seconds: ticks / timescale. */
68
+ export interface KeyframeInterval {
69
+ readonly ticks: number;
70
+ readonly timescale: number;
71
+ }
72
+ export type BlockClassifierGeometry = {
73
+ readonly trackKind: 'audio';
74
+ } | {
75
+ readonly trackKind: 'video';
76
+ readonly mode: 'classifying';
77
+ /** F: one frame's duration in milliseconds (1000 / framerate). */
78
+ readonly frameDurationMs: number;
79
+ /** D: media units per FEC block (deriveFecInterleaveDepth). */
80
+ readonly interleaveUnits: number;
81
+ /** G: frames per GOP. */
82
+ readonly gopFrames: number;
83
+ readonly keyframeInterval: KeyframeInterval;
84
+ } | {
85
+ readonly trackKind: 'video';
86
+ readonly mode: 'all-protected';
87
+ readonly reason: ClassifierReason;
88
+ };
89
+ /**
90
+ * Derive the per-track classifier geometry from raw catalog fields.
91
+ *
92
+ * `all-protected` is the policy's defined fail-closed state, not a default:
93
+ * it is returned with the exact reason. The only throw is for a value the
94
+ * catalog validator already rejects (a non-positive block span).
95
+ */
96
+ export declare function deriveBlockClassifierGeometry(input: BlockClassifierGeometryInput): BlockClassifierGeometry;
97
+ /**
98
+ * The keyframe interval expressed in a media track's timescale, or null when
99
+ * the geometry is not `classifying` or the interval is not an exact integer
100
+ * number of media ticks.
101
+ */
102
+ export declare function keyframeIntervalMediaTicks(geometry: BlockClassifierGeometry, mediaTimescale: number): bigint | null;
103
+ /**
104
+ * In-band evidence from ONE first-arrival source symbol received from the
105
+ * network. Recovered symbols and repair symbols never contribute, and the
106
+ * MFU `priority > 0x80` hint is not evidence.
107
+ */
108
+ export interface SourceSymbolEvidence {
109
+ /** The MMTP header R (RAP) bit. */
110
+ readonly rap: boolean;
111
+ /** MPU_sequence_number, when parsed from this packet. */
112
+ readonly mpu?: number;
113
+ /**
114
+ * 0-based sample position within the MPU: the MFU DU-header
115
+ * `sample_number` minus one (ISO/IEC 23008-1 numbers samples from 1, and
116
+ * the parser rejects `sample_number` 0). Present only when this packet
117
+ * carried a DU header.
118
+ */
119
+ readonly idx?: number;
120
+ /** movie_fragment_sequence_number from the DU header, when present. */
121
+ readonly movieFragment?: number;
122
+ /**
123
+ * DU-header `offset`: the data unit's authored byte position within its
124
+ * sample (0 for a whole-sample data unit, the partition boundary for a
125
+ * subsample data unit). Present only with `idx`; absent reads as 0.
126
+ */
127
+ readonly offset?: number;
128
+ /**
129
+ * The MMTP header packet_sequence_number (contiguous per packet_id). Not
130
+ * classification evidence: FECManager uses it to bound how many blocks the
131
+ * producer can have started between two source symbols, so an outage is
132
+ * never mistaken for a source restart.
133
+ */
134
+ readonly packetSequenceNumber?: number;
135
+ }
136
+ export type ReclassificationEvidence = 'rap' | 'mpu-span' | 'window' | 'classifier-disabled';
137
+ export type ClassifierChange = {
138
+ readonly kind: 'reclassified';
139
+ readonly sbn: number;
140
+ readonly from: BlockClass;
141
+ readonly to: BlockClass;
142
+ readonly evidence: ReclassificationEvidence;
143
+ } | {
144
+ readonly kind: 'mode';
145
+ readonly mode: 'all-protected';
146
+ readonly reason: ClassifierReason;
147
+ };
148
+ /**
149
+ * Per-stream block classifier.
150
+ *
151
+ * Classes only move toward more protection or narrower evidence:
152
+ * `unknown→delta` and `unknown→keyframe` / `delta→keyframe` on evidence, and
153
+ * `delta→unknown` when an invariant disables classification. `keyframe` is
154
+ * terminal.
155
+ *
156
+ * The delta window rule rests on three premises, each guarded by an
157
+ * invariant that fires on positive evidence only:
158
+ *
159
+ * - P1: the source packets of one block are one contiguous run of the
160
+ * stream's authored order, and blocks follow each other in SBN order
161
+ * (`block-not-contiguous`). The producer assigns SS_IDs in authored order
162
+ * and a block is the SS_ID range [SBN*K, SBN*K + K), so this holds for a
163
+ * block that closes at K symbols in the middle of a frame: that frame's
164
+ * fragments then land in two ADJACENT blocks, which is still one run each.
165
+ * A frame split across adjacent blocks is not a violation.
166
+ * - P2: that run touches at most D media units, counting a frame continued
167
+ * from the previous block (`block-wider-than-interleave`). The producer
168
+ * counts a media-unit boundary only once the open block holds a symbol.
169
+ * - P3: an MPU starts with its only RAP and holds at most G frames
170
+ * (`rap-not-mpu-start`, `mpu-longer-than-gop`, `rap-spacing-mismatch`), in
171
+ * one movie fragment (`mpu-multiple-fragments`).
172
+ *
173
+ * P1 and P2 are what make a block's frames contiguous and lie within
174
+ * [idxMax − D + 1, idxMin + D − 1] of its MPU. What refutes P1 is a pair of
175
+ * source packets whose wire-stated authored order and SBN order disagree:
176
+ * a later MPU in an earlier block, a later data unit of one MPU (by
177
+ * movie_fragment_sequence_number, sample_number, then DU offset) in an
178
+ * earlier block, or one data unit in two blocks. That is the signature of a
179
+ * round-robin interleave, which scatters one run over several concurrent
180
+ * blocks. Non-adjacency alone is not: a sample larger than K packets
181
+ * legitimately spans blocks SBN..SBN+n.
182
+ */
183
+ export declare class BlockClassifier {
184
+ #private;
185
+ constructor(geometry: BlockClassifierGeometry);
186
+ get geometry(): BlockClassifierGeometry;
187
+ get mode(): ClassifierMode;
188
+ get reason(): ClassifierReason | null;
189
+ /**
190
+ * Whether "same MPU on both sides of a gap" still proves the gap held no
191
+ * RAP. It stops holding for the rest of the epoch once a RAP was received
192
+ * inside an MPU or an MPU ran longer than a GOP.
193
+ */
194
+ get mpuBoundsRaps(): boolean;
195
+ /** Begin a fresh epoch (catalog change or track reset). */
196
+ reset(geometry?: BlockClassifierGeometry): void;
197
+ /**
198
+ * Retire this classifier (its stream moves to a new catalog epoch). Every
199
+ * block it had classified `delta` loses the evidence behind that class and
200
+ * reads `unknown` from now on; the returned changes say so.
201
+ */
202
+ retire(): ClassifierChange[];
203
+ /**
204
+ * The stream's SBN sequence restarted (FECManager source discontinuity:
205
+ * a publisher restart, or the SS_ID space wrapped). Authored order and SBN
206
+ * order are comparable only within one continuous sequence, so the P1
207
+ * ledger starts again.
208
+ */
209
+ noteSourceDiscontinuity(): void;
210
+ /** Register a block that exists without evidence (a vanished block). */
211
+ touch(sbn: number): void;
212
+ /** Forget a resolved block. */
213
+ forget(sbn: number): void;
214
+ classOf(sbn: number): BlockClass;
215
+ /** Record one first-arrival source symbol's evidence for block `sbn`. */
216
+ observe(sbn: number, evidence: SourceSymbolEvidence): ClassifierChange[];
217
+ /**
218
+ * Record a RAP frame released in order. Released MPU-start RAPs of MPUs m
219
+ * and m+n must be exactly n keyframe intervals apart in the media
220
+ * timescale, compared as integers.
221
+ *
222
+ * Comparing only consecutive MPUs would miss exactly the case the window
223
+ * rule cannot survive: a short MPU whose successor's RAP was lost (that
224
+ * RAP-bearing block is the one a wrong G calls delta), because the next
225
+ * released RAP then belongs to m+2. Every MPU is one interval long, so the
226
+ * span to any later released RAP proves or refutes all MPUs in between.
227
+ */
228
+ noteReleasedRap(mpu: number, presentationTime: bigint, mediaTimescale: number): ClassifierChange[];
229
+ }
230
+ export interface GapStreamIdentity {
231
+ readonly packetId: number;
232
+ /** Non-empty catalog identity, or null when the producer has no track name. */
233
+ readonly catalogTrackName: string | null;
234
+ }
235
+ /** What the sink knows about one side of a released gap. */
236
+ export interface GapFrameEvidence {
237
+ /**
238
+ * Codec-aware RAP check: `MmtpContainerParser.isKeyframe(data, rapFlag,
239
+ * codec)`, bitstream-only for recovered frames. Never the priority hint.
240
+ */
241
+ readonly rap: boolean;
242
+ /**
243
+ * MPU_sequence_number of the frame. Omit it once the stream showed that
244
+ * an MPU boundary does not bound its RAPs (`BlockClassifier.mpuBoundsRaps`):
245
+ * same-MPU then no longer proves a gap lost only deltas.
246
+ */
247
+ readonly mpu?: number;
248
+ /** 0-based sample position within the MPU, when the geometry verifies it. */
249
+ readonly idx?: number;
250
+ /** Authored presentation time in `timescale` ticks. */
251
+ readonly pts?: bigint;
252
+ /** Authored sample duration in `timescale` ticks. */
253
+ readonly durationTicks?: number;
254
+ /** The media timescale of `pts` and `durationTicks`. */
255
+ readonly timescale?: number;
256
+ }
257
+ export type FrameGapAction = 'stall' | 'conceal';
258
+ export type FrameGapReason = 'rap-lost' | 'rap-unknown' | 'discontinuity' | 'delta-lost' | 'rap-next' | 'audio-gap' | 'audio-discontinuity';
259
+ /**
260
+ * The decision attached to the first frame released after a gap
261
+ * (`RoutedFrameMeta.gapBefore`). It is the same frozen object the manager
262
+ * emits as its `gap` repair lifecycle event, so a sink that acts on the frame
263
+ * and an observer that counts events see one fact.
264
+ */
265
+ export interface FrameGapDecision {
266
+ readonly version: 2;
267
+ readonly type: 'gap';
268
+ readonly stream: GapStreamIdentity;
269
+ readonly trackKind: TrackKind;
270
+ readonly action: FrameGapAction;
271
+ readonly reason: FrameGapReason;
272
+ /** FEC blocks in the gap whose media was lost (failed or vanished). */
273
+ readonly blocks: readonly number[];
274
+ /** Missing video frames or audio access units, when exactly known. */
275
+ readonly missingFrames: number | null;
276
+ /** Authored duration of the missing media in milliseconds, when known. */
277
+ readonly missingMs: number | null;
278
+ /** Manager epoch of the stream when the decision was made. */
279
+ readonly epoch: number;
280
+ }
281
+ export interface DecideGapInput {
282
+ readonly stream: GapStreamIdentity;
283
+ readonly trackKind: TrackKind;
284
+ /** Last frame released before the gap. */
285
+ readonly before: GapFrameEvidence;
286
+ /** First frame released after the gap. */
287
+ readonly after: GapFrameEvidence;
288
+ /** The stream restarted (FEC SBN went backwards or the publisher reset). */
289
+ readonly discontinuity: boolean;
290
+ readonly blocks: readonly number[];
291
+ /**
292
+ * The most media units the gap can hold: the FEC blocks spanned from the
293
+ * frame before to the frame after, times D (media units per block,
294
+ * ceil(interleaveDepthMs / unit duration), §5.1). A block touches at most D
295
+ * units whether it closes at D or at K symbols. Null when the span or D is
296
+ * unknown. An audio PTS delta that implies more AUs than this is a clock
297
+ * jump, not loss, and re-anchors instead of concealing every slot.
298
+ */
299
+ readonly maxMissingUnits: number | null;
300
+ readonly epoch: number;
301
+ }
302
+ /**
303
+ * Pure stall/conceal decision for the first frame released after a gap.
304
+ *
305
+ * Video stalls only when a RAP may be inside the gap: the frame after it is
306
+ * not a RAP and either sits in another MPU (`rap-lost`) or the MPU cannot be
307
+ * proven on both sides (`rap-unknown`), or the stream restarted
308
+ * (`discontinuity`). A gap inside one MPU lost only deltas (`delta-lost`) and
309
+ * a RAP after the gap resynchronises by itself (`rap-next`). Audio never
310
+ * stalls: an exact gap is concealed per access unit (`audio-gap`), anything
311
+ * else re-anchors at the next frame (`audio-discontinuity`).
312
+ */
313
+ export declare function decideGap(input: DecideGapInput): FrameGapDecision;
314
+ //# sourceMappingURL=block-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-policy.d.ts","sourceRoot":"","sources":["../src/block-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;AAEnE,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEtC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEzC,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CAU7E;AAID,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,eAAe,CAAA;AAE5D,wCAAwC;AACxC,MAAM,MAAM,gBAAgB,GAExB,kBAAkB,GAClB,yBAAyB,GACzB,gCAAgC,GAChC,iBAAiB;AACnB;;;;;GAKG;GACD,sCAAsC;AACxC;;;;GAIG;GACD,wBAAwB,GAExB,mBAAmB,GACnB,qBAAqB,GACrB,sBAAsB,GACtB,sBAAsB,GACtB,wBAAwB,GACxB,6BAA6B,CAAA;AAEjC,kEAAkE;AAClE,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,+CAA+C;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAClC,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,iFAAiF;IACjF,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAA;IACvC,oCAAoC;IACpC,QAAQ,CAAC,kBAAkB,C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