@blockcast/mmt-transport 0.2.2-main.c71423b8a4e4 → 0.2.2-main.ce3c8aeb7f68

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 (42) hide show
  1. package/dist/endpoint-config.d.ts +8 -0
  2. package/dist/endpoint-config.d.ts.map +1 -1
  3. package/dist/endpoint-config.js +25 -0
  4. package/dist/endpoint-config.js.map +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/mmt-transport.no-modules.js +34 -4
  10. package/dist/mmt-transport.no-modules.js.map +4 -4
  11. package/dist/multicast-catalog-policy.d.ts +2 -2
  12. package/dist/multicast-catalog-policy.d.ts.map +1 -1
  13. package/dist/multicast-catalog-policy.js +22 -4
  14. package/dist/multicast-catalog-policy.js.map +1 -1
  15. package/dist/multicast-signaling-reconciler.js +5 -2
  16. package/dist/multicast-signaling-reconciler.js.map +1 -1
  17. package/node_modules/@blockcast/mmt-alta-parse/README.md +181 -0
  18. package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
  19. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +57 -0
  20. package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +1 -0
  21. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +115 -0
  22. package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +1 -0
  23. package/node_modules/@blockcast/mmt-alta-parse/package.json +50 -0
  24. package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +136 -0
  25. package/node_modules/@blockcast/mmt-base/README.md +121 -0
  26. package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
  27. package/node_modules/@blockcast/mmt-base/dist/index.d.ts +2 -0
  28. package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +1 -0
  29. package/node_modules/@blockcast/mmt-base/dist/index.js +2 -0
  30. package/node_modules/@blockcast/mmt-base/dist/index.js.map +1 -0
  31. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +328 -0
  32. package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +1 -0
  33. package/node_modules/@blockcast/mmt-base/dist/mmtp.js +750 -0
  34. package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +1 -0
  35. package/node_modules/@blockcast/mmt-base/package.json +49 -0
  36. package/node_modules/@blockcast/mmt-base/src/index.ts +1 -0
  37. package/node_modules/@blockcast/mmt-base/src/mmtp.ts +1020 -0
  38. package/package.json +7 -1
  39. package/src/endpoint-config.ts +30 -0
  40. package/src/index.ts +1 -0
  41. package/src/multicast-catalog-policy.ts +23 -5
  42. package/src/multicast-signaling-reconciler.ts +5 -2
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@blockcast/mmt-alta-parse",
3
+ "version": "0.1.0",
4
+ "description": "Zero-dependency leaf: extract the detached ALTA authenticator trailer from an MMTP source packet",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "src",
17
+ "!src/**/*.test.ts",
18
+ "!src/**/*.spec.ts",
19
+ "!src/**/__tests__",
20
+ "!dist/**/*.test.*",
21
+ "!dist/**/*.spec.*"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "dev": "tsc --watch",
26
+ "clean": "rm -rf dist",
27
+ "typecheck": "tsc --noEmit",
28
+ "test": "vitest run",
29
+ "test:watch": "vitest"
30
+ },
31
+ "dependencies": {},
32
+ "devDependencies": {
33
+ "typescript": "^5.3.0",
34
+ "vitest": "^1.0.0"
35
+ },
36
+ "keywords": [
37
+ "mmt",
38
+ "mmtp",
39
+ "alta",
40
+ "authenticator",
41
+ "trailer",
42
+ "iso23008-1"
43
+ ],
44
+ "license": "Apache-2.0",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/Blockcast/libmmt.git",
48
+ "directory": "packages/mmt-alta-parse"
49
+ }
50
+ }
@@ -0,0 +1,136 @@
1
+ /**
2
+ * Zero-dependency helper for extracting the detached ALTA authenticator trailer
3
+ * from an MMTP source packet.
4
+ *
5
+ * Lives in its own leaf package so both `@blockcast/mmt-container` (wire-path
6
+ * parsing) and `@blockcast/fec-worker` (FEC-recovered-source parsing) can share
7
+ * one implementation without creating a package cycle between them.
8
+ *
9
+ * Spec: ISO/IEC 23008-1:2023 + draft-ramadan-moq-mmt §12 (detached trailer, Path 2).
10
+ */
11
+
12
+ // --- Private MMTP/MPU/MFU constants (ISO/IEC 23008-1 §9.2.2–9.2.3) ---
13
+ // Duplicated here as immutable spec values so this package stays a leaf with
14
+ // zero `@blockcast/*` dependencies. Re-deriving from `mmt-container` would
15
+ // reintroduce the package cycle this split exists to avoid.
16
+
17
+ const MMTP_HEADER_SIZE = 12
18
+ const MPU_HEADER_SIZE = 8
19
+ const MPU_LENGTH_FIELD_SIZE = 2
20
+ const MPU_HEADER_REMAINDER_SIZE = MPU_HEADER_SIZE - MPU_LENGTH_FIELD_SIZE
21
+ const TIMED_MFU_DU_HEADER_SIZE = 14
22
+ const NONTIMED_MFU_DU_HEADER_SIZE = 4
23
+ const PACKET_TYPE_MPU = 0x00
24
+
25
+ // --- Public ALTA trailer constants ---
26
+
27
+ /**
28
+ * MMTP header-extension ext_type assigned to the detached ALTA authenticator
29
+ * trailer (Path 2 / 08-07). Carried in an `[ext_type][ext_length][auth]`
30
+ * block appended after the MPU's declared payload bytes, before the 4-byte
31
+ * Source FEC Payload ID. MMTP X-bit stays 0 — non-ALTA MMTP receivers treat
32
+ * the trailer as bytes past `payload_length` and skip it (per ISO 23008-1
33
+ * §9.2.2 "may be discarded without impacting correct processing").
34
+ */
35
+ export const MMTP_EXT_TYPE_ALTA_AUTH = 0xf0a1
36
+
37
+ /** Fixed size of the trailer's `[ext_type][ext_length]` prefix (2 + 2 BE). */
38
+ export const MMTP_EXT_TRAILER_HEADER_SIZE = 4
39
+
40
+ /** Result of extracting the detached ALTA authenticator from an MMTP packet. */
41
+ export interface AltaTrailer {
42
+ /** Authenticator bytes (no ext_type/ext_length prefix, no trailing padding). */
43
+ auth: Uint8Array
44
+ /**
45
+ * Wire-packet byte offset where the signed payload ends, i.e. where the
46
+ * trailer begins. Caller uses this to produce
47
+ * `payload = wirePacket.subarray(0, signedEnd)` for verify_detached.
48
+ */
49
+ signedEnd: number
50
+ }
51
+
52
+ /**
53
+ * Extract the detached ALTA authenticator trailer from an MMTP source packet.
54
+ *
55
+ * Wire layout:
56
+ * `[MMTP hdr][length(2)][remaining MPU hdr(6)][DU?][media][TRAILER][SS_ID?]`
57
+ * `payload_length = 6 + DU bytes + media bytes`
58
+ *
59
+ * Returns `null` when:
60
+ * - the packet is too small / malformed,
61
+ * - `payload_length` cannot contain the remaining six MPU-header bytes,
62
+ * - the declared payload overruns the packet,
63
+ * - no bytes remain between `payload_length` and the SS_ID,
64
+ * - the trailer's `ext_type` isn't {@link MMTP_EXT_TYPE_ALTA_AUTH},
65
+ * - the declared `ext_length` would extend past the SS_ID boundary.
66
+ *
67
+ * Non-MPU packets (repair, signaling) always return `null`.
68
+ *
69
+ * @param options.skipFecId When true, do NOT reserve 4 trailing bytes for the
70
+ * Source FEC Payload ID. Use on FEC-recovered symbols where the PID has
71
+ * already been stripped upstream.
72
+ */
73
+ export function extractAltaTrailer(
74
+ mmtpPacket: Uint8Array,
75
+ options?: { skipFecId?: boolean },
76
+ ): AltaTrailer | null {
77
+ if (mmtpPacket.length < MMTP_HEADER_SIZE + MPU_HEADER_SIZE) return null
78
+ // ISO/IEC 23008-1:2023 Figure 8 places V=0 packet_type in the low six bits.
79
+ const packetType = mmtpPacket[1]! & 0x3f
80
+ if (packetType !== PACKET_TYPE_MPU) return null
81
+
82
+ const fecType = (mmtpPacket[0]! >> 3) & 0x03
83
+ let headerLength = MMTP_HEADER_SIZE
84
+ if (fecType < 2 && (mmtpPacket[0]! & 0x20) !== 0) headerLength += 4
85
+ if (fecType < 2 && (mmtpPacket[0]! & 0x02) !== 0) {
86
+ if (headerLength + 4 > mmtpPacket.length) return null
87
+ const extensionLength = new DataView(
88
+ mmtpPacket.buffer,
89
+ mmtpPacket.byteOffset + headerLength + 2,
90
+ 2,
91
+ ).getUint16(0, false)
92
+ headerLength += 4 + extensionLength
93
+ }
94
+ if (headerLength + MPU_HEADER_SIZE > mmtpPacket.length) return null
95
+
96
+ const payload = mmtpPacket.subarray(headerLength)
97
+
98
+ // Inline a minimal MPU-header read — only the fields extractAltaTrailer needs.
99
+ // payloadLength: 16 BE at bytes 0-1.
100
+ // Byte 2 packs FT(4) | T(1) | FI(2) | A(1).
101
+ const payloadLength = (payload[0]! << 8) | payload[1]!
102
+ const flagsByte = payload[2]!
103
+ const fragmentType = (flagsByte >> 4) & 0x0f
104
+ const timed = ((flagsByte >> 3) & 0x01) === 1
105
+ const fragmentationIndicator = (flagsByte >> 1) & 0x03
106
+
107
+ // Only MFU packets (FT=2) carry the detached trailer.
108
+ if (fragmentType !== 2) return null
109
+
110
+ // FI=0/1 structurally carries a DU header; FI=2/3 does not. Require at
111
+ // least one media byte after that deterministic layout so the bytes at the
112
+ // declared boundary cannot impersonate ALTA for a header-only fragment.
113
+ const dataUnitHeaderSize = fragmentationIndicator <= 1
114
+ ? (timed ? TIMED_MFU_DU_HEADER_SIZE : NONTIMED_MFU_DU_HEADER_SIZE)
115
+ : 0
116
+ if (payloadLength <= MPU_HEADER_REMAINDER_SIZE + dataUnitHeaderSize) return null
117
+
118
+ if (fecType > 1) return null
119
+ const hasFecId = !options?.skipFecId && fecType === 1
120
+ const payloadEnd = hasFecId ? payload.length - 4 : payload.length
121
+ const declaredEnd = MPU_LENGTH_FIELD_SIZE + payloadLength
122
+ if (declaredEnd > payloadEnd) return null
123
+
124
+ if (declaredEnd + MMTP_EXT_TRAILER_HEADER_SIZE > payloadEnd) return null
125
+ const extType = (payload[declaredEnd]! << 8) | payload[declaredEnd + 1]!
126
+ if (extType !== MMTP_EXT_TYPE_ALTA_AUTH) return null
127
+ const extLen = (payload[declaredEnd + 2]! << 8) | payload[declaredEnd + 3]!
128
+
129
+ const authStart = declaredEnd + MMTP_EXT_TRAILER_HEADER_SIZE
130
+ if (authStart + extLen !== payloadEnd) return null
131
+
132
+ return {
133
+ auth: payload.subarray(authStart, payloadEnd),
134
+ signedEnd: headerLength + declaredEnd,
135
+ }
136
+ }
@@ -0,0 +1,121 @@
1
+ # @blockcast/mmt-base
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`.
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).
6
+
7
+ ```bash
8
+ pnpm add @blockcast/mmt-base
9
+ ```
10
+
11
+ ## Quick start
12
+
13
+ ```ts
14
+ import {
15
+ unwrapMMTP, extractMFUPayload, extractTimestamp,
16
+ isFecRepairPacket, hasSourceFecPayloadId,
17
+ PACKET_TYPE_MPU,
18
+ } from "@blockcast/mmt-base"
19
+
20
+ const pkt = unwrapMMTP(datagram) // { header, payload }
21
+ if (pkt.header.packetType === PACKET_TYPE_MPU) {
22
+ const mfu = extractMFUPayload(datagram) // { data, fragmentationIndicator, mpuSequenceNumber, ... }
23
+ const ts = extractTimestamp(datagram) // bigint MPU timestamp
24
+ }
25
+
26
+ if (isFecRepairPacket(datagram)) {
27
+ // repair flow — hand the payload to @blockcast/mmt-fec
28
+ }
29
+ ```
30
+
31
+ ## Exports
32
+
33
+ Single entry point — `package.json#exports` declares only `.`, and `src/index.ts` re-exports the packet primitives. Group them as three families:
34
+
35
+ ### Header, MPU & MFU parsing
36
+
37
+ | Symbol | Kind | Purpose |
38
+ |--------|------|---------|
39
+ | `parseMMTPHeader` | function | Parse the 12-byte MMTP header → `MMTPHeader` |
40
+ | `unwrapMMTP` | function | Header + payload split → `MMTPPacket` |
41
+ | `parseMPUHeader` | function | Parse the 8-byte MPU header → `MPUHeader` |
42
+ | `extractMFUPayload` | function | Pull the MFU data unit out of an MMTP packet → `MFUExtraction` (handles timed `T=1` and non-timed `T=0` DU headers) |
43
+ | `extractNALUnit` | function | Extract the NAL unit bytes from an MMTP packet |
44
+ | `extractTimestamp` | function | MPU presentation timestamp as `bigint` |
45
+ | `MMTPHeader`, `MPUHeader`, `MMTPPacket`, `MFUExtraction` | type | Parsed-structure shapes |
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
+ | `PACKET_TYPE_MPU` (0x00), `PACKET_TYPE_SIGNALING` (0x02), `PACKET_TYPE_REPAIR` (0x03) | const | MMTP `packet_type` values |
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.
50
+
51
+ ### FEC payload-id, repair & AL-FEC signaling
52
+
53
+ | Symbol | Kind | Purpose |
54
+ |--------|------|---------|
55
+ | `isFecRepairPacket` | function | Is this a `PACKET_TYPE_REPAIR` packet? |
56
+ | `hasSourceFecPayloadId` | function | Strict predicate for a source packet's declared four-byte FEC payload ID |
57
+ | `extractFecPayloadId` | function | `{ ssId }` from a source packet's FEC payload id (or `null`) |
58
+ | `extractRepairFecPayloadId` | function | Repair-flow FEC payload id (13-byte, `REPAIR_FEC_PID_SIZE`) |
59
+ | `parseMoqRepairFrame` | function | Strictly parse a mode-0 MMTP Annex C repair frame → `MoqRepairFrame` |
60
+ | `parseAlFecMessage` | function | Parse an AL-FEC signaling message → `AlFecConfig` |
61
+ | `MoqRepairFrame`, `AlFecConfig` | type | Repair-frame / AL-FEC config shapes |
62
+ | `ALFEC_MESSAGE_ID` (0x0203), `FEC_CODE_XOR` (1), `FEC_CODE_RAPTORQ` (2), `REPAIR_FEC_PID_SIZE` (13) | const | AL-FEC signaling + payload-id constants |
63
+ | `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 |
64
+
65
+ ### ALTA trailer (re-exported from `@blockcast/mmt-alta-parse`)
66
+
67
+ | Symbol | Kind | Purpose |
68
+ |--------|------|---------|
69
+ | `extractAltaTrailer` | function | Extract the ALTA authentication trailer from an MMTP packet |
70
+ | `AltaTrailer` | type | Parsed trailer shape |
71
+ | `MMTP_EXT_TYPE_ALTA_AUTH`, `MMTP_EXT_TRAILER_HEADER_SIZE` | const | ALTA extension-header identifiers |
72
+
73
+ 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.
74
+
75
+ ## Why this package exists
76
+
77
+ ```
78
+ before after
79
+ ┌──────────────┐ ┌──────────────┐
80
+ │ mmt-fec │──needs primitives──► │ mmt-fec │─┐
81
+ └──────────────┘ └──────────────┘ │ import down
82
+ ┌──────────────┐ ┌──────────────┐ │
83
+ │ mmt-container│◄─FecManager needs─┐ │ mmt-container│─┤
84
+ │ (hosts the │ mmt-fec │ └──────────────┘ │
85
+ │ primitives) │───────────────────┘ ▼
86
+ └──────────────┘ ⟲ CYCLE ┌──────────────────────────┐
87
+ │ @blockcast/mmt-base │
88
+ │ (MMTP/MPU/MFU/PID) │
89
+ └──────────────────────────┘
90
+ ```
91
+
92
+ - `@blockcast/mmt-fec` imports the parsers in `src/block-processor.ts` (splitting a decoded FEC block back into MFU fragments).
93
+ - `@blockcast/mmt-container` imports these primitives directly. The obsolete
94
+ container re-export shim and `@blockcast/mmt-container/mmtp` subpath were
95
+ removed so there is one parser authority.
96
+
97
+ Keep this package dependency-light. OTI geometry and anything that needs the WASM FEC decoder belong in `@blockcast/mmt-fec`; anything that needs catalog/CMAF/reassembly state belongs in `@blockcast/mmt-container`. `mmt-base` stays pure MMTP packet parsing so both can depend on it without pulling in the other.
98
+
99
+ ## Build & test
100
+
101
+ ```bash
102
+ npm run build # tsc → dist/
103
+ npm run typecheck # tsc --noEmit
104
+ npm test # vitest run
105
+ ```
106
+
107
+ The direct suite owns header parsing, MFU extraction, payload-ID predicates,
108
+ declared-boundary rejection, C/X optional headers, and
109
+ ALTA/FEC suffix coverage. Downstream suites exercise integration only.
110
+
111
+ ## Related packages
112
+
113
+ | Package | Relationship |
114
+ |---------|-------------|
115
+ | [`@blockcast/mmt-alta-parse`](../mmt-alta-parse) | Only dependency — supplies the ALTA trailer types this package re-exports |
116
+ | [`@blockcast/mmt-fec`](../fec) | Imports these parsers in `block-processor` to turn decoded FEC blocks back into MFU fragments |
117
+ | [`@blockcast/mmt-container`](../container) | Imports these primitives directly and builds the `FecManager`, MFU reassembler, and CMAF demuxer on top |
118
+
119
+ ## License
120
+
121
+ Apache-2.0 — see `LICENSE`.
@@ -0,0 +1,2 @@
1
+ export * from './mmtp.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './mmtp.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA"}
@@ -0,0 +1,328 @@
1
+ import { extractAltaTrailer as _leafExtractAltaTrailer, type AltaTrailer as _LeafAltaTrailer } from '@blockcast/mmt-alta-parse';
2
+ /**
3
+ * @mmt/container - MMTP Parser
4
+ *
5
+ * MMTP (MMT Protocol) packet parser based on ISO/IEC 23008-1:2023 Section 9.2
6
+ *
7
+ * MMTP header format (12 bytes):
8
+ * - Byte 0: V(2) | C(1) | FEC_type(2) | r(1) | X(1) | R(1)
9
+ * - Byte 1: reserved(2) | packet_type(6)
10
+ * - Bytes 2-3: packet_id (big-endian)
11
+ * - Bytes 4-7: timestamp (big-endian, 32-bit)
12
+ * - Bytes 8-11: sequence_number (big-endian)
13
+ *
14
+ * FEC_type values:
15
+ * - 0: No FEC / source packet
16
+ * - 1: FEC mode 0 (source with FEC payload ID)
17
+ * - 2: FEC repair packet mode 0
18
+ * - 3: FEC repair packet mode 1
19
+ *
20
+ * @packageDocumentation
21
+ */
22
+ export interface MMTPHeader {
23
+ version: number;
24
+ /** Packet type: 0x00=MPU, 0x02=Signaling, 0x03=Repair */
25
+ packetType: number;
26
+ packetId: number;
27
+ timestamp: bigint;
28
+ sequenceNumber: number;
29
+ payloadLength: number;
30
+ fecType: number;
31
+ /** C flag: header carries a 32-bit packet_counter. */
32
+ packetCounterFlag: boolean;
33
+ packetCounter?: number;
34
+ /** X flag: header carries an extension header and value. */
35
+ extensionFlag: boolean;
36
+ extension?: {
37
+ type: number;
38
+ data: Uint8Array;
39
+ };
40
+ /** Byte offset at which the MMTP payload begins. */
41
+ headerLength: number;
42
+ /** Random Access Point flag - indicates keyframe (ISO 23008-1, byte 0 bit 0) */
43
+ rapFlag: boolean;
44
+ }
45
+ export interface MPUHeader {
46
+ mpuSequenceNumber: number;
47
+ fragmentationIndicator: number;
48
+ /** 8-bit MPU fragment_counter from byte 3. */
49
+ fragmentCounter: number;
50
+ /** T flag: 1=timed media (14-byte MFU DU header), 0=non-timed (4-byte header) */
51
+ timedFlag: number;
52
+ /** A flag: aggregated MPU payload. This strict profile requires A=0. */
53
+ aggregationFlag: boolean;
54
+ /** MPU payload_length (bytes 0-1): bytes after the length field, including
55
+ * the remaining six MPU-header bytes and all data-unit bytes. */
56
+ payloadLength: number;
57
+ }
58
+ export interface MFUDuHeader {
59
+ movieFragmentSequenceNumber: number;
60
+ sampleNumber: number;
61
+ offset: number;
62
+ priority: number;
63
+ dependencyCounter: number;
64
+ }
65
+ export interface MMTPPacket {
66
+ header: MMTPHeader;
67
+ payload: Uint8Array;
68
+ }
69
+ export declare const MMTP_HEADER_SIZE = 12;
70
+ export declare const MPU_HEADER_SIZE = 8;
71
+ export declare const MFU_DU_HEADER_SIZE_TIMED = 14;
72
+ export declare const MFU_DU_HEADER_SIZE_NONTIMED = 4;
73
+ export declare const PACKET_TYPE_MPU = 0;
74
+ export declare const PACKET_TYPE_SIGNALING = 2;
75
+ export declare const PACKET_TYPE_REPAIR = 3;
76
+ export declare const ALFEC_MESSAGE_ID = 515;
77
+ /**
78
+ * MMTP `packet_id` of the signaling flow, which carries PACKET_TYPE_SIGNALING
79
+ * packets such as the AL-FEC message (ALFEC_MESSAGE_ID). The FFmpeg `moq_mmt`
80
+ * muxer sends that message on this packet_id into the same multicast group as
81
+ * the media, and moqcast-draft (PR #44) makes advertising it for a track a
82
+ * MUST NOT. A track's packet_id is therefore 1..MMTP_PACKET_ID_MAX.
83
+ */
84
+ export declare const MMTP_SIGNALING_PACKET_ID = 0;
85
+ /** Largest value of the 16-bit MMTP `packet_id` header field. */
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;
89
+ /**
90
+ * Parse MMTP header from buffer
91
+ */
92
+ export declare function parseMMTPHeader(buffer: Uint8Array): MMTPHeader;
93
+ /**
94
+ * The MMTP `packet_id` of `buffer`, or null exactly when parseMMTPHeader would
95
+ * throw for it (short buffer, V != 0, truncated packet_counter or header
96
+ * extension).
97
+ *
98
+ * This is the per-packet filter a receiver runs before any other work, so it
99
+ * builds no header object, DataView or BigInt timestamp (BLO-36599). Use
100
+ * parseMMTPHeader when any other header field is needed.
101
+ */
102
+ export declare function readMMTPPacketId(buffer: Uint8Array): number | null;
103
+ /**
104
+ * Unwrap MMTP packet to extract payload
105
+ */
106
+ export declare function unwrapMMTP(buffer: Uint8Array): MMTPPacket;
107
+ /**
108
+ * Parse MPU header from payload
109
+ * ISO/IEC 23008-1:2023 Section 9.2.3.3
110
+ *
111
+ * MPU Header format (8 bytes) as written by FFmpeg/libmmt:
112
+ * - Bytes 0-1: payload_length (16 bits, big-endian)
113
+ * - Byte 2: FT(4) | T(1) | FI(2) | A(1)
114
+ * - Byte 3: fragment_counter (8 bits)
115
+ * - Bytes 4-7: MPU_sequence_number (32 bits, big-endian)
116
+ */
117
+ export declare function parseMPUHeader(payload: Uint8Array): MPUHeader;
118
+ export declare function parseTimedMfuDuHeader(payload: Uint8Array, offset: number): MFUDuHeader | null;
119
+ /**
120
+ * Why `extractMFUPayload` refused a packet.
121
+ *
122
+ * These identifiers are part of the public contract: callers surface them in
123
+ * diagnostics, so renaming one is a breaking change.
124
+ */
125
+ export type MFURejectionGate = 'packet-shorter-than-mmtp-plus-mpu-header' | 'mmtp-header-unparseable' | 'not-an-mpu-packet' | 'payload-shorter-than-mpu-header' | 'aggregation-flag-set' | 'mpu-payload-length-below-header-remainder' | 'mpu-declared-end-exceeds-payload' | 'mfu-offset-at-or-past-declared-end' | 'source-fec-payload-id-width-mismatch' | 'declared-trailers-unresolved';
126
+ export interface MFURejection {
127
+ gate: MFURejectionGate;
128
+ /** Human-readable detail, including the byte arithmetic that decided it. */
129
+ detail: string;
130
+ }
131
+ /**
132
+ * Extract NAL unit payload from MMTP packet
133
+ */
134
+ export declare function extractNALUnit(mmtpPacket: Uint8Array): Uint8Array;
135
+ /** Result of extracting MFU payload from an MMTP packet */
136
+ export interface MFUExtraction {
137
+ /** MMTP header fields */
138
+ header: MMTPHeader;
139
+ /** MPU header fields */
140
+ mpu: MPUHeader;
141
+ /** Fragment type (FT field, 4 bits): 0=metadata, 2=MFU data */
142
+ fragmentType: number;
143
+ /** MFU payload data (video/audio bytes, headers stripped, FEC ID excluded) */
144
+ data: Uint8Array;
145
+ /** Parsed timed MFU DU header when present, otherwise null */
146
+ mfuDuHeader: MFUDuHeader | null;
147
+ /** Non-timed MFU Item_ID when the 4-byte DU header is present. */
148
+ itemId: number | null;
149
+ /** Source FEC Payload ID if present (`FEC_type == 1`), or null */
150
+ fecPayloadId: {
151
+ ssId: number;
152
+ } | null;
153
+ }
154
+ /**
155
+ * Report why `extractMFUPayload` would refuse this packet, or null if it would
156
+ * accept it.
157
+ *
158
+ * `extractMFUPayload` returns bare `null` on ten distinct conditions, which
159
+ * makes a producer/consumer framing disagreement indistinguishable from a
160
+ * publisher that never started — both render as silence. Use this wherever
161
+ * that distinction matters: diagnostics, contract tests, and operator-facing
162
+ * logs.
163
+ */
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;
170
+ /**
171
+ * extractMFUPayload for a caller that already holds this packet's parsed MMTP
172
+ * header, so the header is not parsed a second time (BLO-36599).
173
+ *
174
+ * `header` must be `parseMMTPHeader(mmtpPacket)` of this same packet; the
175
+ * result is then identical to `extractMFUPayload(mmtpPacket, options)`.
176
+ */
177
+ export declare function extractMFUPayloadWithHeader(mmtpPacket: Uint8Array, header: MMTPHeader, options?: {
178
+ skipFecId?: boolean;
179
+ }): MFUExtraction | null;
180
+ /**
181
+ * Extract timestamp from MMTP packet
182
+ */
183
+ export declare function extractTimestamp(mmtpPacket: Uint8Array): bigint;
184
+ /**
185
+ * Check if MMTP packet is an FEC repair packet
186
+ * FEC_type 2 and 3 are repair packets
187
+ */
188
+ export declare function isFecRepairPacket(mmtpPacket: Uint8Array): boolean;
189
+ /**
190
+ * Extract Source FEC Payload ID (SS_ID) from the last 4 bytes of an MMTP
191
+ * source packet per ISO/IEC 23008-1:2023 Section C.5.2 Figure C.10.
192
+ *
193
+ * SS_ID is a flat 32-bit monotonic counter (incremented by 1 per packet
194
+ * for ssbg_mode0 and ssbg_mode1). Block membership and ESI use the
195
+ * configured K; repair SS_Start identifies the first SS_ID of the block and
196
+ * SSB_length records the authored source-symbol count:
197
+ * SBN = floor(SS_ID / K), ESI = SS_ID % K
198
+ * SS_Start = SBN * K (first SS_ID of the block)
199
+ *
200
+ * This matches FFmpeg moqenc_mmt.c, the drafts (draft-ramadan-moq-fec §6.2),
201
+ * and ATSC A/331 §8.1.2.5 which defers to ISO 23008-1 Annex C.
202
+ */
203
+ export declare function extractFecPayloadId(mmtpPacket: Uint8Array): {
204
+ ssId: number;
205
+ } | null;
206
+ /**
207
+ * Return true when FEC_type=1 and the exact suffix after the ISO-declared MPU
208
+ * payload contains a four-byte Source FEC Payload ID.
209
+ */
210
+ export declare function hasSourceFecPayloadId(mmtpPacket: Uint8Array): boolean;
211
+ /**
212
+ * The Source FEC Payload ID of a packet whose MMTP header the caller already
213
+ * parsed, or null when the packet carries none: present only when FEC_type=1
214
+ * and the exact suffix after the ISO-declared MPU payload holds the four-byte
215
+ * ID (ISO/IEC 23008-1 §C.5.2). Same answer as extractFecPayloadId, without a
216
+ * second header parse (BLO-36599).
217
+ *
218
+ * `header` must be `parseMMTPHeader(mmtpPacket)` of this same packet.
219
+ */
220
+ export declare function sourceFecPayloadIdOf(mmtpPacket: Uint8Array, header: MMTPHeader): {
221
+ ssId: number;
222
+ } | 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
+ /** Size of Repair FEC Payload ID per ISO/IEC 23008-1 Section C.5.3 */
236
+ export declare const REPAIR_FEC_PID_SIZE = 13;
237
+ /**
238
+ * Extract Repair FEC Payload ID from a raw-multicast MMTP repair packet.
239
+ * Per ISO/IEC 23008-1:2023 Section C.5.3 (ssbg_mode0, one-stage, no FFSRP_TS):
240
+ * [MMTP header][SS_Start:4][RSB_length:3][RS_ID:3][SSB_length:3][repair data]
241
+ * OTI is delivered via AL-FEC signaling message (Table C.3), not per-packet.
242
+ *
243
+ * Byte 1 is reserved(2)|packet_type(6) for V=0, so repair type 0x03 is 0x03.
244
+ * Pre-migration high-bits bytes (0x0c) are rejected — no compatibility decode.
245
+ */
246
+ export declare function extractRepairFecPayloadId(mmtpPacket: Uint8Array): {
247
+ ssStart: number;
248
+ rsbLength: number;
249
+ rsId: number;
250
+ ssbLength: number;
251
+ } | null;
252
+ /** Parsed MoQ repair frame per ISO/IEC 23008-1 Section C.4.3 + C.5.3 */
253
+ export interface MoqRepairFrame {
254
+ /** MMTP packetId (1=video, 2=audio) — for routing to correct FEC decoder */
255
+ packetId: number;
256
+ /** SS_Start (32 bits): SS_ID of first source symbol in block */
257
+ ssStart: number;
258
+ /** RSB_length (24 bits): number of repair symbols (P) */
259
+ rsbLength: number;
260
+ /** RS_ID (24 bits): repair symbol index (0-based) */
261
+ rsId: number;
262
+ /** SSB_length (24 bits): authored source-symbol count (1..=configured K) */
263
+ ssbLength: number;
264
+ /** Repair symbol data after the dynamic MMTP header and 13-byte FEC payload ID. */
265
+ symbolData: Uint8Array;
266
+ }
267
+ /**
268
+ * Parse a MoQ repair frame (ISO/IEC 23008-1 Annex C format).
269
+ *
270
+ * Wire format per ISO 23008-1 §C.4.3 + §C.5.3:
271
+ * MMTP Header: fixed 12 bytes plus C/X optional fields
272
+ * then SS_Start (4 bytes) → block identifier
273
+ * then RSB_length (3 bytes) → P
274
+ * then RS_ID (3 bytes) → ESI = K + RS_ID
275
+ * then SSB_length (3 bytes) → authored source-symbol count (1..=K)
276
+ * then Repair Symbol Data (T bytes)
277
+ *
278
+ * @param frame - Raw MoQ repair frame bytes
279
+ * @returns Parsed frame or null if invalid
280
+ */
281
+ export declare function parseMoqRepairFrame(frame: Uint8Array): MoqRepairFrame | null;
282
+ /**
283
+ * parseMoqRepairFrame for a caller that already holds this frame's parsed MMTP
284
+ * header, so the header is not parsed a second time (BLO-36599). The router's
285
+ * multicast repair branch uses it: one repair packet in every K + P otherwise
286
+ * paid two header parses.
287
+ *
288
+ * `header` must be `parseMMTPHeader(frame)` of this same frame; the result is
289
+ * then identical to `parseMoqRepairFrame(frame)`.
290
+ */
291
+ export declare function parseMoqRepairFrameWithHeader(frame: Uint8Array, header: MMTPHeader): MoqRepairFrame | null;
292
+ /**
293
+ * AL-FEC signaling configuration parsed from ISO/IEC 23008-1:2023 Table C.3 message.
294
+ */
295
+ export interface AlFecConfig {
296
+ fecCodeId: number;
297
+ fecPayloadIdMode: 0;
298
+ repairSymbolSize: number;
299
+ maximumK: number;
300
+ maximumP: number;
301
+ interleaveDepth: number;
302
+ oti: Uint8Array;
303
+ }
304
+ /**
305
+ * Parse AL-FEC signaling message from a full MMTP signaling packet.
306
+ *
307
+ * Wire format (ISO/IEC 23008-1:2023 Table C.3, Amendment 1:2025):
308
+ * [12-byte MMTP header (packet_type=0x02)]
309
+ * message_id(2) = 0x0203
310
+ * version(1)
311
+ * message_length(2) = length of remaining payload
312
+ * flags(1) = fec_flag(1) | private_fec_flag(1) | reserved(6)
313
+ * fec_flow_descriptor:
314
+ * length(2)
315
+ * num_flows(1)
316
+ * per flow:
317
+ * fec_flow_id(1), source_flow_id(1), num_assets(1), packet_ids(2*N),
318
+ * coding_params(1), repair_symbol_size(2),
319
+ * [one-stage]: repair_flow_id(2), fec_code_id(1),
320
+ * [private_fec_flag]: private_header(1){flag(1)|len(7)},
321
+ * current RaptorQ profile OTI(12) + interleave_depth(1)
322
+ * max_k(3), max_p(3), protection_window_time(4), protection_window_size(4)
323
+ *
324
+ * @param mmtpPacket Full MMTP packet including 12-byte header
325
+ * @returns Parsed config or null if not an AL-FEC signaling message
326
+ */
327
+ export declare function parseAlFecMessage(mmtpPacket: Uint8Array): AlFecConfig | null;
328
+ //# sourceMappingURL=mmtp.d.ts.map
@@ -0,0 +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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