@blockcast/mmt-container 0.4.0 → 0.4.1-main.22841c1f0a2d

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 (220) hide show
  1. package/README.md +37 -21
  2. package/dist/align.d.ts +24 -18
  3. package/dist/align.d.ts.map +1 -1
  4. package/dist/align.js +23 -4
  5. package/dist/align.js.map +2 -2
  6. package/dist/browser-runtime.js +2037 -881
  7. package/dist/browser-runtime.js.map +4 -4
  8. package/dist/carp-catalog.d.ts +76 -39
  9. package/dist/carp-catalog.d.ts.map +1 -1
  10. package/dist/carp-catalog.js +321 -205
  11. package/dist/carp-catalog.js.map +3 -3
  12. package/dist/catalog-fec-params.d.ts +12 -4
  13. package/dist/catalog-fec-params.d.ts.map +1 -1
  14. package/dist/catalog-fec-params.js +40 -17
  15. package/dist/catalog-fec-params.js.map +3 -3
  16. package/dist/catalog-network-source.d.ts +28 -7
  17. package/dist/catalog-network-source.d.ts.map +1 -1
  18. package/dist/catalog-network-source.js +21 -1
  19. package/dist/catalog-network-source.js.map +2 -2
  20. package/dist/catalog-validator.d.ts +4 -3
  21. package/dist/catalog-validator.d.ts.map +1 -1
  22. package/dist/catalog-validator.js +0 -29
  23. package/dist/catalog-validator.js.map +3 -3
  24. package/dist/cmcd-producer.d.ts +13 -1
  25. package/dist/cmcd-producer.d.ts.map +1 -1
  26. package/dist/cmcd-producer.js +14 -0
  27. package/dist/cmcd-producer.js.map +2 -2
  28. package/dist/delivery-catalog.js +98 -234
  29. package/dist/delivery-catalog.js.map +4 -4
  30. package/dist/fec-manager.d.ts +108 -1
  31. package/dist/fec-manager.d.ts.map +1 -1
  32. package/dist/fec-manager.js +452 -66
  33. package/dist/fec-manager.js.map +4 -4
  34. package/dist/fec-state.d.ts +2 -1
  35. package/dist/fec-state.d.ts.map +1 -1
  36. package/dist/fec-state.js +18 -3
  37. package/dist/fec-state.js.map +3 -3
  38. package/dist/fec-worker-setup.d.ts +10 -0
  39. package/dist/fec-worker-setup.d.ts.map +1 -1
  40. package/dist/fec-worker-setup.js +15 -4
  41. package/dist/fec-worker-setup.js.map +2 -2
  42. package/dist/held-layer-admission.d.ts +58 -0
  43. package/dist/held-layer-admission.d.ts.map +1 -0
  44. package/dist/held-layer-admission.js +105 -0
  45. package/dist/held-layer-admission.js.map +7 -0
  46. package/dist/index.d.ts +5 -5
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +8 -8
  49. package/dist/index.js.map +2 -2
  50. package/dist/iso-block-locator.d.ts +39 -1
  51. package/dist/iso-block-locator.d.ts.map +1 -1
  52. package/dist/iso-block-locator.js +109 -17
  53. package/dist/iso-block-locator.js.map +3 -3
  54. package/dist/mfu-reassembler.js +21 -13
  55. package/dist/mfu-reassembler.js.map +2 -2
  56. package/dist/mmtp-container-parser.d.ts.map +1 -1
  57. package/dist/mmtp-container-parser.js +93 -22
  58. package/dist/mmtp-container-parser.js.map +2 -2
  59. package/dist/mmtp-container-parser.no-modules.js +3677 -1213
  60. package/dist/mmtp-container-parser.no-modules.js.map +4 -4
  61. package/dist/mmtp-decode-pipeline.js +93 -22
  62. package/dist/mmtp-decode-pipeline.js.map +2 -2
  63. package/dist/mmtp-fec-session.d.ts +192 -0
  64. package/dist/mmtp-fec-session.d.ts.map +1 -0
  65. package/dist/mmtp-fec-session.js +640 -0
  66. package/dist/mmtp-fec-session.js.map +7 -0
  67. package/dist/mmtp-router.d.ts +69 -32
  68. package/dist/mmtp-router.d.ts.map +1 -1
  69. package/dist/mmtp-router.js +296 -192
  70. package/dist/mmtp-router.js.map +2 -2
  71. package/dist/multicast-auth-catalog.d.ts +86 -92
  72. package/dist/multicast-auth-catalog.d.ts.map +1 -1
  73. package/dist/multicast-auth-catalog.js +313 -124
  74. package/dist/multicast-auth-catalog.js.map +3 -3
  75. package/dist/multicast-input.d.ts +31 -8
  76. package/dist/multicast-input.d.ts.map +1 -1
  77. package/dist/multicast-input.js +299 -35
  78. package/dist/multicast-input.js.map +3 -3
  79. package/dist/multicast-manager.d.ts +97 -11
  80. package/dist/multicast-manager.d.ts.map +1 -1
  81. package/dist/multicast-manager.js +1022 -527
  82. package/dist/multicast-manager.js.map +4 -4
  83. package/dist/multicast-transport.d.ts +12 -2
  84. package/dist/multicast-transport.d.ts.map +1 -1
  85. package/dist/multicast-transport.js +108 -238
  86. package/dist/multicast-transport.js.map +4 -4
  87. package/dist/multicast-unwrap.js +21 -13
  88. package/dist/multicast-unwrap.js.map +2 -2
  89. package/dist/no-modules.d.ts +5 -3
  90. package/dist/no-modules.d.ts.map +1 -1
  91. package/dist/no-modules.js +3625 -1194
  92. package/dist/no-modules.js.map +4 -4
  93. package/dist/phase14-catalog-override.d.ts +1 -1
  94. package/dist/phase14-catalog-override.d.ts.map +1 -1
  95. package/dist/phase14-catalog-override.js +2 -2
  96. package/dist/phase14-catalog-override.js.map +2 -2
  97. package/dist/repair-fetch.d.ts +81 -6
  98. package/dist/repair-fetch.d.ts.map +1 -1
  99. package/dist/repair-fetch.js +156 -31
  100. package/dist/repair-fetch.js.map +3 -3
  101. package/dist/repair-layers.d.ts +2 -0
  102. package/dist/repair-layers.d.ts.map +1 -1
  103. package/dist/repair-layers.js +19 -2
  104. package/dist/repair-layers.js.map +2 -2
  105. package/dist/sample-combiner.d.ts +7 -1
  106. package/dist/sample-combiner.d.ts.map +1 -1
  107. package/dist/sample-combiner.js +14 -2
  108. package/dist/sample-combiner.js.map +2 -2
  109. package/dist/signaling.d.ts +2 -2
  110. package/dist/signaling.d.ts.map +1 -1
  111. package/dist/signaling.js +3 -3
  112. package/dist/signaling.js.map +2 -2
  113. package/dist/switching-set-alignment.d.ts +1 -1
  114. package/dist/switching-set-alignment.js.map +1 -1
  115. package/dist/timestamp-codec.js +21 -13
  116. package/dist/timestamp-codec.js.map +2 -2
  117. package/dist/wasm-mfu-reassembler.js.map +1 -1
  118. package/dist/wasm-mmtp-container-parser.js +93 -22
  119. package/dist/wasm-mmtp-container-parser.js.map +2 -2
  120. package/package.json +6 -18
  121. package/schemas/catalog.schema.json +133 -38
  122. package/src/align.ts +52 -21
  123. package/src/carp-catalog.ts +188 -68
  124. package/src/catalog-fec-params.ts +28 -3
  125. package/src/catalog-network-source.ts +49 -7
  126. package/src/catalog-validator.ts +4 -11
  127. package/src/cmcd-producer.ts +23 -1
  128. package/src/fec-manager.ts +366 -63
  129. package/src/fec-state.ts +11 -4
  130. package/src/fec-worker-setup.ts +30 -2
  131. package/src/held-layer-admission.ts +161 -0
  132. package/src/index.ts +32 -19
  133. package/src/iso-block-locator.ts +110 -7
  134. package/src/mmtp-container-parser.ts +75 -7
  135. package/src/mmtp-fec-session.ts +606 -0
  136. package/src/mmtp-router.ts +301 -240
  137. package/src/multicast-auth-catalog.ts +134 -238
  138. package/src/multicast-input.ts +148 -124
  139. package/src/multicast-manager.ts +271 -40
  140. package/src/multicast-transport.ts +17 -3
  141. package/src/no-modules.ts +8 -7
  142. package/src/phase14-catalog-override.ts +3 -3
  143. package/src/repair-fetch.ts +283 -39
  144. package/src/repair-layers.ts +22 -2
  145. package/src/sample-combiner.ts +15 -2
  146. package/src/signaling.ts +2 -2
  147. package/src/switching-set-alignment.ts +1 -1
  148. package/test-vectors/align.json +108 -32
  149. package/test-vectors/bc-provenance-v2.json +1526 -0
  150. package/test-vectors/catalog/README.md +71 -4
  151. package/test-vectors/catalog/negative/fec-block-profile-missing.json +1 -1
  152. package/test-vectors/catalog/negative/fec-block-profile-retired.json +1 -1
  153. package/test-vectors/catalog/negative/fec-block-profile-unknown.json +1 -1
  154. package/test-vectors/catalog/negative/fec-iso-symbol-size-below-floor.json +28 -0
  155. package/test-vectors/catalog/negative/fec-reed-solomon-iso-symbol-size-13.json +28 -0
  156. package/test-vectors/catalog/negative/fec-reed-solomon-k-plus-p-over-255.json +39 -0
  157. package/test-vectors/catalog/negative/fec-reed-solomon-overlay-over-255.json +40 -0
  158. package/test-vectors/catalog/negative/fec-repair-overlay-source-symbols-zero.json +43 -0
  159. package/test-vectors/catalog/negative/fec-repair-symbols-zero.json +28 -0
  160. package/test-vectors/catalog/negative/fec-source-symbols-zero.json +28 -0
  161. package/test-vectors/catalog/negative/fec-symbol-size-zero.json +28 -0
  162. package/test-vectors/catalog/negative/init-data-inline-without-data.json +22 -0
  163. package/test-vectors/catalog/negative/mmtp-mode-mpu.json +15 -0
  164. package/test-vectors/catalog/negative/multicast-amt-dns-without-relay.json +37 -0
  165. package/test-vectors/catalog/negative/multicast-amt-driad-with-relay.json +38 -0
  166. package/test-vectors/catalog/negative/multicast-auth-asm-missing-sender-address.json +77 -0
  167. package/test-vectors/catalog/negative/multicast-auth-duplicate-first-epoch.json +56 -0
  168. package/test-vectors/catalog/negative/multicast-auth-duplicate-kid.json +56 -0
  169. package/test-vectors/catalog/negative/multicast-auth-endpoint-auth-without-object-auth.json +38 -0
  170. package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-auth.json +49 -0
  171. package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-bandwidth.json +55 -0
  172. package/test-vectors/catalog/negative/multicast-auth-manifest-port-equals-port.json +56 -0
  173. package/test-vectors/catalog/negative/multicast-auth-manifest-timer-out-of-range.json +56 -0
  174. package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-above-max.json +56 -0
  175. package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-below-min.json +56 -0
  176. package/test-vectors/catalog/negative/multicast-auth-root-dotted-key.json +55 -0
  177. package/test-vectors/catalog/negative/multicast-auth-sender-address-on-ssm.json +57 -0
  178. package/test-vectors/catalog/negative/multicast-auth-version-1.json +56 -0
  179. package/test-vectors/catalog/negative/multicast-auth-version-3.json +56 -0
  180. package/test-vectors/catalog/negative/multicast-auth-version-missing.json +55 -0
  181. package/test-vectors/catalog/negative/multicast-endpoint-foreign-namespace-track.json +44 -0
  182. package/test-vectors/catalog/negative/multicast-endpoint-protocol-amt.json +38 -0
  183. package/test-vectors/catalog/negative/multicast-endpoint-protocol-atsc3.json +38 -0
  184. package/test-vectors/catalog/negative/presentation-anchor-unsafe.json +16 -0
  185. package/test-vectors/catalog/positive/fec-algorithm-unimplemented.json +29 -0
  186. package/test-vectors/catalog/positive/fec-iso-ssbg1.json +1 -1
  187. package/test-vectors/catalog/positive/fec-multicast.json +1 -1
  188. package/test-vectors/catalog/positive/fec-reed-solomon-layered.json +50 -0
  189. package/test-vectors/catalog/positive/mmt01-12-1-init-ref-anchor.json +29 -0
  190. package/test-vectors/catalog/positive/multicast-amt-discovery-omitted.json +37 -0
  191. package/test-vectors/catalog/positive/multicast-amt-dns-relay.json +38 -0
  192. package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +3 -3
  193. package/test-vectors/catalog/{negative/multicast-endpoint-missing-protocol-and-source.json → positive/multicast-asm-unprotected.json} +10 -5
  194. package/test-vectors/catalog/positive/multicast-auth-asm-sender.json +78 -0
  195. package/test-vectors/catalog/positive/multicast-auth-rotation.json +39 -38
  196. package/test-vectors/catalog/positive/multicast-draft01-4-1-example.json +81 -0
  197. package/test-vectors/catalog/positive/multicast-draft01-7-2-6-example.json +70 -0
  198. package/test-vectors/catalog/positive/presentation-anchor-negative.json +27 -0
  199. package/test-vectors/catalog/section-codes.json +31 -1
  200. package/test-vectors/catalog-multicast-auth-v1.json +38 -20
  201. package/test-vectors/catalog-validation.json +101 -5
  202. package/test-vectors/catalog-validator-public-api.mjs +14 -9
  203. package/test-vectors/generate-bc-provenance-v2.mjs +252 -0
  204. package/dist/fec-codec.d.ts +0 -32
  205. package/dist/fec-codec.d.ts.map +0 -1
  206. package/dist/fec-codec.js +0 -47
  207. package/dist/fec-codec.js.map +0 -7
  208. package/dist/manifest-auth-plan.d.ts +0 -30
  209. package/dist/manifest-auth-plan.d.ts.map +0 -1
  210. package/dist/manifest-auth-plan.js +0 -1266
  211. package/dist/manifest-auth-plan.js.map +0 -7
  212. package/dist/source-auth.d.ts +0 -2
  213. package/dist/source-auth.d.ts.map +0 -1
  214. package/dist/source-auth.js +0 -1209
  215. package/dist/source-auth.js.map +0 -7
  216. package/src/fec-codec.ts +0 -61
  217. package/src/manifest-auth-plan.ts +0 -107
  218. package/src/source-auth.ts +0 -1
  219. package/test-vectors/generate-source-auth-fixture.mjs +0 -114
  220. package/test-vectors/source-auth-v1.json +0 -61
@@ -0,0 +1,192 @@
1
+ /**
2
+ * In-band AL-FEC for one MMTP asset received over a MoQT subscription: the
3
+ * asset's source packets on its own track, its repair packets on the repair
4
+ * track the catalog names (`fec.repairTrack`). The same asset's packets can also
5
+ * arrive on the multicast group (native SSM or AMT) carrying it: the caller
6
+ * states each symbol's path, and a block fed on both -- multicast source
7
+ * symbols repaired from the MoQT repair track, say -- is counted as mixed-path
8
+ * under `stats.mixedPath`, never inferred. Built for a player that owns
9
+ * its own MMTP parser and wants nothing else of the multicast stack
10
+ * (MulticastManager, MmtpRouter, FECManager): the Shaka MSF MMTP packaging.
11
+ *
12
+ * The session is clock-free, like the reliable-MoQ reassembly policy it sits
13
+ * beside. A block is settled only by wire evidence: clean once every source
14
+ * the repair's SSB_length states has arrived, recovered when the decoder
15
+ * completes it, failed once the newest SS_ID has moved it past the decoder's
16
+ * retention. No timer and no arrival time decides a block's fate, so a repair
17
+ * that is merely late on its own subscription is never counted as a loss.
18
+ * The retention is derived from the catalog's `fecBlockBudgetMs`, and a
19
+ * catalog missing either input throws rather than defaulting.
20
+ *
21
+ * Every repair packet runs the fec-01 6.3.9 held-layer check (layer 0, B_0 =
22
+ * catalog `fec.repairSymbols`) through the same HeldLayerAdmission FECManager
23
+ * uses. A packet below B_0 at or after the anchor fails the session closed:
24
+ * `stats.failClosed` reports why, and every later repair is refused.
25
+ *
26
+ * Every repair packet that cannot be used is counted under the reason it was
27
+ * refused, and every block ends under exactly one outcome, so a stream whose
28
+ * FEC is doing nothing can be told apart from one with nothing to repair.
29
+ */
30
+ import { type FecBlockProfile } from '@blockcast/mmt-base';
31
+ import { type FecFailClosedReason, type HeldLayerInput } from './held-layer-admission.js';
32
+ export type { FecFailClosedReason, HeldLayerInput } from './held-layer-admission.js';
33
+ /** The mmt-wasm `MmtFecDecoder` members the session drives. */
34
+ export interface MmtpFecSessionDecoder {
35
+ configure_params(k: number, symbolSize: number): void;
36
+ add_source(ssId: number, data: Uint8Array, timestamp: number): Uint8Array | null | undefined;
37
+ add_repair(ssStart: number, ssbLength: number, rsId: number, data: Uint8Array, timestamp: number): Uint8Array | null | undefined;
38
+ cleanup_by_ss_start(current: number): Uint32Array;
39
+ cleanup_blocks_detailed(ssStarts: Uint32Array): unknown;
40
+ free(): void;
41
+ }
42
+ /** `wasm_bindgen.MmtFecDecoder`, or a constructor of the same shape. */
43
+ export type MmtpFecSessionDecoderConstructor = new (interleaveDepth: number, blockProfile: string, algorithm?: string) => MmtpFecSessionDecoder;
44
+ /** The catalog `fec` fields the session reads. */
45
+ export interface MmtpFecSessionCatalogFec {
46
+ /** `raptorq` (the default when absent) or `reed-solomon`. */
47
+ algorithm?: unknown;
48
+ blockProfile?: unknown;
49
+ sourceSymbols?: unknown;
50
+ /** P_0: layer 0's repair symbols per block, the fec-01 6.3.9 total B_0. */
51
+ repairSymbols?: unknown;
52
+ /** Layer 0's repair track; names it for addRepair()'s `repairTrackName`. */
53
+ repairTrack?: unknown;
54
+ symbolSize?: unknown;
55
+ interleaveDepthMs?: unknown;
56
+ reorderToleranceMs?: unknown;
57
+ }
58
+ export interface MmtpFecSessionConfig {
59
+ /** The source track's catalog `fec` block. */
60
+ fec: MmtpFecSessionCatalogFec;
61
+ /** Builds the RaptorQ decoder, normally `wasm_bindgen.MmtFecDecoder`. */
62
+ Decoder: MmtpFecSessionDecoderConstructor;
63
+ /**
64
+ * The source's repair layers as the catalog resolves them
65
+ * (`TrackFecParams.repairLayers`), for a caller that subscribes more than
66
+ * layer 0. Absent: layer 0 alone, B_0 = `fec.repairSymbols`.
67
+ */
68
+ repairLayers?: readonly HeldLayerInput[];
69
+ /** The layers the caller holds (fec-01 6.3.9). Absent: [0]. */
70
+ heldLayers?: readonly number[];
71
+ }
72
+ /**
73
+ * The path a symbol arrived on: its MoQT subscription, or the multicast
74
+ * group (native SSM or AMT) carrying the same asset. The caller states it;
75
+ * the session never infers it.
76
+ */
77
+ export type MmtpFecSessionPath = 'moq' | 'multicast';
78
+ /** A count per path. */
79
+ export interface MmtpFecSessionPathCounts {
80
+ moq: number;
81
+ multicast: number;
82
+ }
83
+ /** How the settled blocks that were fed on both paths ended. */
84
+ export interface MmtpFecSessionMixedPathStats {
85
+ clean: number;
86
+ recovered: number;
87
+ failed: number;
88
+ released: number;
89
+ }
90
+ /** How the session's blocks and packets ended so far. */
91
+ export interface MmtpFecSessionStats {
92
+ /** Source symbols fed, counting each SS_ID once. */
93
+ sourceSymbols: number;
94
+ /** Repair symbols accepted for decoding. */
95
+ repairSymbols: number;
96
+ /** Blocks whose every source arrived. */
97
+ blocksClean: number;
98
+ /** Blocks with loss that the decoder completed. */
99
+ blocksRecovered: number;
100
+ /** Blocks with loss the decoder could not complete before retiring them. */
101
+ blocksFailed: number;
102
+ /** Blocks still unsettled when the session was released. */
103
+ blocksReleased: number;
104
+ /** Source packets the session recovered and handed back. */
105
+ packetsRecovered: number;
106
+ /** Source packets of failed blocks that never arrived and were not recovered. */
107
+ packetsLost: number;
108
+ /**
109
+ * Packets the session could not use, keyed by reason. Two reasons are not
110
+ * loss and belong in no loss tally. `repair:block-settled` counts the
111
+ * repair symbols of a block that had already settled, which on a healthy
112
+ * stream is every repair symbol of a block after the first.
113
+ * `source:decoder-refused` counts source packets the decoder threw on:
114
+ * they were delivered to the parser, only unprotected.
115
+ */
116
+ dropped: Record<string, number>;
117
+ /** `sourceSymbols`, by the path each arrived on. */
118
+ sourceSymbolsByPath: MmtpFecSessionPathCounts;
119
+ /** `repairSymbols`, by the path each arrived on. */
120
+ repairSymbolsByPath: MmtpFecSessionPathCounts;
121
+ /**
122
+ * Blocks whose symbols the session used arrived on both paths -- for
123
+ * instance multicast source symbols and MoQT repair -- by how each ended.
124
+ * Each is also counted under its outcome above. A symbol the session
125
+ * refused, and a repair that arrived after its block was already clean,
126
+ * contributed nothing to its block and do not make it mixed.
127
+ */
128
+ mixedPath: MmtpFecSessionMixedPathStats;
129
+ /**
130
+ * fec-01 6.3.9: null until a repair packet at or after the anchor (the
131
+ * earliest block, in SS_Start serial order, whose repair carried
132
+ * RSB_length >= B_0) states an RSB_length below B_0; then why. Terminal:
133
+ * every later repair is refused under `repair:fail-closed` (the packet that
134
+ * failed it is counted there too), and block state stays as it was. Sources
135
+ * are still taken and can still complete a block from repair admitted
136
+ * before the failure.
137
+ */
138
+ failClosed: FecFailClosedReason | null;
139
+ }
140
+ /**
141
+ * One asset's in-band FEC state. See the file comment.
142
+ */
143
+ export declare class MmtpFecSession {
144
+ #private;
145
+ readonly blockProfile: FecBlockProfile;
146
+ readonly algorithm: 'raptorq' | 'reed-solomon';
147
+ readonly sourceSymbols: number;
148
+ /** P_0 = B_0, the held total every repair packet is checked against. */
149
+ readonly repairSymbols: number;
150
+ readonly symbolSize: number;
151
+ /** The decoder's retention, in blocks, derived from the catalog budget. */
152
+ readonly retentionBlocks: number;
153
+ /**
154
+ * @throws when the catalog block lacks or misstates a field the session
155
+ * needs: the block profile, K, P_0 (`repairSymbols`), T, `interleaveDepthMs` or
156
+ * `reorderToleranceMs`. None is defaulted.
157
+ */
158
+ constructor(config: MmtpFecSessionConfig);
159
+ /** True once release() ran. */
160
+ get released(): boolean;
161
+ get stats(): MmtpFecSessionStats;
162
+ /**
163
+ * Feeds one received source packet: the MMTP packet without its four-byte
164
+ * Source FEC Payload ID, under the SS_ID that ID stated. This is what
165
+ * MmtpContainerParser's onSourceSymbol() hands over. `path` is where it
166
+ * was received; a caller that only subscribes over MoQT can leave it out.
167
+ *
168
+ * @returns the protected packets of this packet's block that it recovered,
169
+ * in SS_ID order, for the caller to feed to its parser with
170
+ * `{skipFecPayloadId: true, recovered: true}`. Usually empty.
171
+ */
172
+ addSource(ssId: number, packet: Uint8Array, path?: MmtpFecSessionPath): Uint8Array[];
173
+ /**
174
+ * Feeds one object of the repair track: a whole MMTP repair packet (ISO/IEC
175
+ * 23008-1 C.5.3). A repair track carries one repair flow, so the first
176
+ * repair packet fixes its packet ID and a packet of any other is refused.
177
+ * `path` is where it was received, as for addSource(). `repairTrackName`
178
+ * is the repair track it was received on, for the 6.3.9 own-track rule; a
179
+ * track the layers do not list is refused as `repair:unlisted-track`.
180
+ *
181
+ * @returns the protected packets this repair symbol recovered, as for
182
+ * addSource().
183
+ */
184
+ addRepair(packet: Uint8Array, path?: MmtpFecSessionPath, repairTrackName?: string): Uint8Array[];
185
+ /**
186
+ * Frees the decoder and every block. Blocks still unsettled are counted as
187
+ * released, not failed: nothing proved them unrecoverable. Idempotent;
188
+ * returns whether this call released anything.
189
+ */
190
+ release(): boolean;
191
+ }
192
+ //# sourceMappingURL=mmtp-fec-session.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mmtp-fec-session.d.ts","sourceRoot":"","sources":["../src/mmtp-fec-session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAWL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAA;AAElC,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAEpF,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACpC,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACrD,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,SAAS,CAAA;IAC5F,UAAU,CACR,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,MAA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