@blockcast/mmt-base 0.3.0 → 0.4.0-main.2654dbc2ed6d

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/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @blockcast/mmt-base
2
2
 
3
- The shared MMTP packet-parsing leaf for libmmt's TypeScript packages. It hosts the low-level MMTP / MPU / MFU header parsers, FEC payload-id predicates, and ALTA-trailer extractor — everything that operates on raw MMTP packet bytes **with zero FEC-decode dependency**. RFC 6330 OTI geometry belongs to `@blockcast/mmt-fec`.
3
+ The shared MMTP packet-parsing leaf for libmmt's TypeScript packages. It hosts the low-level MMTP / MPU / MFU header parsers, and FEC payload-id predicates — everything that operates on raw MMTP packet bytes **with zero FEC-decode dependency**. RFC 6330 OTI geometry belongs to `@blockcast/mmt-fec`.
4
4
 
5
- It exists for one structural reason. Both `@blockcast/mmt-fec` and `@blockcast/mmt-container` need these primitives. Before this package they lived in `mmt-container`, so `mmt-fec` had to import `mmt-container` for them — while `mmt-container`'s `FecManager` already imports `mmt-fec`. That is a circular dependency. Extracting the primitives into this leaf breaks the cycle: both packages now import **down** into `mmt-base` rather than across into each other. Its only dependency is `@blockcast/mmt-alta-parse` (for the ALTA trailer types it re-exports).
5
+ It exists for one structural reason. Both `@blockcast/mmt-fec` and `@blockcast/mmt-container` need these primitives. Before this package they lived in `mmt-container`, so `mmt-fec` had to import `mmt-container` for them — while `mmt-container`'s `FecManager` already imports `mmt-fec`. That is a circular dependency. Extracting the primitives into this leaf breaks the cycle: both packages now import **down** into `mmt-base` rather than across into each other. It has no runtime dependencies.
6
6
 
7
7
  ```bash
8
8
  pnpm add @blockcast/mmt-base
@@ -46,7 +46,7 @@ Single entry point — `package.json#exports` declares only `.`, and `src/index.
46
46
  | `MMTP_HEADER_SIZE` (12), `MPU_HEADER_SIZE` (8), `MFU_DU_HEADER_SIZE_TIMED` (14), `MFU_DU_HEADER_SIZE_NONTIMED` (4) | const | Fixed header sizes |
47
47
  | `PACKET_TYPE_MPU` (0x00), `PACKET_TYPE_SIGNALING` (0x02), `PACKET_TYPE_REPAIR` (0x03) | const | MMTP `packet_type` values |
48
48
 
49
- MPU `payload_length` is interpreted strictly as ISO's length-after-field value: six remaining MPU-header bytes plus the data-unit header and media. ALTA and Source FEC Payload ID suffixes are outside that span; malformed, zero-length, media-only, and ambiguous declarations are rejected.
49
+ MPU `payload_length` is interpreted strictly as ISO's length-after-field value: six remaining MPU-header bytes plus the data-unit header and media. The legacy `0xf0a1` authenticator trailer (skipped, never verified — provenance is `@blockcast/mmt-manifest-verify`) and the Source FEC Payload ID are outside that span; malformed, zero-length, media-only, and ambiguous declarations are rejected.
50
50
 
51
51
  ### FEC payload-id, repair & AL-FEC signaling
52
52
 
@@ -58,7 +58,7 @@ MPU `payload_length` is interpreted strictly as ISO's length-after-field value:
58
58
  | `extractRepairFecPayloadId` | function | Repair-flow FEC payload id (13-byte, `REPAIR_FEC_PID_SIZE`) |
59
59
  | `parseMoqRepairFrame` | function | Strictly parse a mode-0 MMTP Annex C repair frame → `MoqRepairFrame` |
60
60
  | `MoqRepairFrame` | type | Repair-frame shape |
61
- | `ALFEC_MESSAGE_ID` (0x0203), `FEC_CODE_XOR` (1), `FEC_CODE_RAPTORQ` (2), `REPAIR_FEC_PID_SIZE` (13) | const | AL-FEC signaling + payload-id constants |
61
+ | `ALFEC_MESSAGE_ID` (0x0203), `FEC_CODE_REED_SOLOMON` (1), `FEC_CODE_RAPTORQ` (3) (ISO/IEC 23008-10 Table 1), `REPAIR_FEC_PID_SIZE` (13) | const | AL-FEC signaling + payload-id constants |
62
62
  | `MMTP_SIGNALING_PACKET_ID` (0), `MMTP_PACKET_ID_MAX` (0xffff) | const | Signaling-flow `packet_id` (never a track's) and the 16-bit `packet_id` ceiling; a track's `packet_id` is 1..65535 |
63
63
 
64
64
  ### Signalling messages (`signalling.ts`, packet_id 0)
@@ -69,22 +69,13 @@ replaced by Amd 1:2025.
69
69
 
70
70
  | Symbol | Kind | Purpose |
71
71
  |--------|------|---------|
72
- | `parseSignallingPayload` | function | Split a signalling packet into complete messages; reports the payload form: `iso-9.3.4.2` (Figure 15 header) or `legacy-bare-alfec` (message 0x0203 directly after the MMTP header, recognised by its exact `0x02 0x03` peek) |
72
+ | `parseSignallingPayload` | function | Split a signalling packet into complete messages behind the 9.3.4.2 header (Figure 15); the payload form is always `iso-9.3.4.2`. A message straight after the MMTP header (the retired bare AL-FEC form) is refused |
73
73
  | `parseSignallingPacket` | function | Decode every message of a signalling packet → `al-fec` / `pa` / `mpt` / `other` |
74
74
  | `parseAlFecMessage`, `parseAlFecMessageBody` | function | Every FEC flow of an AL-FEC message: all asset packet_ids, one-stage / two-stage / LA-FEC repair flows, private fields → `AlFecMessage` |
75
- | `alFecRaptorQFlowConfig` | function | One flow's decoder geometry under the Blockcast one-stage RaptorQ profile (private field = OTI + interleave depth) → `AlFecRaptorQFlowConfig` |
75
+ | `alFecRaptorQFlowConfig` | function | One entry's decoder geometry per draft-ramadan-moq-mmt-01 8.3/12.2: coding byte 0x14 exactly, number_of_assets 1, code 3 (RaptorQ) or 1 (Reed-Solomon); K, T, P from `maximum_k_for_repair_flow`, `length_of_repair_symbol`, `maximum_p_for_repair_flow`; no OTI, a private field is ignored. Refuses code 2 and any other code, 0x15, T < 14, K = 0, P = 0, K + P - 1 > 2^24 - 1, RaptorQ T % 8 or K > 56403, Reed-Solomon K + P > 255, repair_flow_id 0 or the flow's own packet_id → `null` |
76
+ | `alFecMessageFlowConfigs` | function | `alFecRaptorQFlowConfig` for every entry, plus the 12.2 cross-entry refusals: repair_flow_id naming another entry's Asset, and both entries of a duplicate repair_flow_id or Asset → `null` |
76
77
  | `parsePaMessageBody`, `parseMptMessageBody`, `parseMpTable`, `mpAssetPacketIds` | function | PA / MPT messages and the MP table: asset → packet_id mapping |
77
78
 
78
- ### ALTA trailer (re-exported from `@blockcast/mmt-alta-parse`)
79
-
80
- | Symbol | Kind | Purpose |
81
- |--------|------|---------|
82
- | `extractAltaTrailer` | function | Extract the ALTA authentication trailer from an MMTP packet |
83
- | `AltaTrailer` | type | Parsed trailer shape |
84
- | `MMTP_EXT_TYPE_ALTA_AUTH`, `MMTP_EXT_TRAILER_HEADER_SIZE` | const | ALTA extension-header identifiers |
85
-
86
- These four are re-exported so callers that already pull MMTP primitives from here don't need a second import from `@blockcast/mmt-alta-parse` just for the trailer.
87
-
88
79
  ## Why this package exists
89
80
 
90
81
  ```
@@ -119,13 +110,12 @@ npm test # vitest run
119
110
 
120
111
  The direct suite owns header parsing, MFU extraction, payload-ID predicates,
121
112
  declared-boundary rejection, C/X optional headers, and
122
- ALTA/FEC suffix coverage. Downstream suites exercise integration only.
113
+ legacy-authenticator/FEC suffix coverage. Downstream suites exercise integration only.
123
114
 
124
115
  ## Related packages
125
116
 
126
117
  | Package | Relationship |
127
118
  |---------|-------------|
128
- | [`@blockcast/mmt-alta-parse`](../mmt-alta-parse) | Only dependency — supplies the ALTA trailer types this package re-exports |
129
119
  | [`@blockcast/mmt-fec`](../fec) | Imports these parsers in `block-processor` to turn decoded FEC blocks back into MFU fragments |
130
120
  | [`@blockcast/mmt-container`](../container) | Imports these primitives directly and builds the `FecManager`, MFU reassembler, and CMAF demuxer on top |
131
121
 
@@ -0,0 +1,79 @@
1
+ /** The catalog media roles that carry hang renditions. */
2
+ export type CatalogFecRole = 'video' | 'audio';
3
+ /** One media source's `fec` block, as `locateCatalogFecSource` found it. */
4
+ export type CatalogFecSource = {
5
+ readonly dialect: 'hang';
6
+ readonly role: CatalogFecRole;
7
+ /** The rendition object. */
8
+ readonly entry: Record<string, unknown>;
9
+ /** The rendition's `fec` value, unvalidated (may be undefined). */
10
+ readonly fec: unknown;
11
+ /** JSON path of that `fec` block. */
12
+ readonly fecPath: string;
13
+ } | {
14
+ readonly dialect: 'msf';
15
+ /** Index of the entry in `tracks[]`. */
16
+ readonly index: number;
17
+ /** The `tracks[]` entry (an empty object when the entry is not an object). */
18
+ readonly entry: Record<string, unknown>;
19
+ /** The entry's `fec` value, unvalidated (may be undefined). */
20
+ readonly fec: unknown;
21
+ /** JSON path of that `fec` block. */
22
+ readonly fecPath: string;
23
+ };
24
+ /**
25
+ * Locate the catalog entry that declares one media source's `fec` block, in
26
+ * either catalog dialect.
27
+ *
28
+ * A hang `video`/`audio` rendition named `source` wins, in `roles` order, over
29
+ * a `tracks[]` entry of the same name: when a catalog carries rendition blocks
30
+ * beside a `tracks[]` switching-set index (the unified ABR ladder catalog),
31
+ * the rendition blocks are authoritative, exactly as they are for hang's own
32
+ * catalog decode. The precedence is keyed on the rendition EXISTING as an
33
+ * object, not on it carrying `fec`: a rendition without `fec` locates with
34
+ * `fec: undefined` and never falls through to `tracks[]`.
35
+ *
36
+ * Otherwise the first `tracks[]` entry named `source` locates. Returns
37
+ * undefined when neither dialect names it, or when `catalog` is not an object.
38
+ *
39
+ * @param roles the hang roles to search, in order (both by default). A typed
40
+ * track reference passes its own role only.
41
+ */
42
+ export declare function locateCatalogFecSource(catalog: unknown, source: string, roles?: readonly CatalogFecRole[]): CatalogFecSource | undefined;
43
+ /**
44
+ * Whether an `iso-ssbg1-v1` block's optional `interleaveDepthMs` span is
45
+ * usable: absent, or a non-negative safe integer. Zero or absence supplies no
46
+ * elapsed deadline and still permits in-band FEC. True for every block that
47
+ * names another profile (the span is not read) and for a non-object.
48
+ */
49
+ export declare function isoBlockSpanUsable(fec: unknown): boolean;
50
+ /**
51
+ * Whether one catalog `fec` block leaves its FEC available
52
+ * (draft-ramadan-moq-fec §5.1): the decision the container's
53
+ * `catalogFecUnavailable` explains with a typed reason.
54
+ *
55
+ * False when the block declares an FEC instance (any `algorithm` but `"none"`)
56
+ * and names no implemented `blockProfile` (the retired `k-padded-v1`
57
+ * included), or carries an `iso-ssbg1-v1` span it cannot use; and when a block
58
+ * declaring no FEC instance carries a profile token that is not implemented.
59
+ * True for a non-object and for every other block. It reads only the profile
60
+ * and the span: malformed geometry (`sourceSymbols`, `symbolSize`) is
61
+ * `catalogFecDeclaresUnconfigurableInstance`'s.
62
+ *
63
+ * A receiver applies no FEC to a source whose block is unavailable and joins
64
+ * none of its repair tracks, without failing the session.
65
+ */
66
+ export declare function catalogFecAvailable(fec: unknown): boolean;
67
+ /** Smallest `symbolSize` under `iso-ssbg1-v1` (draft-ramadan-moq-fec-01 5.1, 6.3.4 rule 13). */
68
+ export declare const ISO_SSBG1_MIN_SYMBOL_SIZE = 14;
69
+ /**
70
+ * Whether a source's `fec` block declares an FEC instance (any `algorithm`
71
+ * but `"none"`) whose `sourceSymbols` or `symbolSize` is not a positive
72
+ * integer, or whose `iso-ssbg1-v1` `symbolSize` is below
73
+ * `ISO_SSBG1_MIN_SYMBOL_SIZE` (rule 13: such a symbol carries no protected
74
+ * MMTP packet). Geometry a decoder cannot configure is a malformed catalog, not
75
+ * "no FEC": the container's per-track resolver throws `track_fec` for exactly
76
+ * this block, whatever its profile or span.
77
+ */
78
+ export declare function catalogFecDeclaresUnconfigurableInstance(fec: unknown): boolean;
79
+ //# sourceMappingURL=catalog-fec-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-fec-source.d.ts","sourceRoot":"","sources":["../src/catalog-fec-source.ts"],"names":[],"mappings":"AAuBA,0DAA0D;AAC1D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,CAAA;AAE9C,4EAA4E;AAC5E,MAAM,MAAM,gBAAgB,GACxB;IACE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,4BAA4B;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,mEAAmE;IACnE,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,GACD;IACE,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAA;IACvB,wCAAwC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACvC,+DAA+D;IAC/D,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CACzB,CAAA;AAUL;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,SAAS,cAAc,EAAc,GAC3C,gBAAgB,GAAG,SAAS,CA4B9B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKxD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAOzD;AAMD,gGAAgG;AAChG,eAAO,MAAM,yBAAyB,KAAK,CAAA;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,wCAAwC,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAK9E"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Catalog FEC source rules shared by every catalog reader (BLO-40851).
3
+ *
4
+ * These are the dialect-level reads the container resolvers
5
+ * (`resolveRepairLayers`, `catalogFecUnavailable`), the transport endpoint
6
+ * selection (`selectEndpointPacketIds`) and a player's repair inventory all
7
+ * need to agree on. They live here, in the leaf package every one of those
8
+ * depends on, so there is one copy of each rule instead of copies pinned
9
+ * against each other by tests.
10
+ *
11
+ * - `locateCatalogFecSource`: which catalog entry declares a source's `fec`
12
+ * block. hang `video`/`audio` rendition blocks are authoritative over an MSF
13
+ * `tracks[]` entry of the same name.
14
+ * - `catalogFecAvailable`: draft-ramadan-moq-fec §5.1, whether a block's FEC
15
+ * is usable at all (implemented `blockProfile`, usable span).
16
+ * - `catalogFecDeclaresUnconfigurableInstance`: a declared FEC instance whose
17
+ * geometry a decoder cannot configure, which is a malformed catalog rather
18
+ * than "no FEC".
19
+ *
20
+ * Every function is total: it never throws, whatever the input.
21
+ */
22
+ import { isFecBlockProfile } from './fec-block-profile.js';
23
+ const ALL_ROLES = Object.freeze(['video', 'audio']);
24
+ function recordOf(value) {
25
+ return value !== null && typeof value === 'object' && !Array.isArray(value)
26
+ ? value
27
+ : undefined;
28
+ }
29
+ /**
30
+ * Locate the catalog entry that declares one media source's `fec` block, in
31
+ * either catalog dialect.
32
+ *
33
+ * A hang `video`/`audio` rendition named `source` wins, in `roles` order, over
34
+ * a `tracks[]` entry of the same name: when a catalog carries rendition blocks
35
+ * beside a `tracks[]` switching-set index (the unified ABR ladder catalog),
36
+ * the rendition blocks are authoritative, exactly as they are for hang's own
37
+ * catalog decode. The precedence is keyed on the rendition EXISTING as an
38
+ * object, not on it carrying `fec`: a rendition without `fec` locates with
39
+ * `fec: undefined` and never falls through to `tracks[]`.
40
+ *
41
+ * Otherwise the first `tracks[]` entry named `source` locates. Returns
42
+ * undefined when neither dialect names it, or when `catalog` is not an object.
43
+ *
44
+ * @param roles the hang roles to search, in order (both by default). A typed
45
+ * track reference passes its own role only.
46
+ */
47
+ export function locateCatalogFecSource(catalog, source, roles = ALL_ROLES) {
48
+ const root = recordOf(catalog);
49
+ if (root === undefined)
50
+ return undefined;
51
+ for (const role of roles) {
52
+ const renditions = recordOf(recordOf(root[role])?.['renditions']);
53
+ if (renditions === undefined || !Object.hasOwn(renditions, source))
54
+ continue;
55
+ const entry = recordOf(renditions[source]);
56
+ if (entry === undefined)
57
+ continue;
58
+ return Object.freeze({
59
+ dialect: 'hang',
60
+ role,
61
+ entry,
62
+ fec: entry['fec'],
63
+ fecPath: `$.${role}.renditions[${JSON.stringify(source)}].fec`,
64
+ });
65
+ }
66
+ const tracks = root['tracks'];
67
+ if (!Array.isArray(tracks))
68
+ return undefined;
69
+ const index = tracks.findIndex((track) => recordOf(track)?.['name'] === source);
70
+ if (index < 0)
71
+ return undefined;
72
+ const entry = recordOf(tracks[index]) ?? {};
73
+ return Object.freeze({
74
+ dialect: 'msf',
75
+ index,
76
+ entry,
77
+ fec: entry['fec'],
78
+ fecPath: `$.tracks[${index}].fec`,
79
+ });
80
+ }
81
+ /**
82
+ * Whether an `iso-ssbg1-v1` block's optional `interleaveDepthMs` span is
83
+ * usable: absent, or a non-negative safe integer. Zero or absence supplies no
84
+ * elapsed deadline and still permits in-band FEC. True for every block that
85
+ * names another profile (the span is not read) and for a non-object.
86
+ */
87
+ export function isoBlockSpanUsable(fec) {
88
+ const block = recordOf(fec);
89
+ if (block === undefined || block['blockProfile'] !== 'iso-ssbg1-v1')
90
+ return true;
91
+ const ms = block['interleaveDepthMs'];
92
+ return ms === undefined || (typeof ms === 'number' && Number.isSafeInteger(ms) && ms >= 0);
93
+ }
94
+ /**
95
+ * Whether one catalog `fec` block leaves its FEC available
96
+ * (draft-ramadan-moq-fec §5.1): the decision the container's
97
+ * `catalogFecUnavailable` explains with a typed reason.
98
+ *
99
+ * False when the block declares an FEC instance (any `algorithm` but `"none"`)
100
+ * and names no implemented `blockProfile` (the retired `k-padded-v1`
101
+ * included), or carries an `iso-ssbg1-v1` span it cannot use; and when a block
102
+ * declaring no FEC instance carries a profile token that is not implemented.
103
+ * True for a non-object and for every other block. It reads only the profile
104
+ * and the span: malformed geometry (`sourceSymbols`, `symbolSize`) is
105
+ * `catalogFecDeclaresUnconfigurableInstance`'s.
106
+ *
107
+ * A receiver applies no FEC to a source whose block is unavailable and joins
108
+ * none of its repair tracks, without failing the session.
109
+ */
110
+ export function catalogFecAvailable(fec) {
111
+ const block = recordOf(fec);
112
+ if (block === undefined)
113
+ return true;
114
+ const declaresFecInstance = block['algorithm'] !== 'none';
115
+ const profile = block['blockProfile'];
116
+ const profileOk = isFecBlockProfile(profile) || (profile === undefined && !declaresFecInstance);
117
+ return profileOk && (!declaresFecInstance || isoBlockSpanUsable(block));
118
+ }
119
+ function isPositiveSafeInteger(value) {
120
+ return typeof value === 'number' && Number.isSafeInteger(value) && value > 0;
121
+ }
122
+ /** Smallest `symbolSize` under `iso-ssbg1-v1` (draft-ramadan-moq-fec-01 5.1, 6.3.4 rule 13). */
123
+ export const ISO_SSBG1_MIN_SYMBOL_SIZE = 14;
124
+ /**
125
+ * Whether a source's `fec` block declares an FEC instance (any `algorithm`
126
+ * but `"none"`) whose `sourceSymbols` or `symbolSize` is not a positive
127
+ * integer, or whose `iso-ssbg1-v1` `symbolSize` is below
128
+ * `ISO_SSBG1_MIN_SYMBOL_SIZE` (rule 13: such a symbol carries no protected
129
+ * MMTP packet). Geometry a decoder cannot configure is a malformed catalog, not
130
+ * "no FEC": the container's per-track resolver throws `track_fec` for exactly
131
+ * this block, whatever its profile or span.
132
+ */
133
+ export function catalogFecDeclaresUnconfigurableInstance(fec) {
134
+ const block = recordOf(fec);
135
+ if (block === undefined || block['algorithm'] === 'none')
136
+ return false;
137
+ if (!(isPositiveSafeInteger(block['sourceSymbols']) && isPositiveSafeInteger(block['symbolSize'])))
138
+ return true;
139
+ return block['blockProfile'] === 'iso-ssbg1-v1' && block['symbolSize'] < ISO_SSBG1_MIN_SYMBOL_SIZE;
140
+ }
141
+ //# sourceMappingURL=catalog-fec-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog-fec-source.js","sourceRoot":"","sources":["../src/catalog-fec-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AA6B1D,MAAM,SAAS,GAA8B,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;AAE9E,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QACzE,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AAqB,CAAC,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,CAAA;AAC9E,CAAC;AAED,gGAAgG;AAChG,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAA;AAE3C;;;;;;;;GAQG;AACH,MAAM,UAAU,wCAAwC,CAAC,GAAY;IACnE,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC3B,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,WAAW,CAAC,KAAK,MAAM;QAAE,OAAO,KAAK,CAAA;IACtE,IAAI,CAAC,CAAC,qBAAqB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,qBAAqB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IAC/G,OAAO,KAAK,CAAC,cAAc,CAAC,KAAK,cAAc,IAAK,KAAK,CAAC,YAAY,CAAY,GAAG,yBAAyB,CAAA;AAChH,CAAC"}
@@ -1,13 +1,13 @@
1
- /** The two block profiles a catalog `fec.blockProfile` may name. */
2
- export type FecBlockProfile = 'k-padded-v1' | 'iso-ssbg1-v1';
3
- /** Every accepted `fec.blockProfile` token, legacy first. */
1
+ /** The block profile a catalog `fec.blockProfile` may name: the one this library implements. */
2
+ export type FecBlockProfile = 'iso-ssbg1-v1';
3
+ /** Every accepted `fec.blockProfile` token. */
4
4
  export declare const FEC_BLOCK_PROFILES: readonly FecBlockProfile[];
5
- /** True for a known block-profile token. */
5
+ /** True for a block-profile token this library implements. */
6
6
  export declare function isFecBlockProfile(value: unknown): value is FecBlockProfile;
7
7
  /**
8
- * Read a required `fec.blockProfile`. Throws on an absent or unknown token:
9
- * there is no default and nothing is inferred, because the two profiles carry
10
- * identical wire tuples whose repair math differs.
8
+ * Read a required `fec.blockProfile`. Throws on an absent token and on any
9
+ * token other than `iso-ssbg1-v1`: there is no default and nothing is
10
+ * inferred from the wire (draft-ramadan-moq-fec §5.1).
11
11
  *
12
12
  * @param where the catalog path of the field, for the error message.
13
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"fec-block-profile.d.ts","sourceRoot":"","sources":["../src/fec-block-profile.ts"],"names":[],"mappings":"AAwBA,oEAAoE;AACpE,MAAM,MAAM,eAAe,GAAG,aAAa,GAAG,cAAc,CAAA;AAE5D,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAGvD,CAAA;AAEF,4CAA4C;AAC5C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,eAAe,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,eAAe,CAUnF;AAED,2EAA2E;AAC3E,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE/D;AAED,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAOjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,GAAG,UAAU,CAczF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAS3E;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE1F;AAED;;;;;;;;GAQG;AACH,wBAAg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C,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpF"}
@@ -1,16 +1,14 @@
1
1
  /**
2
2
  * FEC block profile (BLO-35597, ISO/IEC 23008-1 Annex C).
3
3
  *
4
- * Every catalog `fec` object that declares an FEC instance names exactly one
5
- * block profile in `fec.blockProfile`. A receiver applies all of a profile's
6
- * rules or none of them, so the token is the one explicit per-stream
7
- * discriminator: it is never defaulted and never inferred from the wire.
4
+ * Every catalog `fec` object that declares an FEC instance names its block
5
+ * profile in `fec.blockProfile`. A receiver applies all of a profile's rules
6
+ * or none of them, so the token is the one explicit per-stream discriminator:
7
+ * it is never defaulted and never inferred from the wire.
8
+ *
9
+ * draft-ramadan-moq-fec §5.1 defines exactly one value, and it is the only
10
+ * profile this library implements:
8
11
  *
9
- * - `k-padded-v1` (legacy, Blockcast-private): a source symbol is the
10
- * protected MMTP packet zero-padded to T with no length field; every block
11
- * is a K-symbol RaptorQ block whose ESIs `SSB_length..K-1` are implicit
12
- * zero padding; `SS_ID = SBN*K + ESI`, so `SS_Start = SBN*K`; repair
13
- * ESI = K + RS_ID; the MoQ repair group id is the SBN.
14
12
  * - `iso-ssbg1-v1`: ssbg_mode1 (C.3.3): a source symbol is
15
13
  * `u16 length || protected packet || zero padding` to T; a block is a
16
14
  * K' = SSB_length RaptorQ block (C.5.3) and repair ESI = SSB_length + RS_ID;
@@ -19,21 +17,27 @@
19
17
  * under RFC 1982 serial arithmetic; the MoQ repair group id is the 62-bit
20
18
  * wrap-epoch-extended SS_Start. The AL-FEC coding byte for this profile is
21
19
  * 0x14 (one-stage, ssbg_mode1, fec_payload_id_mode 0, Amd 1:2025 Table C.3).
20
+ *
21
+ * A track whose `blockProfile` is absent or names any other token (the
22
+ * retired Blockcast-private `k-padded-v1` included) has no FEC: a receiver
23
+ * consumes its source without FEC and joins none of its repair tracks
24
+ * (draft-ramadan-moq-fec §5.1). `parseFecBlockProfile` throws for such a
25
+ * token; the per-track catalog resolver turns the same rule into a typed
26
+ * per-track "FEC unavailable" outcome instead of failing the session.
22
27
  */
23
28
  import { serial32Add, serial32Distance, serial32Precedes } from './serial-number.js';
24
- /** Every accepted `fec.blockProfile` token, legacy first. */
29
+ /** Every accepted `fec.blockProfile` token. */
25
30
  export const FEC_BLOCK_PROFILES = Object.freeze([
26
- 'k-padded-v1',
27
31
  'iso-ssbg1-v1',
28
32
  ]);
29
- /** True for a known block-profile token. */
33
+ /** True for a block-profile token this library implements. */
30
34
  export function isFecBlockProfile(value) {
31
- return value === 'k-padded-v1' || value === 'iso-ssbg1-v1';
35
+ return value === 'iso-ssbg1-v1';
32
36
  }
33
37
  /**
34
- * Read a required `fec.blockProfile`. Throws on an absent or unknown token:
35
- * there is no default and nothing is inferred, because the two profiles carry
36
- * identical wire tuples whose repair math differs.
38
+ * Read a required `fec.blockProfile`. Throws on an absent token and on any
39
+ * token other than `iso-ssbg1-v1`: there is no default and nothing is
40
+ * inferred from the wire (draft-ramadan-moq-fec §5.1).
37
41
  *
38
42
  * @param where the catalog path of the field, for the error message.
39
43
  */
@@ -41,9 +45,9 @@ export function parseFecBlockProfile(value, where) {
41
45
  if (isFecBlockProfile(value))
42
46
  return value;
43
47
  if (value === undefined) {
44
- throw new Error(`${where} is required: name the FEC block profile ("k-padded-v1" or "iso-ssbg1-v1")`);
48
+ throw new Error(`${where} is required: name the FEC block profile ("iso-ssbg1-v1")`);
45
49
  }
46
- throw new Error(`${where} must be "k-padded-v1" or "iso-ssbg1-v1" (got ${JSON.stringify(value)})`);
50
+ throw new Error(`${where} must be "iso-ssbg1-v1" (got ${JSON.stringify(value)})`);
47
51
  }
48
52
  /** ISO/IEC 23008-1 C.3.3 ssbg_mode1: the two-octet packet length field. */
49
53
  export const SSBG1_LENGTH_FIELD_BYTES = 2;
@@ -1 +1 @@
1
- {"version":3,"file":"fec-block-profile.js","sourceRoot":"","sources":["../src/fec-block-profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;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AE,IAAY;IAC1E,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,8DAA8D,IAAI,GAAG,CAAC,CAAA;IACxF,CAAC;IACD,OAAO,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAC/E,CAAC"}
package/dist/index.d.ts CHANGED
@@ -4,4 +4,6 @@ export * from './ntp-short.js';
4
4
  export * from './signalling.js';
5
5
  export * from './serial-number.js';
6
6
  export * from './fec-block-profile.js';
7
+ export * from './catalog-fec-source.js';
8
+ export * from './multicast-catalog.js';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA"}
package/dist/index.js CHANGED
@@ -4,4 +4,6 @@ export * from './ntp-short.js';
4
4
  export * from './signalling.js';
5
5
  export * from './serial-number.js';
6
6
  export * from './fec-block-profile.js';
7
+ export * from './catalog-fec-source.js';
8
+ export * from './multicast-catalog.js';
7
9
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AACvC,cAAc,wBAAwB,CAAA"}
package/dist/mmtp.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { extractAltaTrailer as _leafExtractAltaTrailer, type AltaTrailer as _LeafAltaTrailer } from '@blockcast/mmt-alta-parse';
2
1
  /**
3
2
  * @mmt/container - MMTP Parser
4
3
  *
@@ -70,6 +69,7 @@ export declare const MMTP_HEADER_SIZE = 12;
70
69
  export declare const MPU_HEADER_SIZE = 8;
71
70
  export declare const MFU_DU_HEADER_SIZE_TIMED = 14;
72
71
  export declare const MFU_DU_HEADER_SIZE_NONTIMED = 4;
72
+ export declare const SOURCE_FEC_PAYLOAD_ID_SIZE = 4;
73
73
  export declare const PACKET_TYPE_MPU = 0;
74
74
  export declare const PACKET_TYPE_SIGNALING = 2;
75
75
  export declare const PACKET_TYPE_REPAIR = 3;
@@ -84,8 +84,8 @@ export declare const ALFEC_MESSAGE_ID = 515;
84
84
  export declare const MMTP_SIGNALING_PACKET_ID = 0;
85
85
  /** Largest value of the 16-bit MMTP `packet_id` header field. */
86
86
  export declare const MMTP_PACKET_ID_MAX = 65535;
87
- export declare const FEC_CODE_XOR = 1;
88
- export declare const FEC_CODE_RAPTORQ = 2;
87
+ export declare const FEC_CODE_REED_SOLOMON = 1;
88
+ export declare const FEC_CODE_RAPTORQ = 3;
89
89
  /**
90
90
  * Parse MMTP header from buffer
91
91
  */
@@ -128,6 +128,24 @@ export interface MFURejection {
128
128
  /** Human-readable detail, including the byte arithmetic that decided it. */
129
129
  detail: string;
130
130
  }
131
+ /** Options for extractMFUPayload and explainMFURejection. */
132
+ export interface MFUExtractOptions {
133
+ /**
134
+ * When true, do NOT subtract the Source FEC Payload ID from the payload
135
+ * boundary, even if fecType >= 1. For FEC-recovered symbols whose FEC PID
136
+ * was already stripped before WASM decoding.
137
+ */
138
+ skipFecId?: boolean;
139
+ /**
140
+ * The catalog declares a keyframe overlay (`scope: "keyframe"` repair track)
141
+ * for this packet's source. A RAP packet then carries two Source FEC Payload
142
+ * IDs, base first and overlay last (BLO-32719 Clarification 7). This is a
143
+ * catalog fact, never inferred: the header has no overlay bit, and a payload
144
+ * four bytes shorter is byte-identical to a missing overlay. Mirrors
145
+ * mmt-core `split_payload_and_source_fec_trailers(overlay_declared)`.
146
+ */
147
+ overlayDeclared?: boolean;
148
+ }
131
149
  /**
132
150
  * Extract NAL unit payload from MMTP packet
133
151
  */
@@ -150,6 +168,10 @@ export interface MFUExtraction {
150
168
  fecPayloadId: {
151
169
  ssId: number;
152
170
  } | null;
171
+ /** Keyframe-overlay Source FEC Payload ID: RAP packets with `overlayDeclared` only. */
172
+ overlayFecPayloadId: {
173
+ ssId: number;
174
+ } | null;
153
175
  }
154
176
  /**
155
177
  * Report why `extractMFUPayload` would refuse this packet, or null if it would
@@ -161,12 +183,8 @@ export interface MFUExtraction {
161
183
  * that distinction matters: diagnostics, contract tests, and operator-facing
162
184
  * logs.
163
185
  */
164
- export declare function explainMFURejection(mmtpPacket: Uint8Array, options?: {
165
- skipFecId?: boolean;
166
- }): MFURejection | null;
167
- export declare function extractMFUPayload(mmtpPacket: Uint8Array, options?: {
168
- skipFecId?: boolean;
169
- }): MFUExtraction | null;
186
+ export declare function explainMFURejection(mmtpPacket: Uint8Array, options?: MFUExtractOptions): MFURejection | null;
187
+ export declare function extractMFUPayload(mmtpPacket: Uint8Array, options?: MFUExtractOptions): MFUExtraction | null;
170
188
  /**
171
189
  * extractMFUPayload for a caller that already holds this packet's parsed MMTP
172
190
  * header, so the header is not parsed a second time (BLO-36599).
@@ -174,9 +192,7 @@ export declare function extractMFUPayload(mmtpPacket: Uint8Array, options?: {
174
192
  * `header` must be `parseMMTPHeader(mmtpPacket)` of this same packet; the
175
193
  * result is then identical to `extractMFUPayload(mmtpPacket, options)`.
176
194
  */
177
- export declare function extractMFUPayloadWithHeader(mmtpPacket: Uint8Array, header: MMTPHeader, options?: {
178
- skipFecId?: boolean;
179
- }): MFUExtraction | null;
195
+ export declare function extractMFUPayloadWithHeader(mmtpPacket: Uint8Array, header: MMTPHeader, options?: MFUExtractOptions): MFUExtraction | null;
180
196
  /**
181
197
  * Extract timestamp from MMTP packet
182
198
  */
@@ -220,18 +236,6 @@ export declare function hasSourceFecPayloadId(mmtpPacket: Uint8Array): boolean;
220
236
  export declare function sourceFecPayloadIdOf(mmtpPacket: Uint8Array, header: MMTPHeader): {
221
237
  ssId: number;
222
238
  } | null;
223
- /**
224
- * MMTP header-extension ext_type assigned to the detached ALTA authenticator
225
- * trailer (Path 2 / 08-07). Carried in an `[ext_type][ext_length][auth]`
226
- * block appended after the MPU's declared payload bytes, before the 4-byte
227
- * Source FEC Payload ID. MMTP X-bit stays 0 — non-ALTA MMTP receivers treat
228
- * the trailer as bytes past `payload_length` and skip it (per ISO 23008-1
229
- * §9.2.2 "may be discarded without impacting correct processing").
230
- */
231
- export declare const MMTP_EXT_TYPE_ALTA_AUTH = 61601;
232
- export declare const MMTP_EXT_TRAILER_HEADER_SIZE = 4;
233
- export type AltaTrailer = _LeafAltaTrailer;
234
- export declare const extractAltaTrailer: typeof _leafExtractAltaTrailer;
235
239
  /** Size of Repair FEC Payload ID per ISO/IEC 23008-1 Section C.5.3 */
236
240
  export declare const REPAIR_FEC_PID_SIZE = 13;
237
241
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"mmtp.d.ts","sourceRoot":"","sources":["../src/mmtp.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,IAAI,uBAAuB,EAC7C,KAAK,WAAW,IAAI,gBAAgB,EACrC,MAAM,2BAA2B,CAAA;AAElC;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,yDAAyD;IACzD,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,sDAAsD;IACtD,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,4DAA4D;IAC5D,aAAa,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,UAAU,CAAA;KAAE,CAAA;IAC9C,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAA;IACpB,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,SAAS;IACxB,iBAAiB,EAAE,MAAM,CAAA;IACzB,sBAAsB,EAAE,MAAM,CAAA;IAC9B,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAA;IACvB,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAA;IACjB,wEAAwE;IACxE,eAAe,EAAE,OAAO,CAAA;IACxB;sEACkE;IAClE,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,WAAW;IAC1B,2BAA2B,EAAE,MAAM,CAAA;IACnC,YAAY,EAAE,MAAM,CAAA;IAC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