@blockcast/mmt-container 2.0.1 → 2.1.0-main.5b10b5454faf
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-runtime.js +492 -22
- package/dist/browser-runtime.js.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +2 -2
- package/dist/mmtp-router.d.ts +69 -2
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +356 -13
- package/dist/mmtp-router.js.map +2 -2
- package/dist/multicast-manager.d.ts +20 -1
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +475 -22
- package/dist/multicast-manager.js.map +2 -2
- package/dist/repair-fetch.d.ts +10 -3
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +15 -0
- package/dist/repair-fetch.js.map +2 -2
- package/package.json +5 -5
- package/src/index.ts +5 -0
- package/src/mmtp-router.ts +468 -12
- package/src/multicast-manager.ts +163 -17
- package/src/repair-fetch.ts +32 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockcast/mmt-container",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.1.0-main.5b10b5454faf",
|
|
4
4
|
"description": "MMTP/LOC container parsing for MMT over MoQ and SSM",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -169,10 +169,10 @@
|
|
|
169
169
|
"test:watch": "vitest"
|
|
170
170
|
},
|
|
171
171
|
"dependencies": {
|
|
172
|
-
"@blockcast/fec-worker": "
|
|
173
|
-
"@blockcast/mmt-base": "
|
|
174
|
-
"@blockcast/mmt-fec": "
|
|
175
|
-
"@blockcast/mmt-manifest-verify": "
|
|
172
|
+
"@blockcast/fec-worker": "2.1.0-main.5b10b5454faf",
|
|
173
|
+
"@blockcast/mmt-base": "2.1.0-main.5b10b5454faf",
|
|
174
|
+
"@blockcast/mmt-fec": "2.1.0-main.5b10b5454faf",
|
|
175
|
+
"@blockcast/mmt-manifest-verify": "2.1.0-main.5b10b5454faf",
|
|
176
176
|
"@noble/curves": "^1.9.7",
|
|
177
177
|
"@noble/hashes": "^1.8.0",
|
|
178
178
|
"ajv": "^8.17.1",
|
package/src/index.ts
CHANGED
|
@@ -274,6 +274,11 @@ export {
|
|
|
274
274
|
type FrameCallback,
|
|
275
275
|
type FECManagerLike,
|
|
276
276
|
type MmtpIngressContext,
|
|
277
|
+
type KeyframeOverlayLeg,
|
|
278
|
+
type KeyframeOverlayFec,
|
|
279
|
+
type KeyframeOverlayStats,
|
|
280
|
+
KEYFRAME_OVERLAY_EXTENSION_TYPE,
|
|
281
|
+
keyframeOverlaySsId,
|
|
277
282
|
type MmtpStreamIdentity,
|
|
278
283
|
type RoutedPacketMeta,
|
|
279
284
|
type StagedStreamSwitch,
|
package/src/mmtp-router.ts
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
type MMTPHeader,
|
|
24
24
|
type MoqRepairFrame,
|
|
25
25
|
} from "@blockcast/mmt-base";
|
|
26
|
-
import type { IsoHeldSource, WasmFecDecoder } from "./fec-manager.js";
|
|
26
|
+
import type { FECManager, IsoHeldSource, WasmFecDecoder } from "./fec-manager.js";
|
|
27
27
|
import type { IsoPlacedSource, IsoRepairPlacement } from "./iso-block-locator.js";
|
|
28
28
|
import { isMfuReassemblyError } from "./mfu-reassembler.js";
|
|
29
29
|
import type {
|
|
@@ -175,6 +175,67 @@ export type RoutedFrameMeta = {
|
|
|
175
175
|
gapBefore?: FrameGapDecision;
|
|
176
176
|
};
|
|
177
177
|
|
|
178
|
+
/** A keyframe-overlay repair leg: the source its FEC instance protects. */
|
|
179
|
+
export interface KeyframeOverlayLeg {
|
|
180
|
+
sourcePacketId: number;
|
|
181
|
+
sourceCatalogTrackName?: string;
|
|
182
|
+
repairTrackName?: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** The FEC state of one installed keyframe overlay: its own manager, keyed by
|
|
186
|
+
* the overlay repair packet ID, with no callbacks wired, so its blocks raise
|
|
187
|
+
* no lifecycle event, repair request or base statistic. */
|
|
188
|
+
export type KeyframeOverlayFec = Pick<
|
|
189
|
+
FECManager,
|
|
190
|
+
| "locateIsoSource" | "holdIsoSource" | "placeIsoRepair" | "feedSourceSymbol" | "feedRepairSymbol"
|
|
191
|
+
| "isBlockCompleted" | "markBlockCompleted" | "resetTrack" | "admitRepairBlockLength"
|
|
192
|
+
| "admitRepairSymbolSize" | "isoSourceFits" | "symbolSizeForPacket" | "blockProfileForPacket"
|
|
193
|
+
>;
|
|
194
|
+
|
|
195
|
+
/** The moqcast keyframe-overlay header extension: value = the overlay SS_ID
|
|
196
|
+
* (draft-ramadan-mmt-fec-02 7.4.3). */
|
|
197
|
+
export const KEYFRAME_OVERLAY_EXTENSION_TYPE = 0x8b01;
|
|
198
|
+
|
|
199
|
+
/** The overlay SS_ID a source packet carries: only a 0x8B01 extension of
|
|
200
|
+
* Length 4, read big-endian (7.4.3). Any other packet is no overlay symbol. */
|
|
201
|
+
export function keyframeOverlaySsId(header: Pick<MMTPHeader, "extension">): number | undefined {
|
|
202
|
+
const ext = header.extension;
|
|
203
|
+
if (ext?.type !== KEYFRAME_OVERLAY_EXTENSION_TYPE || ext.data.length !== 4) return undefined;
|
|
204
|
+
return new DataView(ext.data.buffer, ext.data.byteOffset, 4).getUint32(0);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
export interface KeyframeOverlayStats {
|
|
208
|
+
repairDropped: number;
|
|
209
|
+
ownerRefused: number;
|
|
210
|
+
recovered: number;
|
|
211
|
+
restarts: number;
|
|
212
|
+
unsequencedDropped: number;
|
|
213
|
+
protectedDropped: number;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
interface OverlayInstance {
|
|
217
|
+
readonly repairPacketId: number;
|
|
218
|
+
/** The overlay stream's track key in its manager. */
|
|
219
|
+
readonly streamName: string;
|
|
220
|
+
readonly leg: Readonly<KeyframeOverlayLeg>;
|
|
221
|
+
readonly fec: KeyframeOverlayFec;
|
|
222
|
+
readonly k: number;
|
|
223
|
+
/** The newest overlay symbol seen: its overlay SS_ID and wire sequence. */
|
|
224
|
+
last?: { ssId: number; psn: number };
|
|
225
|
+
/** MPU sequence number → overlay SS_ID − wire packet_sequence_number. */
|
|
226
|
+
readonly offsets: Map<number, number>;
|
|
227
|
+
/** Overlay blocks a MoQ symbol fed (multicast-02 7.2.7). */
|
|
228
|
+
readonly moqBlocks: Set<number>;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/** Offsets kept per overlay, one per MPU: a keyframe's fragments share one. */
|
|
232
|
+
const OVERLAY_OFFSET_MPUS = 16;
|
|
233
|
+
/** A MoQ-fed overlay block is forgotten once it starts this many K_overlay
|
|
234
|
+
* behind the newest overlay SS_ID: the overlay locator, which keeps a fixed
|
|
235
|
+
* few blocks (no catalog timing), has retired it long before, so it can no
|
|
236
|
+
* longer recover and be admitted as multicast-only. */
|
|
237
|
+
const OVERLAY_MOQ_HORIZON_BLOCKS = 64;
|
|
238
|
+
|
|
178
239
|
export interface MmtpIngressContext {
|
|
179
240
|
tracks: readonly Readonly<{ name: string; packetId: number }>[];
|
|
180
241
|
/**
|
|
@@ -1031,6 +1092,22 @@ export class MmtpRouter {
|
|
|
1031
1092
|
#packetIdRoles: Map<number, TrackRole> = new Map();
|
|
1032
1093
|
/** Explicit catalog ownership for dedicated repair-track packet IDs. */
|
|
1033
1094
|
#repairOwnersByPacketId = new Map<number, Set<number>>();
|
|
1095
|
+
/** Keyframe-overlay repair PID → the source its FEC instance protects
|
|
1096
|
+
* (draft-ramadan-mmt-fec-02 7.4.1). Never an owner in
|
|
1097
|
+
* #repairOwnersByPacketId: the overlay is decoded as its own instance. */
|
|
1098
|
+
#overlayLegs = new Map<number, KeyframeOverlayLeg>();
|
|
1099
|
+
/** Keyframe-overlay repair track names, which name a leg too: a catalog
|
|
1100
|
+
* may state no PID for it (learned at subscribe time). */
|
|
1101
|
+
#overlayRepairNames = new Map<string, KeyframeOverlayLeg>();
|
|
1102
|
+
/** Installed overlay instances, by overlay repair PID (opt-in only). */
|
|
1103
|
+
#overlays = new Map<number, OverlayInstance>();
|
|
1104
|
+
#overlayRecoveredObservers = new Set<(packetId: number, catalogTrackName: string | undefined, sbn: number) => void>();
|
|
1105
|
+
/** Streams whose recovered sequence the base path ever re-stamped. */
|
|
1106
|
+
#restampedStreams = new Set<string>();
|
|
1107
|
+
#overlayStats: KeyframeOverlayStats = {
|
|
1108
|
+
repairDropped: 0, ownerRefused: 0, recovered: 0, restarts: 0,
|
|
1109
|
+
unsequencedDropped: 0, protectedDropped: 0,
|
|
1110
|
+
};
|
|
1034
1111
|
/** Callback fired when a delta-track FEC block completes or fails. */
|
|
1035
1112
|
#onDeltaBlockCompleteCb:
|
|
1036
1113
|
| ((packetId: number, failed: boolean) => void)
|
|
@@ -1359,6 +1436,7 @@ export class MmtpRouter {
|
|
|
1359
1436
|
// the downstream sink mid-update.
|
|
1360
1437
|
this.#parser.markFecDiscontinuity(packetId, catalogTrackName);
|
|
1361
1438
|
this.#requestFecPoke(packetId, catalogTrackName);
|
|
1439
|
+
this.resetKeyframeOverlays(packetId, catalogTrackName);
|
|
1362
1440
|
};
|
|
1363
1441
|
|
|
1364
1442
|
this.#fecManager.onBlockComplete = (
|
|
@@ -1775,15 +1853,353 @@ export class MmtpRouter {
|
|
|
1775
1853
|
/** Replace catalog-derived repair ownership before a catalog reconfiguration. */
|
|
1776
1854
|
clearRepairPacketIdOwners(): void {
|
|
1777
1855
|
this.#repairOwnersByPacketId.clear();
|
|
1856
|
+
this.#overlayLegs.clear();
|
|
1857
|
+
this.#overlayRepairNames.clear();
|
|
1778
1858
|
}
|
|
1779
1859
|
|
|
1780
|
-
/** Bind one dedicated repair-track PID to its authoritative media PID.
|
|
1860
|
+
/** Bind one dedicated repair-track PID to its authoritative media PID. A
|
|
1861
|
+
* known keyframe-overlay PID is refused, and counted: its symbols belong to
|
|
1862
|
+
* the overlay instance, never to the source's base decoder (mmt-02 7.4.4). */
|
|
1781
1863
|
setRepairPacketIdOwner(repairPacketId: number, ownerPacketId: number): void {
|
|
1864
|
+
if (this.#overlayLegs.has(repairPacketId)) {
|
|
1865
|
+
this.#overlayStats.ownerRefused++;
|
|
1866
|
+
return;
|
|
1867
|
+
}
|
|
1782
1868
|
const owners = this.#repairOwnersByPacketId.get(repairPacketId) ?? new Set<number>();
|
|
1783
1869
|
owners.add(ownerPacketId);
|
|
1784
1870
|
this.#repairOwnersByPacketId.set(repairPacketId, owners);
|
|
1785
1871
|
}
|
|
1786
1872
|
|
|
1873
|
+
/**
|
|
1874
|
+
* Record a keyframe-overlay repair leg (draft-ramadan-mmt-fec-02 7.4): its
|
|
1875
|
+
* PID, the source it protects, and its repair track name. Either one names
|
|
1876
|
+
* the leg, so a catalog that states no PID (learned at subscribe time) is
|
|
1877
|
+
* covered by the name. Overlay repair is then never resolved to a base
|
|
1878
|
+
* owner, on multicast or MoQ. Cleared with the catalog owners
|
|
1879
|
+
* (`clearRepairPacketIdOwners`).
|
|
1880
|
+
*/
|
|
1881
|
+
setKeyframeOverlayLeg(repairPacketId: number | undefined, leg: KeyframeOverlayLeg): void {
|
|
1882
|
+
if (leg.repairTrackName !== undefined) this.#overlayRepairNames.set(leg.repairTrackName, { ...leg });
|
|
1883
|
+
if (repairPacketId === undefined) return;
|
|
1884
|
+
this.#repairOwnersByPacketId.delete(repairPacketId);
|
|
1885
|
+
this.#overlayLegs.set(repairPacketId, { ...leg });
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
/** The keyframe-overlay leg registered on `repairPacketId`, if any. */
|
|
1889
|
+
keyframeOverlayLeg(repairPacketId: number): Readonly<KeyframeOverlayLeg> | undefined {
|
|
1890
|
+
return this.#overlayLegs.get(repairPacketId);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
/**
|
|
1894
|
+
* Overlay counters: repair dropped for want of an installed instance, base
|
|
1895
|
+
* owners refused on an overlay PID, overlay blocks recovered, overlay
|
|
1896
|
+
* restarts, and recovered packets dropped for want of a wire sequence or
|
|
1897
|
+
* for a MoQ symbol on a protected flow (multicast-02 7.2.7).
|
|
1898
|
+
*/
|
|
1899
|
+
get keyframeOverlayStats(): Readonly<KeyframeOverlayStats> {
|
|
1900
|
+
return { ...this.#overlayStats };
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
#isOverlayRepair(repairPacketId: number, repairTrackName?: string): boolean {
|
|
1904
|
+
return this.#overlayLegs.has(repairPacketId) ||
|
|
1905
|
+
(repairTrackName !== undefined && this.#overlayRepairNames.has(repairTrackName));
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
/**
|
|
1909
|
+
* Install the keyframe overlay decoded on `fec` for a known overlay leg
|
|
1910
|
+
* (draft-ramadan-mmt-fec-02 7.4.4: decoded independently of the base). `fec`
|
|
1911
|
+
* holds the overlay stream under `repairPacketId` and `streamName`. Replaces
|
|
1912
|
+
* an earlier install on the same leg; the returned disposer removes only
|
|
1913
|
+
* this one.
|
|
1914
|
+
*/
|
|
1915
|
+
installKeyframeOverlay(repairPacketId: number, fec: KeyframeOverlayFec, k: number, streamName: string): () => void {
|
|
1916
|
+
const leg = this.#overlayLegs.get(repairPacketId);
|
|
1917
|
+
if (!leg) throw new Error(`[MmtpRouter] packetId=${repairPacketId} is no known keyframe-overlay leg`);
|
|
1918
|
+
const inst: OverlayInstance = {
|
|
1919
|
+
repairPacketId, streamName, leg: { ...leg }, fec, k, offsets: new Map(), moqBlocks: new Set(),
|
|
1920
|
+
};
|
|
1921
|
+
this.#overlays.set(repairPacketId, inst);
|
|
1922
|
+
return () => {
|
|
1923
|
+
if (this.#overlays.get(repairPacketId) === inst) this.#overlays.delete(repairPacketId);
|
|
1924
|
+
};
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* Observe each base block whose RAP MFU fragments a keyframe-overlay
|
|
1929
|
+
* recovery supplied, with the keyframe's FT=0 and FT=1 held
|
|
1930
|
+
* (fec-multicast-00 §6.6). The block is named by the recovered packets'
|
|
1931
|
+
* restored wire sequence through the base SS_ID offset, never by an overlay
|
|
1932
|
+
* coordinate. Called synchronously from the recovered-block route.
|
|
1933
|
+
*/
|
|
1934
|
+
addKeyframeOverlayRecoveredObserver(
|
|
1935
|
+
observer: (packetId: number, catalogTrackName: string | undefined, sbn: number) => void,
|
|
1936
|
+
): () => void {
|
|
1937
|
+
this.#overlayRecoveredObservers.add(observer);
|
|
1938
|
+
return () => {
|
|
1939
|
+
this.#overlayRecoveredObservers.delete(observer);
|
|
1940
|
+
};
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
/** Whether an overlay is installed on `repairPacketId`. */
|
|
1944
|
+
hasKeyframeOverlay(repairPacketId: number): boolean {
|
|
1945
|
+
return this.#overlays.has(repairPacketId);
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Start a new epoch of every overlay protecting `sourcePacketId` (its
|
|
1950
|
+
* source restarted): empty overlay stream, no coverage, no offsets.
|
|
1951
|
+
*/
|
|
1952
|
+
resetKeyframeOverlays(sourcePacketId: number, catalogTrackName?: string): void {
|
|
1953
|
+
for (const inst of this.#overlaysForSource(sourcePacketId, catalogTrackName)) this.#resetOverlay(inst);
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
#resetOverlay(inst: OverlayInstance): void {
|
|
1957
|
+
inst.fec.resetTrack(inst.repairPacketId, inst.streamName);
|
|
1958
|
+
inst.last = undefined;
|
|
1959
|
+
inst.offsets.clear();
|
|
1960
|
+
inst.moqBlocks.clear();
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
#overlaysForSource(sourcePacketId: number, catalogTrackName: string | undefined): OverlayInstance[] {
|
|
1964
|
+
return [...this.#overlays.values()].filter(({ leg }) =>
|
|
1965
|
+
leg.sourcePacketId === sourcePacketId &&
|
|
1966
|
+
(catalogTrackName === undefined || leg.sourceCatalogTrackName === undefined ||
|
|
1967
|
+
leg.sourceCatalogTrackName === catalogTrackName));
|
|
1968
|
+
}
|
|
1969
|
+
|
|
1970
|
+
/**
|
|
1971
|
+
* The overlay instance a repair packet belongs to, by the track it arrived
|
|
1972
|
+
* on (7.4.2: its PID or its repair track name); null for overlay repair
|
|
1973
|
+
* with no instance installed; undefined for repair of no overlay.
|
|
1974
|
+
*/
|
|
1975
|
+
#overlayRepairTarget(repairPacketId: number, repairTrackName?: string): OverlayInstance | null | undefined {
|
|
1976
|
+
const inst = this.#overlays.get(repairPacketId) ?? (repairTrackName === undefined
|
|
1977
|
+
? undefined
|
|
1978
|
+
: [...this.#overlays.values()].find(({ leg }) => leg.repairTrackName === repairTrackName));
|
|
1979
|
+
if (inst) return inst;
|
|
1980
|
+
return this.#isOverlayRepair(repairPacketId, repairTrackName) ? null : undefined;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
/** Overlay repair goes to its own instance, never to a base owner, locator
|
|
1984
|
+
* or decoder; with none installed it is dropped and counted. */
|
|
1985
|
+
#routeOverlayRepair(
|
|
1986
|
+
inst: OverlayInstance | null,
|
|
1987
|
+
repairPacketId: number,
|
|
1988
|
+
packet: Uint8Array,
|
|
1989
|
+
header: MMTPHeader,
|
|
1990
|
+
source: "multicast" | "moq",
|
|
1991
|
+
): void {
|
|
1992
|
+
const repair = inst ? parseMoqRepairFrameWithHeader(packet, header) : null;
|
|
1993
|
+
if (!inst || !repair) {
|
|
1994
|
+
this.#overlayStats.repairDropped++;
|
|
1995
|
+
debugRouter(`[MmtpRouter] Dropping keyframe-overlay repair pid=${repairPacketId}: no overlay instance`);
|
|
1996
|
+
return;
|
|
1997
|
+
}
|
|
1998
|
+
const { fec, repairPacketId: pid, streamName: name } = inst;
|
|
1999
|
+
if (!fec.admitRepairBlockLength(pid, repair.ssbLength, repair.rsbLength, repair.rsId)) return;
|
|
2000
|
+
if (!fec.admitRepairSymbolSize(pid, repair.ssStart, repair.ssbLength, repair.rsId, repair.symbolData.byteLength)) return;
|
|
2001
|
+
const placement = fec.placeIsoRepair(pid, name, repair.ssStart, repair.ssbLength);
|
|
2002
|
+
if (placement.status !== "placed") return;
|
|
2003
|
+
const blockStart = placement.block.start;
|
|
2004
|
+
if (placement.span !== undefined) this.#replayOverlaySources(inst, placement.span.block.start, placement.span.placed);
|
|
2005
|
+
this.#replayOverlaySources(inst, blockStart, placement.placed);
|
|
2006
|
+
if (source === "moq") this.#noteOverlayMoqBlock(inst, blockStart);
|
|
2007
|
+
const alreadyCompleted = fec.isBlockCompleted(blockStart, pid, name);
|
|
2008
|
+
const recovered = fec.feedRepairSymbol(pid, repair.ssStart, repair.ssbLength, repair.rsId, repair.symbolData, name);
|
|
2009
|
+
if (recovered && !alreadyCompleted) this.#routeOverlayRecovered(inst, blockStart, recovered);
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
#replayOverlaySources(
|
|
2013
|
+
inst: OverlayInstance,
|
|
2014
|
+
blockStart: number,
|
|
2015
|
+
placed: readonly IsoPlacedSource<IsoHeldSource>[],
|
|
2016
|
+
): void {
|
|
2017
|
+
const { fec, repairPacketId: pid, streamName: name } = inst;
|
|
2018
|
+
for (const { ssId, payload } of placed) {
|
|
2019
|
+
if (payload.source === "moq") this.#noteOverlayMoqBlock(inst, blockStart);
|
|
2020
|
+
if (payload.oversized) continue;
|
|
2021
|
+
const alreadyCompleted = fec.isBlockCompleted(blockStart, pid, name);
|
|
2022
|
+
const recovered = fec.feedSourceSymbol(pid, ssId, payload.symbolData, name);
|
|
2023
|
+
if (recovered && !alreadyCompleted) this.#routeOverlayRecovered(inst, blockStart, recovered);
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* A source packet that carries a 0x8B01 overlay SS_ID is also a symbol of
|
|
2029
|
+
* every overlay installed for its source, at that SS_ID, with the bytes the
|
|
2030
|
+
* base protects: the packet minus its 4-byte SS_ID trailer, extension
|
|
2031
|
+
* included (7.1, 7.4.3).
|
|
2032
|
+
*/
|
|
2033
|
+
#feedOverlaySource(
|
|
2034
|
+
packetId: number,
|
|
2035
|
+
catalogTrackName: string | undefined,
|
|
2036
|
+
packet: Uint8Array,
|
|
2037
|
+
header: MMTPHeader,
|
|
2038
|
+
sequenceNumber: number,
|
|
2039
|
+
rapFlag: boolean,
|
|
2040
|
+
source: MmtpSourcePath,
|
|
2041
|
+
): void {
|
|
2042
|
+
if (this.#overlays.size === 0) return;
|
|
2043
|
+
const ssId = keyframeOverlaySsId(header);
|
|
2044
|
+
if (ssId === undefined) return;
|
|
2045
|
+
for (const inst of this.#overlaysForSource(packetId, catalogTrackName)) {
|
|
2046
|
+
this.#noteOverlaySsId(inst, ssId, sequenceNumber);
|
|
2047
|
+
const identity = MmtpContainerParser.sourcePacketIdentity(packet, header);
|
|
2048
|
+
if (identity !== null) {
|
|
2049
|
+
inst.offsets.delete(identity.mpuSequenceNumber);
|
|
2050
|
+
inst.offsets.set(identity.mpuSequenceNumber, (ssId - sequenceNumber) >>> 0);
|
|
2051
|
+
if (inst.offsets.size > OVERLAY_OFFSET_MPUS) inst.offsets.delete(inst.offsets.keys().next().value!);
|
|
2052
|
+
}
|
|
2053
|
+
const { fec, repairPacketId: pid, streamName: name } = inst;
|
|
2054
|
+
const symbolData = packet.subarray(0, packet.length - 4);
|
|
2055
|
+
const oversized = !fec.isoSourceFits(pid, symbolData.length);
|
|
2056
|
+
const coords = fec.locateIsoSource(pid, name, ssId);
|
|
2057
|
+
if (coords === null) {
|
|
2058
|
+
fec.holdIsoSource(pid, name, ssId, {
|
|
2059
|
+
symbolData, source, oversized,
|
|
2060
|
+
evidence: sourceSymbolEvidence(packet, header, rapFlag, sequenceNumber),
|
|
2061
|
+
});
|
|
2062
|
+
continue;
|
|
2063
|
+
}
|
|
2064
|
+
if (source === "moq") this.#noteOverlayMoqBlock(inst, coords.sbn);
|
|
2065
|
+
if (oversized) continue;
|
|
2066
|
+
const alreadyCompleted = fec.isBlockCompleted(coords.sbn, pid, name);
|
|
2067
|
+
const recovered = fec.feedSourceSymbol(pid, ssId, symbolData, name);
|
|
2068
|
+
if (recovered && !alreadyCompleted) this.#routeOverlayRecovered(inst, coords.sbn, recovered);
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
#noteOverlayMoqBlock(inst: OverlayInstance, blockStart: number): void {
|
|
2073
|
+
inst.moqBlocks.add(blockStart);
|
|
2074
|
+
const newest = inst.last?.ssId;
|
|
2075
|
+
if (newest === undefined) return;
|
|
2076
|
+
for (const start of inst.moqBlocks) {
|
|
2077
|
+
if (((newest - start) | 0) > OVERLAY_MOQ_HORIZON_BLOCKS * inst.k) inst.moqBlocks.delete(start);
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
/**
|
|
2082
|
+
* An overlay SS_ID inconsistent with the source's packet_sequence_number
|
|
2083
|
+
* advance since the last one is an overlay restart (an FFmpeg muxer start,
|
|
2084
|
+
* a bridge swap that keeps psn continuous): it moved the other way, or
|
|
2085
|
+
* further than the psn advance plus K_overlay. Reordering keeps the two
|
|
2086
|
+
* consistent and is no restart.
|
|
2087
|
+
*/
|
|
2088
|
+
#noteOverlaySsId(inst: OverlayInstance, ssId: number, psn: number): void {
|
|
2089
|
+
const last = inst.last;
|
|
2090
|
+
if (last !== undefined) {
|
|
2091
|
+
const dSs = (ssId - last.ssId) | 0;
|
|
2092
|
+
const dPsn = (psn - last.psn) | 0;
|
|
2093
|
+
// One overlay SS_ID names one packet: the same SS_ID at another psn
|
|
2094
|
+
// is a new counter too.
|
|
2095
|
+
const consistent = dSs === 0
|
|
2096
|
+
? dPsn === 0
|
|
2097
|
+
: Math.sign(dSs) === Math.sign(dPsn) && Math.abs(dSs) <= Math.abs(dPsn) + inst.k;
|
|
2098
|
+
if (!consistent) {
|
|
2099
|
+
this.#overlayStats.restarts++;
|
|
2100
|
+
this.#resetOverlay(inst);
|
|
2101
|
+
} else if (dPsn < 0) {
|
|
2102
|
+
return;
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
inst.last = { ssId, psn };
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
/**
|
|
2109
|
+
* Route an overlay-recovered block's packets as source media of the
|
|
2110
|
+
* overlay's source (7.2: an overlay coordinate yields no base SS_ID). No
|
|
2111
|
+
* base-SS_ID derivation runs: no release-gate anchor, no parse ledger, no
|
|
2112
|
+
* base re-stamp, no block advance. Each packet's wire sequence is restored
|
|
2113
|
+
* from its keyframe's own offset; without one, a stream the base never
|
|
2114
|
+
* re-stamped keeps the header's sequence and any other drops the packet.
|
|
2115
|
+
*/
|
|
2116
|
+
#routeOverlayRecovered(inst: OverlayInstance, blockStart: number, recovered: Uint8Array): void {
|
|
2117
|
+
const { fec, repairPacketId: pid, streamName: name } = inst;
|
|
2118
|
+
fec.markBlockCompleted(blockStart, pid, name);
|
|
2119
|
+
const sourcePacketId = inst.leg.sourcePacketId;
|
|
2120
|
+
const sourceName = inst.leg.sourceCatalogTrackName;
|
|
2121
|
+
if (this.#classifyPacketId(sourcePacketId) === null) return;
|
|
2122
|
+
// 7.2.7: a packet the overlay recovers with a MoQ symbol has no base
|
|
2123
|
+
// SS_ID to hash with and is not delivered; from multicast symbols alone
|
|
2124
|
+
// it is admitted with them.
|
|
2125
|
+
const receiver = this.#provenanceFor(sourcePacketId, sourceName);
|
|
2126
|
+
if (receiver !== undefined && inst.moqBlocks.has(blockStart)) {
|
|
2127
|
+
this.#overlayStats.protectedDropped++;
|
|
2128
|
+
return;
|
|
2129
|
+
}
|
|
2130
|
+
const blockProfile = fec.blockProfileForPacket(pid);
|
|
2131
|
+
const symbolSize = fec.symbolSizeForPacket(pid);
|
|
2132
|
+
if (blockProfile === undefined || symbolSize === undefined || !(symbolSize > 0)) return;
|
|
2133
|
+
const result = processFecBlock(recovered, { symbolSize, ownerPacketId: sourcePacketId, blockProfile });
|
|
2134
|
+
const streamKey = this.#mediaStreamKey(sourcePacketId, sourceName);
|
|
2135
|
+
const restamped = this.#restampedStreams.has(streamKey);
|
|
2136
|
+
const restored = new Set<number>();
|
|
2137
|
+
const symbols = result.symbols.flatMap((sym) => {
|
|
2138
|
+
const offset = inst.offsets.get(sym.fragment.mpuSequenceNumber);
|
|
2139
|
+
if (offset !== undefined) {
|
|
2140
|
+
const packetSequenceNumber = (serial32Add(blockStart, sym.index) - offset) >>> 0;
|
|
2141
|
+
restored.add(packetSequenceNumber);
|
|
2142
|
+
return [{ ...sym, packetSequenceNumber }];
|
|
2143
|
+
}
|
|
2144
|
+
// A stream re-stamped by a bridge that no base recovery has shown yet
|
|
2145
|
+
// keeps the header's sequence too: from received packets alone the
|
|
2146
|
+
// router cannot tell (their psn is the wire one). Base recovery or a
|
|
2147
|
+
// FETCH still covers such a keyframe.
|
|
2148
|
+
if (!restamped) return [sym];
|
|
2149
|
+
this.#overlayStats.unsequencedDropped++;
|
|
2150
|
+
return [];
|
|
2151
|
+
});
|
|
2152
|
+
this.#overlayStats.recovered++;
|
|
2153
|
+
this.#routeProcessedFecSymbols(blockStart, { ...result, symbols }, sourcePacketId, sourceName, {
|
|
2154
|
+
deliveryProvenance: inst.moqBlocks.has(blockStart) ? "mixed" : "multicast",
|
|
2155
|
+
});
|
|
2156
|
+
this.#noteOverlayRecoveredRaps(sourcePacketId, sourceName, streamKey, symbols.filter((sym) =>
|
|
2157
|
+
restored.has(sym.packetSequenceNumber)));
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2160
|
+
/** fec-multicast-00 §6.6: report each base block whose RAP MFU fragments
|
|
2161
|
+
* the overlay restored, when the keyframe's FT=0 and FT=1 are held too. A
|
|
2162
|
+
* packet whose wire sequence was not restored names no base block. */
|
|
2163
|
+
#noteOverlayRecoveredRaps(
|
|
2164
|
+
packetId: number,
|
|
2165
|
+
catalogTrackName: string | undefined,
|
|
2166
|
+
streamKey: string,
|
|
2167
|
+
symbols: ProcessFecBlockResult["symbols"],
|
|
2168
|
+
): void {
|
|
2169
|
+
const ssIdSeqOffset = this.#ssIdSeqOffsetByStream.get(streamKey);
|
|
2170
|
+
if (ssIdSeqOffset === undefined || this.#overlayRecoveredObservers.size === 0) return;
|
|
2171
|
+
// ponytail: FT=0 and FT=1 count as held only when they are in this decoded
|
|
2172
|
+
// overlay block; a keyframe whose RAP packets straddle two overlay blocks
|
|
2173
|
+
// sends no signal and keeps its FETCH (the safe side).
|
|
2174
|
+
const withMeta = (type: number) => new Set(symbols.filter((sym) => sym.fragmentType === type)
|
|
2175
|
+
.map((sym) => sym.fragment.mpuSequenceNumber));
|
|
2176
|
+
const ft0 = withMeta(0);
|
|
2177
|
+
const ft1 = withMeta(1);
|
|
2178
|
+
// Only a keyframe whose RAP MFU is whole in this decode: a single-packet
|
|
2179
|
+
// MFU (FI=0), or both its first (FI=1) and last (FI=3) fragment. A
|
|
2180
|
+
// keyframe's fragments are consecutive RAP packets, so consecutive
|
|
2181
|
+
// overlay SS_IDs: with both ends in the block, every fragment between is.
|
|
2182
|
+
const rapMfu = (fi: number) => new Set(symbols.filter((sym) =>
|
|
2183
|
+
sym.fragmentType === 2 && sym.fragment.rapFlag && sym.fragment.fragmentationIndicator === fi)
|
|
2184
|
+
.map((sym) => sym.fragment.mpuSequenceNumber));
|
|
2185
|
+
const single = rapMfu(0);
|
|
2186
|
+
const first = rapMfu(1);
|
|
2187
|
+
const last = rapMfu(3);
|
|
2188
|
+
const blocks = new Set<number>();
|
|
2189
|
+
for (const sym of symbols) {
|
|
2190
|
+
const mpu = sym.fragment.mpuSequenceNumber;
|
|
2191
|
+
if (sym.fragmentType !== 2 || !sym.fragment.rapFlag || !ft0.has(mpu) || !ft1.has(mpu)) continue;
|
|
2192
|
+
if (!single.has(mpu) && !(first.has(mpu) && last.has(mpu))) continue;
|
|
2193
|
+
const ssId = (sym.packetSequenceNumber + ssIdSeqOffset) >>> 0;
|
|
2194
|
+
// ponytail: a base block no repair has stated yet (an undelimited hole) is not reported.
|
|
2195
|
+
const sbn = this.#fecManager?.locateIsoSource?.(packetId, catalogTrackName, ssId)?.sbn;
|
|
2196
|
+
if (sbn !== undefined) blocks.add(sbn);
|
|
2197
|
+
}
|
|
2198
|
+
for (const sbn of blocks) {
|
|
2199
|
+
for (const observer of this.#overlayRecoveredObservers) observer(packetId, catalogTrackName, sbn);
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
|
|
1787
2203
|
/**
|
|
1788
2204
|
* Register callback fired when a delta-track FEC block completes or fails.
|
|
1789
2205
|
*
|
|
@@ -2316,6 +2732,11 @@ export class MmtpRouter {
|
|
|
2316
2732
|
// A dedicated repair track can carry a packet ID that differs from the
|
|
2317
2733
|
// media packet ID. The subscribing track supplies the authoritative owner.
|
|
2318
2734
|
const repairPacketId = header.packetId;
|
|
2735
|
+
const overlay = this.#overlayRepairTarget(repairPacketId, repairTrackName);
|
|
2736
|
+
if (overlay !== undefined) {
|
|
2737
|
+
this.#routeOverlayRepair(overlay, repairPacketId, packet, header, "moq");
|
|
2738
|
+
return;
|
|
2739
|
+
}
|
|
2319
2740
|
|
|
2320
2741
|
const hintedOwner =
|
|
2321
2742
|
ownerPacketIdHint != null && this.#classifyPacketId(ownerPacketIdHint) !== null
|
|
@@ -2714,6 +3135,8 @@ export class MmtpRouter {
|
|
|
2714
3135
|
}
|
|
2715
3136
|
}
|
|
2716
3137
|
this.#parser.resetTrack(packetId, catalogTrackName);
|
|
3138
|
+
this.resetKeyframeOverlays(packetId, catalogTrackName);
|
|
3139
|
+
this.#restampedStreams.delete(this.#mediaStreamKey(packetId, catalogTrackName));
|
|
2717
3140
|
const assistPrefix = assistKey(packetId, catalogTrackName, 0).slice(0, -1);
|
|
2718
3141
|
for (const key of this.#assistBlocks.keys()) if (key.startsWith(assistPrefix)) this.#assistBlocks.delete(key);
|
|
2719
3142
|
for (const key of this.#assistFailures.keys()) if (key.startsWith(assistPrefix)) this.#assistFailures.delete(key);
|
|
@@ -2803,6 +3226,17 @@ export class MmtpRouter {
|
|
|
2803
3226
|
this.#packetIdRoles.delete(packetId);
|
|
2804
3227
|
this.#catalogTrackNamesByPacketId.delete(packetId);
|
|
2805
3228
|
this.#repairOwnersByPacketId.delete(packetId);
|
|
3229
|
+
this.#overlayLegs.delete(packetId);
|
|
3230
|
+
for (const [repairPacketId, leg] of [...this.#overlayLegs]) {
|
|
3231
|
+
if (leg.sourcePacketId === packetId) this.#overlayLegs.delete(repairPacketId);
|
|
3232
|
+
}
|
|
3233
|
+
for (const [name, leg] of [...this.#overlayRepairNames]) {
|
|
3234
|
+
if (leg.sourcePacketId === packetId) this.#overlayRepairNames.delete(name);
|
|
3235
|
+
}
|
|
3236
|
+
this.#overlays.delete(packetId);
|
|
3237
|
+
for (const [repairPacketId, inst] of [...this.#overlays]) {
|
|
3238
|
+
if (inst.leg.sourcePacketId === packetId) this.#overlays.delete(repairPacketId);
|
|
3239
|
+
}
|
|
2806
3240
|
delete this.#pidCounts[packetId];
|
|
2807
3241
|
delete this.#repairPidCounts[packetId];
|
|
2808
3242
|
delete this.#moqRepairPidCounts[packetId];
|
|
@@ -3075,6 +3509,9 @@ export class MmtpRouter {
|
|
|
3075
3509
|
this.#parserDiagnostics.clear();
|
|
3076
3510
|
this.#catalogTrackNamesByPacketId.clear();
|
|
3077
3511
|
this.#repairOwnersByPacketId.clear();
|
|
3512
|
+
this.#overlayLegs.clear();
|
|
3513
|
+
this.#overlayRepairNames.clear();
|
|
3514
|
+
this.#overlays.clear();
|
|
3078
3515
|
for (const { receiver } of this.#provenance.values()) receiver.release();
|
|
3079
3516
|
this.#provenance.clear();
|
|
3080
3517
|
this.#provenanceStreamFlow.clear();
|
|
@@ -3550,6 +3987,12 @@ export class MmtpRouter {
|
|
|
3550
3987
|
// Repair packet — per ISO 23008-1 §C.5.3, carries (SS_Start, SSB_length, RS_ID).
|
|
3551
3988
|
// Read from the header parsed above rather than parsing it again
|
|
3552
3989
|
// (BLO-36599).
|
|
3990
|
+
// The track a repair packet arrives on names its instance (7.4.2).
|
|
3991
|
+
const overlay = this.#overlayRepairTarget(info.packetId, catalogTrackNameForPacket(ingress, info.packetId));
|
|
3992
|
+
if (overlay !== undefined) {
|
|
3993
|
+
this.#routeOverlayRepair(overlay, info.packetId, packet, parsed.header, source);
|
|
3994
|
+
return;
|
|
3995
|
+
}
|
|
3553
3996
|
const ownerPacketId = this.#resolveRepairOwnerPacketId(info.packetId, ingress);
|
|
3554
3997
|
// An ambiguous name attributes the packet to no instance, so it is
|
|
3555
3998
|
// dropped before admission can count or fail closed against one.
|
|
@@ -3897,6 +4340,13 @@ export class MmtpRouter {
|
|
|
3897
4340
|
});
|
|
3898
4341
|
}
|
|
3899
4342
|
}
|
|
4343
|
+
// The keyframe overlay last: its recovery must not race this packet's
|
|
4344
|
+
// own media, which the source path above has routed.
|
|
4345
|
+
if (!overlapCopy && this.#classifyPacketId(info.packetId) !== null) {
|
|
4346
|
+
this.#feedOverlaySource(
|
|
4347
|
+
info.packetId, catalogTrackName, packet, parsed.header, info.sequenceNumber, info.rapFlag, source,
|
|
4348
|
+
);
|
|
4349
|
+
}
|
|
3900
4350
|
}
|
|
3901
4351
|
}
|
|
3902
4352
|
|
|
@@ -4608,11 +5058,17 @@ export class MmtpRouter {
|
|
|
4608
5058
|
result: ProcessFecBlockResult,
|
|
4609
5059
|
ownerPacketId?: number,
|
|
4610
5060
|
catalogTrackName?: string,
|
|
5061
|
+
/** Set for a keyframe-overlay recovery: `blockId` is an overlay
|
|
5062
|
+
* coordinate, which yields no base SS_ID (mmt-02 7.2), and the packets'
|
|
5063
|
+
* wire sequences are already restored. */
|
|
5064
|
+
overlay?: { deliveryProvenance: MmtpDeliveryProvenance },
|
|
4611
5065
|
): void {
|
|
4612
5066
|
// Route recovered symbols to the track's callback. The ownerPacketId tells us
|
|
4613
5067
|
// which track this block belongs to — resolves per-track, then legacy fallback.
|
|
4614
5068
|
if (ownerPacketId == null) return; // no track association
|
|
4615
5069
|
if (this.#classifyPacketId(ownerPacketId) === null) return; // unknown track
|
|
5070
|
+
const fecSbnOf = (index: number): { fecSbn?: number } =>
|
|
5071
|
+
overlay ? {} : { fecSbn: this.#fecAnchorForRecovered(blockId, index) };
|
|
4616
5072
|
// A recovered symbol's header names the sequence the sender protected. A
|
|
4617
5073
|
// hop that re-stamps packet_sequence_number after protection (cast's
|
|
4618
5074
|
// publisher-rotation bridge) leaves the decode mixing every received
|
|
@@ -4621,9 +5077,8 @@ export class MmtpRouter {
|
|
|
4621
5077
|
// dedup reads the same number, so that fragment would park under a
|
|
4622
5078
|
// foreign address until its data unit times out. Its SS_ID still names
|
|
4623
5079
|
// its wire sequence, through the offset every received source states.
|
|
4624
|
-
const
|
|
4625
|
-
|
|
4626
|
-
);
|
|
5080
|
+
const streamKey = this.#mediaStreamKey(ownerPacketId, catalogTrackName);
|
|
5081
|
+
const ssIdSeqOffset = overlay ? undefined : this.#ssIdSeqOffsetByStream.get(streamKey);
|
|
4627
5082
|
if (ssIdSeqOffset !== undefined) {
|
|
4628
5083
|
result = {
|
|
4629
5084
|
...result,
|
|
@@ -4631,11 +5086,12 @@ export class MmtpRouter {
|
|
|
4631
5086
|
const wire = (this.#fecAnchorForRecovered(blockId, sym.index) - ssIdSeqOffset) >>> 0;
|
|
4632
5087
|
if (wire === sym.packetSequenceNumber) return sym;
|
|
4633
5088
|
this.#restampedRecoveredSeqs++;
|
|
5089
|
+
this.#restampedStreams.add(streamKey);
|
|
4634
5090
|
return { ...sym, packetSequenceNumber: wire };
|
|
4635
5091
|
}),
|
|
4636
5092
|
};
|
|
4637
5093
|
}
|
|
4638
|
-
this.#stream(ownerPacketId, catalogTrackName).duplicates.advance(blockId);
|
|
5094
|
+
if (!overlay) this.#stream(ownerPacketId, catalogTrackName).duplicates.advance(blockId);
|
|
4639
5095
|
|
|
4640
5096
|
// A recovered symbol is a function of EVERY symbol that entered its block,
|
|
4641
5097
|
// so its provenance is the block's, not the media path's. Repair symbols
|
|
@@ -4647,7 +5103,7 @@ export class MmtpRouter {
|
|
|
4647
5103
|
// a guess: these bytes are then never counted as physical-delivery
|
|
4648
5104
|
// evidence. `FECManagerLike` is a pluggable structural interface, so an
|
|
4649
5105
|
// implementation without this method must degrade, not throw.
|
|
4650
|
-
const deliveryProvenance: MmtpDeliveryProvenance =
|
|
5106
|
+
const deliveryProvenance: MmtpDeliveryProvenance = overlay?.deliveryProvenance ??
|
|
4651
5107
|
this.#fecManager?.blockDeliveryProvenance?.(
|
|
4652
5108
|
blockId,
|
|
4653
5109
|
ownerPacketId,
|
|
@@ -4788,7 +5244,7 @@ export class MmtpRouter {
|
|
|
4788
5244
|
rapFlag: sym.fragment.rapFlag,
|
|
4789
5245
|
recovered: true,
|
|
4790
5246
|
deliveryProvenance,
|
|
4791
|
-
|
|
5247
|
+
...fecSbnOf(sym.index),
|
|
4792
5248
|
...(catalogTrackName === undefined ? {} : { catalogTrackName }),
|
|
4793
5249
|
});
|
|
4794
5250
|
continue;
|
|
@@ -4924,7 +5380,7 @@ export class MmtpRouter {
|
|
|
4924
5380
|
...(assembled.deliveryProvenance === undefined
|
|
4925
5381
|
? {}
|
|
4926
5382
|
: { deliveryProvenance: assembled.deliveryProvenance }),
|
|
4927
|
-
|
|
5383
|
+
...fecSbnOf(sym.index),
|
|
4928
5384
|
...(recoveredCatalogTrackName === undefined
|
|
4929
5385
|
? {}
|
|
4930
5386
|
: { catalogTrackName: recoveredCatalogTrackName }),
|
|
@@ -5109,7 +5565,7 @@ export class MmtpRouter {
|
|
|
5109
5565
|
rapFlag: sym.fragment.rapFlag,
|
|
5110
5566
|
recovered: true,
|
|
5111
5567
|
deliveryProvenance,
|
|
5112
|
-
|
|
5568
|
+
...fecSbnOf(sym.index),
|
|
5113
5569
|
...(catalogTrackName === undefined ? {} : { catalogTrackName }),
|
|
5114
5570
|
});
|
|
5115
5571
|
} else {
|
|
@@ -5199,7 +5655,7 @@ export class MmtpRouter {
|
|
|
5199
5655
|
rapFlag: assembled.rapFlag,
|
|
5200
5656
|
recovered: true,
|
|
5201
5657
|
deliveryProvenance,
|
|
5202
|
-
|
|
5658
|
+
...fecSbnOf(sym.index),
|
|
5203
5659
|
...(assembled.catalogTrackName === undefined
|
|
5204
5660
|
? {}
|
|
5205
5661
|
: { catalogTrackName: assembled.catalogTrackName }),
|
|
@@ -5246,7 +5702,7 @@ export class MmtpRouter {
|
|
|
5246
5702
|
: { sampleNumber: sym.fragment.sampleNumber }),
|
|
5247
5703
|
recovered: true,
|
|
5248
5704
|
deliveryProvenance,
|
|
5249
|
-
|
|
5705
|
+
...fecSbnOf(sym.index),
|
|
5250
5706
|
...(catalogTrackName === undefined ? {} : { catalogTrackName }),
|
|
5251
5707
|
});
|
|
5252
5708
|
continue;
|