@blockcast/mmt-fec 0.3.0 → 0.4.0-main.1d3ea1cc8ff2
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 +17 -15
- package/dist/block-manager.d.ts +7 -4
- package/dist/block-manager.d.ts.map +1 -1
- package/dist/block-manager.js +8 -5
- package/dist/block-manager.js.map +1 -1
- package/dist/block-processor.d.ts +19 -20
- package/dist/block-processor.d.ts.map +1 -1
- package/dist/block-processor.js +28 -94
- package/dist/block-processor.js.map +1 -1
- package/dist/fec-block-mapper.d.ts +16 -72
- package/dist/fec-block-mapper.d.ts.map +1 -1
- package/dist/fec-block-mapper.js +17 -96
- package/dist/fec-block-mapper.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/oti.d.ts +18 -29
- package/dist/oti.d.ts.map +1 -1
- package/dist/oti.js +9 -39
- package/dist/oti.js.map +1 -1
- package/dist/repair-group.d.ts +86 -0
- package/dist/repair-group.d.ts.map +1 -1
- package/dist/repair-group.js +135 -0
- package/dist/repair-group.js.map +1 -1
- package/package.json +5 -6
- package/src/block-manager.ts +9 -6
- package/src/block-processor.ts +32 -111
- package/src/fec-block-mapper.ts +23 -108
- package/src/index.ts +6 -2
- package/src/oti.ts +20 -51
- package/src/repair-group.ts +176 -0
- package/test-vectors/repair-epoch.json +119 -0
- package/node_modules/@blockcast/mmt-alta-parse/README.md +0 -181
- package/node_modules/@blockcast/mmt-alta-parse/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts +0 -57
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js +0 -115
- package/node_modules/@blockcast/mmt-alta-parse/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-alta-parse/package.json +0 -50
- package/node_modules/@blockcast/mmt-alta-parse/src/index.ts +0 -136
- package/node_modules/@blockcast/mmt-base/README.md +0 -134
- package/node_modules/@blockcast/mmt-base/dist/.build-stamp +0 -0
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts +0 -55
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js +0 -128
- package/node_modules/@blockcast/mmt-base/dist/fec-block-profile.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts +0 -7
- package/node_modules/@blockcast/mmt-base/dist/index.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/index.js +0 -7
- package/node_modules/@blockcast/mmt-base/dist/index.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts +0 -292
- package/node_modules/@blockcast/mmt-base/dist/mmtp.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js +0 -612
- package/node_modules/@blockcast/mmt-base/dist/mmtp.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts +0 -18
- package/node_modules/@blockcast/mmt-base/dist/net-constants.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js +0 -18
- package/node_modules/@blockcast/mmt-base/dist/net-constants.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts +0 -47
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js +0 -54
- package/node_modules/@blockcast/mmt-base/dist/ntp-short.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts +0 -57
- package/node_modules/@blockcast/mmt-base/dist/serial-number.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js +0 -98
- package/node_modules/@blockcast/mmt-base/dist/serial-number.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts +0 -312
- package/node_modules/@blockcast/mmt-base/dist/signalling.d.ts.map +0 -1
- package/node_modules/@blockcast/mmt-base/dist/signalling.js +0 -637
- package/node_modules/@blockcast/mmt-base/dist/signalling.js.map +0 -1
- package/node_modules/@blockcast/mmt-base/package.json +0 -49
- package/node_modules/@blockcast/mmt-base/src/fec-block-profile.ts +0 -145
- package/node_modules/@blockcast/mmt-base/src/index.ts +0 -6
- package/node_modules/@blockcast/mmt-base/src/mmtp.ts +0 -892
- package/node_modules/@blockcast/mmt-base/src/net-constants.ts +0 -17
- package/node_modules/@blockcast/mmt-base/src/ntp-short.ts +0 -67
- package/node_modules/@blockcast/mmt-base/src/serial-number.ts +0 -107
- package/node_modules/@blockcast/mmt-base/src/signalling.ts +0 -862
|
@@ -8,17 +8,10 @@
|
|
|
8
8
|
* It deliberately does NOT map MoQ media groups to FEC blocks. A recovered
|
|
9
9
|
* packet's media group is read from its own MMTP/MPU header
|
|
10
10
|
* ({@link recoveredPacketMediaGroup}), never from SBN arithmetic, and a source
|
|
11
|
-
* symbol's block comes from the wire:
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* - `iso-ssbg1-v1`: a block is the SS_ID range `[SS_Start, SS_Start +
|
|
16
|
-
* SSB_length)` its Repair FEC Payload ID states (ISO/IEC 23008-1 C.5.3), so
|
|
17
|
-
* SS_ID alone locates nothing and `fromSsId` throws.
|
|
18
|
-
*
|
|
19
|
-
* Object FEC (draft-ramadan-moq-fec §9.1) is the one exception: there each MoQ
|
|
20
|
-
* group IS its own FEC block, so {@link ObjectBlockMapper} keeps its identity
|
|
21
|
-
* `derive`.
|
|
11
|
+
* symbol's block comes from the wire: under `iso-ssbg1-v1` a block is the SS_ID
|
|
12
|
+
* range `[SS_Start, SS_Start + SSB_length)` its Repair FEC Payload ID states
|
|
13
|
+
* (ISO/IEC 23008-1 C.5.3), so SS_ID alone locates nothing and `fromSsId`
|
|
14
|
+
* throws for every stream with an FEC instance.
|
|
22
15
|
*/
|
|
23
16
|
import { type FecBlockProfile } from "@blockcast/mmt-base";
|
|
24
17
|
/** Configuration from catalog FEC parameters. */
|
|
@@ -27,10 +20,7 @@ export interface FecBlockConfig {
|
|
|
27
20
|
interleaveDepthMs: number;
|
|
28
21
|
/** GOP/frame duration (milliseconds). Measured from actual MMTP timestamps. */
|
|
29
22
|
gopDurationMs: number;
|
|
30
|
-
/**
|
|
31
|
-
* K from catalog fec.sourceSymbols: the source symbols per block under
|
|
32
|
-
* `k-padded-v1`, the maximum SSB_length under `iso-ssbg1-v1`.
|
|
33
|
-
*/
|
|
23
|
+
/** K from catalog fec.sourceSymbols: the maximum SSB_length of a block. */
|
|
34
24
|
k: number;
|
|
35
25
|
/**
|
|
36
26
|
* The catalog `fec.blockProfile`. Required and validated with
|
|
@@ -38,7 +28,7 @@ export interface FecBlockConfig {
|
|
|
38
28
|
*/
|
|
39
29
|
blockProfile: FecBlockProfile;
|
|
40
30
|
}
|
|
41
|
-
/** FEC coordinates of one MoQ object, for the
|
|
31
|
+
/** FEC coordinates of one MoQ object, for the mapper whose groups are blocks. */
|
|
42
32
|
export interface FecCoordinates {
|
|
43
33
|
/** Source Block Number */
|
|
44
34
|
sbn: number;
|
|
@@ -76,7 +66,7 @@ interface NoFecInstanceConfig {
|
|
|
76
66
|
export declare class FecBlockMapper {
|
|
77
67
|
/** Media units (GOPs/frames) per FEC block, recovered with positive round-half-up semantics. */
|
|
78
68
|
readonly d: number;
|
|
79
|
-
/** K:
|
|
69
|
+
/** K: the maximum SSB_length of a block (catalog `fec.sourceSymbols`). */
|
|
80
70
|
readonly k: number;
|
|
81
71
|
/** Block time span (ms) — used as pacing threshold */
|
|
82
72
|
readonly interleaveDepthMs: number;
|
|
@@ -94,14 +84,13 @@ export declare class FecBlockMapper {
|
|
|
94
84
|
*/
|
|
95
85
|
constructor(config: FecBlockConfig | NoFecInstanceConfig);
|
|
96
86
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
87
|
+
* SS_ID → (SBN, ESI). Only {@link NullBlockMapper} answers: a stream with an
|
|
88
|
+
* FEC instance is `iso-ssbg1-v1`, whose blocks are located by
|
|
89
|
+
* `(SS_Start, SSB_length)` range membership and never from SS_ID alone.
|
|
100
90
|
*
|
|
101
|
-
* @throws
|
|
102
|
-
* `(SS_Start, SSB_length)` range membership and never from SS_ID alone
|
|
91
|
+
* @throws for every stream with an FEC instance
|
|
103
92
|
*/
|
|
104
|
-
fromSsId(
|
|
93
|
+
fromSsId(_ssId: number): {
|
|
105
94
|
sbn: number;
|
|
106
95
|
esi: number;
|
|
107
96
|
};
|
|
@@ -137,53 +126,6 @@ export declare class NullBlockMapper extends FecBlockMapper {
|
|
|
137
126
|
/** No FEC: nothing to wait for, so pacing never sleeps. */
|
|
138
127
|
get pacingThresholdMs(): number;
|
|
139
128
|
}
|
|
140
|
-
/**
|
|
141
|
-
* Object-level FEC (§9.1): each MoQ group (frame) is its own FEC block.
|
|
142
|
-
* K_actual = ceil(frame_bytes / symbolSize) — varies per block.
|
|
143
|
-
*
|
|
144
|
-
* SBN = group_id, ESI = object_id.
|
|
145
|
-
* SS_ID = Group_ID * sourceSymbols + Object_ID (§9.1.2).
|
|
146
|
-
*
|
|
147
|
-
* That SS_ID is the K-stride numbering of `k-padded-v1`; `iso-ssbg1-v1`
|
|
148
|
-
* numbers SS_IDs consecutively per source packet (ISO/IEC 23008-1 C.5.2), so
|
|
149
|
-
* §9.1 object FEC is defined only under `k-padded-v1` and the constructor
|
|
150
|
-
* refuses any other profile.
|
|
151
|
-
*
|
|
152
|
-
* The stride of that numbering is the catalog `sourceSymbols`, never a
|
|
153
|
-
* block's own K: a short block (K_actual < sourceSymbols) still starts at
|
|
154
|
-
* `Group_ID * sourceSymbols` (its repair's SS_Start) and leaves the rest of
|
|
155
|
-
* its stride unused, which is exactly `k-padded-v1` with `SSB_length =
|
|
156
|
-
* K_actual`. So the SS_ID locator is the inherited
|
|
157
|
-
* {@link FecBlockMapper.fromSsId} over `k = sourceSymbols`, the exact inverse
|
|
158
|
-
* of {@link ObjectBlockMapper.derive}; it needs no per-block K and infers
|
|
159
|
-
* nothing.
|
|
160
|
-
*
|
|
161
|
-
* This mapper does NOT carry per-block K. Each block discovers its own K from:
|
|
162
|
-
* 1. Clean reception: counting source objects per group
|
|
163
|
-
* 2. Repair packets: SSB_length in the Repair FEC Payload ID (ISO 23008-1 C.5.3)
|
|
164
|
-
*
|
|
165
|
-
* Callers MUST pass per-block K to FecBlockManager.addSourcePacket/addRepairPacket.
|
|
166
|
-
* Created once per stream, GC'd on stream close (Effect cleanup).
|
|
167
|
-
*/
|
|
168
|
-
export declare class ObjectBlockMapper extends FecBlockMapper {
|
|
169
|
-
/** Catalog sourceSymbols (max K) — used ONLY for SS_ID encoding (§9.1.2).
|
|
170
|
-
* Actual per-block K varies: K_actual = ceil(frame_bytes / symbolSize). */
|
|
171
|
-
readonly sourceSymbolsMax: number;
|
|
172
|
-
/**
|
|
173
|
-
* @param gopDurationMs - GOP/frame duration (ms)
|
|
174
|
-
* @param sourceSymbolsMax - Catalog `fec.sourceSymbols`
|
|
175
|
-
* @param blockProfile - Catalog `fec.blockProfile`; must be `k-padded-v1`
|
|
176
|
-
*/
|
|
177
|
-
constructor(gopDurationMs: number, sourceSymbolsMax: number, blockProfile: FecBlockProfile);
|
|
178
|
-
/**
|
|
179
|
-
* SBN = group_id, ESI = object_id. SS_ID per §9.1.2. Its inverse is the
|
|
180
|
-
* inherited `fromSsId` (SBN = floor(SS_ID / sourceSymbols), ESI = SS_ID mod
|
|
181
|
-
* sourceSymbols).
|
|
182
|
-
*/
|
|
183
|
-
derive(groupId: number, objectId: number): FecCoordinates;
|
|
184
|
-
/** One frame of latency: each frame is its own block. */
|
|
185
|
-
get pacingThresholdMs(): number;
|
|
186
|
-
}
|
|
187
129
|
/**
|
|
188
130
|
* Create a FecBlockMapper from catalog FEC config + measured GOP duration.
|
|
189
131
|
*
|
|
@@ -191,8 +133,10 @@ export declare class ObjectBlockMapper extends FecBlockMapper {
|
|
|
191
133
|
* {@link NullBlockMapper}; `fec.blockProfile` is not read, since a stream
|
|
192
134
|
* without FEC names none.
|
|
193
135
|
* - Otherwise `fec.blockProfile` is required (validated with
|
|
194
|
-
* `parseFecBlockProfile`, throwing
|
|
195
|
-
*
|
|
136
|
+
* `parseFecBlockProfile`, throwing unless it is `iso-ssbg1-v1`) and the
|
|
137
|
+
* result is a {@link FecBlockMapper}. `mode: 'object'` (per-group object
|
|
138
|
+
* FEC, SS_ID = Group_ID * K + Object_ID) throws: that numbering is the
|
|
139
|
+
* retired `k-padded-v1` stride, which `iso-ssbg1-v1` does not define.
|
|
196
140
|
*/
|
|
197
141
|
export declare function createMapper(fecConfig: {
|
|
198
142
|
interleaveDepthMs?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fec-block-mapper.d.ts","sourceRoot":"","sources":["../src/fec-block-mapper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fec-block-mapper.d.ts","sourceRoot":"","sources":["../src/fec-block-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAA;AAG5B,iDAAiD;AACjD,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,iBAAiB,EAAE,MAAM,CAAA;IACzB,+EAA+E;IAC/E,aAAa,EAAE,MAAM,CAAA;IACrB,2EAA2E;IAC3E,CAAC,EAAE,MAAM,CAAA;IACT;;;OAGG;IACH,YAAY,EAAE,eAAe,CAAA;CAC9B;AAED,iFAAiF;AACjF,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAA;IACX,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,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AAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;IAI7D,2DAA2D;IAC3D,IAAa,iBAAiB,IAAI,MAAM,CAEvC;CACF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE;IACT,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iFAAiF;IACjF,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB,GAAG,SAAS,EACb,aAAa,EAAE,MAAM,GACpB,cAAc,CAkBhB"}
|
package/dist/fec-block-mapper.js
CHANGED
|
@@ -8,17 +8,10 @@
|
|
|
8
8
|
* It deliberately does NOT map MoQ media groups to FEC blocks. A recovered
|
|
9
9
|
* packet's media group is read from its own MMTP/MPU header
|
|
10
10
|
* ({@link recoveredPacketMediaGroup}), never from SBN arithmetic, and a source
|
|
11
|
-
* symbol's block comes from the wire:
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* - `iso-ssbg1-v1`: a block is the SS_ID range `[SS_Start, SS_Start +
|
|
16
|
-
* SSB_length)` its Repair FEC Payload ID states (ISO/IEC 23008-1 C.5.3), so
|
|
17
|
-
* SS_ID alone locates nothing and `fromSsId` throws.
|
|
18
|
-
*
|
|
19
|
-
* Object FEC (draft-ramadan-moq-fec §9.1) is the one exception: there each MoQ
|
|
20
|
-
* group IS its own FEC block, so {@link ObjectBlockMapper} keeps its identity
|
|
21
|
-
* `derive`.
|
|
11
|
+
* symbol's block comes from the wire: under `iso-ssbg1-v1` a block is the SS_ID
|
|
12
|
+
* range `[SS_Start, SS_Start + SSB_length)` its Repair FEC Payload ID states
|
|
13
|
+
* (ISO/IEC 23008-1 C.5.3), so SS_ID alone locates nothing and `fromSsId`
|
|
14
|
+
* throws for every stream with an FEC instance.
|
|
22
15
|
*/
|
|
23
16
|
import { PACKET_TYPE_MPU, parseFecBlockProfile, parseMMTPHeader, parseMPUHeader, } from "@blockcast/mmt-base";
|
|
24
17
|
import { deriveFecInterleaveDepth } from "./oti.js";
|
|
@@ -50,7 +43,7 @@ const NO_FEC_INSTANCE = Symbol("no FEC instance");
|
|
|
50
43
|
export class FecBlockMapper {
|
|
51
44
|
/** Media units (GOPs/frames) per FEC block, recovered with positive round-half-up semantics. */
|
|
52
45
|
d;
|
|
53
|
-
/** K:
|
|
46
|
+
/** K: the maximum SSB_length of a block (catalog `fec.sourceSymbols`). */
|
|
54
47
|
k;
|
|
55
48
|
/** Block time span (ms) — used as pacing threshold */
|
|
56
49
|
interleaveDepthMs;
|
|
@@ -78,22 +71,15 @@ export class FecBlockMapper {
|
|
|
78
71
|
this.d = deriveFecInterleaveDepth(config.interleaveDepthMs, config.gopDurationMs);
|
|
79
72
|
}
|
|
80
73
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
74
|
+
* SS_ID → (SBN, ESI). Only {@link NullBlockMapper} answers: a stream with an
|
|
75
|
+
* FEC instance is `iso-ssbg1-v1`, whose blocks are located by
|
|
76
|
+
* `(SS_Start, SSB_length)` range membership and never from SS_ID alone.
|
|
84
77
|
*
|
|
85
|
-
* @throws
|
|
86
|
-
* `(SS_Start, SSB_length)` range membership and never from SS_ID alone
|
|
78
|
+
* @throws for every stream with an FEC instance
|
|
87
79
|
*/
|
|
88
|
-
fromSsId(
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
'(SS_Start, SSB_length) range membership, never from SS_ID alone');
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
sbn: Math.floor(ssId / this.k),
|
|
95
|
-
esi: ssId % this.k,
|
|
96
|
-
};
|
|
80
|
+
fromSsId(_ssId) {
|
|
81
|
+
throw new Error(`fromSsId: a ${this.blockProfile ?? 'non-FEC'} stream locates a block by ` +
|
|
82
|
+
'(SS_Start, SSB_length) range membership, never from SS_ID alone');
|
|
97
83
|
}
|
|
98
84
|
/**
|
|
99
85
|
* Pacing threshold: one full block duration = interleaveDepthMs.
|
|
@@ -143,72 +129,6 @@ export class NullBlockMapper extends FecBlockMapper {
|
|
|
143
129
|
return 0;
|
|
144
130
|
}
|
|
145
131
|
}
|
|
146
|
-
/**
|
|
147
|
-
* Object-level FEC (§9.1): each MoQ group (frame) is its own FEC block.
|
|
148
|
-
* K_actual = ceil(frame_bytes / symbolSize) — varies per block.
|
|
149
|
-
*
|
|
150
|
-
* SBN = group_id, ESI = object_id.
|
|
151
|
-
* SS_ID = Group_ID * sourceSymbols + Object_ID (§9.1.2).
|
|
152
|
-
*
|
|
153
|
-
* That SS_ID is the K-stride numbering of `k-padded-v1`; `iso-ssbg1-v1`
|
|
154
|
-
* numbers SS_IDs consecutively per source packet (ISO/IEC 23008-1 C.5.2), so
|
|
155
|
-
* §9.1 object FEC is defined only under `k-padded-v1` and the constructor
|
|
156
|
-
* refuses any other profile.
|
|
157
|
-
*
|
|
158
|
-
* The stride of that numbering is the catalog `sourceSymbols`, never a
|
|
159
|
-
* block's own K: a short block (K_actual < sourceSymbols) still starts at
|
|
160
|
-
* `Group_ID * sourceSymbols` (its repair's SS_Start) and leaves the rest of
|
|
161
|
-
* its stride unused, which is exactly `k-padded-v1` with `SSB_length =
|
|
162
|
-
* K_actual`. So the SS_ID locator is the inherited
|
|
163
|
-
* {@link FecBlockMapper.fromSsId} over `k = sourceSymbols`, the exact inverse
|
|
164
|
-
* of {@link ObjectBlockMapper.derive}; it needs no per-block K and infers
|
|
165
|
-
* nothing.
|
|
166
|
-
*
|
|
167
|
-
* This mapper does NOT carry per-block K. Each block discovers its own K from:
|
|
168
|
-
* 1. Clean reception: counting source objects per group
|
|
169
|
-
* 2. Repair packets: SSB_length in the Repair FEC Payload ID (ISO 23008-1 C.5.3)
|
|
170
|
-
*
|
|
171
|
-
* Callers MUST pass per-block K to FecBlockManager.addSourcePacket/addRepairPacket.
|
|
172
|
-
* Created once per stream, GC'd on stream close (Effect cleanup).
|
|
173
|
-
*/
|
|
174
|
-
export class ObjectBlockMapper extends FecBlockMapper {
|
|
175
|
-
/** Catalog sourceSymbols (max K) — used ONLY for SS_ID encoding (§9.1.2).
|
|
176
|
-
* Actual per-block K varies: K_actual = ceil(frame_bytes / symbolSize). */
|
|
177
|
-
sourceSymbolsMax;
|
|
178
|
-
/**
|
|
179
|
-
* @param gopDurationMs - GOP/frame duration (ms)
|
|
180
|
-
* @param sourceSymbolsMax - Catalog `fec.sourceSymbols`
|
|
181
|
-
* @param blockProfile - Catalog `fec.blockProfile`; must be `k-padded-v1`
|
|
182
|
-
*/
|
|
183
|
-
constructor(gopDurationMs, sourceSymbolsMax, blockProfile) {
|
|
184
|
-
if (sourceSymbolsMax <= 0)
|
|
185
|
-
throw new Error('ObjectBlockMapper: sourceSymbolsMax must be > 0 (from catalog)');
|
|
186
|
-
const profile = parseFecBlockProfile(blockProfile, 'ObjectBlockMapper fec.blockProfile');
|
|
187
|
-
if (profile !== 'k-padded-v1') {
|
|
188
|
-
throw new Error(`ObjectBlockMapper: §9.1 object FEC numbers SS_ID = Group_ID * K + Object_ID, the k-padded-v1 stride; ` +
|
|
189
|
-
`it is not defined under ${profile}`);
|
|
190
|
-
}
|
|
191
|
-
// D=1, K=sourceSymbolsMax for SS_ID math only — actual block K varies
|
|
192
|
-
super({ interleaveDepthMs: gopDurationMs, gopDurationMs, k: sourceSymbolsMax, blockProfile: profile });
|
|
193
|
-
this.sourceSymbolsMax = sourceSymbolsMax;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* SBN = group_id, ESI = object_id. SS_ID per §9.1.2. Its inverse is the
|
|
197
|
-
* inherited `fromSsId` (SBN = floor(SS_ID / sourceSymbols), ESI = SS_ID mod
|
|
198
|
-
* sourceSymbols).
|
|
199
|
-
*/
|
|
200
|
-
derive(groupId, objectId) {
|
|
201
|
-
return {
|
|
202
|
-
sbn: groupId,
|
|
203
|
-
esi: objectId,
|
|
204
|
-
ssId: groupId * this.sourceSymbolsMax + objectId,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
/** One frame of latency: each frame is its own block. */
|
|
208
|
-
get pacingThresholdMs() {
|
|
209
|
-
return this.gopDurationMs; // one frame latency
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
132
|
/**
|
|
213
133
|
* Create a FecBlockMapper from catalog FEC config + measured GOP duration.
|
|
214
134
|
*
|
|
@@ -216,17 +136,18 @@ export class ObjectBlockMapper extends FecBlockMapper {
|
|
|
216
136
|
* {@link NullBlockMapper}; `fec.blockProfile` is not read, since a stream
|
|
217
137
|
* without FEC names none.
|
|
218
138
|
* - Otherwise `fec.blockProfile` is required (validated with
|
|
219
|
-
* `parseFecBlockProfile`, throwing
|
|
220
|
-
*
|
|
139
|
+
* `parseFecBlockProfile`, throwing unless it is `iso-ssbg1-v1`) and the
|
|
140
|
+
* result is a {@link FecBlockMapper}. `mode: 'object'` (per-group object
|
|
141
|
+
* FEC, SS_ID = Group_ID * K + Object_ID) throws: that numbering is the
|
|
142
|
+
* retired `k-padded-v1` stride, which `iso-ssbg1-v1` does not define.
|
|
221
143
|
*/
|
|
222
144
|
export function createMapper(fecConfig, gopDurationMs) {
|
|
223
145
|
if (!fecConfig || !fecConfig.sourceSymbols) {
|
|
224
146
|
return new NullBlockMapper(gopDurationMs);
|
|
225
147
|
}
|
|
226
148
|
const blockProfile = parseFecBlockProfile(fecConfig.blockProfile, 'fec.blockProfile');
|
|
227
|
-
// extensions feature — see moqcast-draft docs/fec-extensions-material.md, not in public -00
|
|
228
149
|
if (fecConfig.mode === 'object') {
|
|
229
|
-
|
|
150
|
+
throw new Error(`createMapper: object FEC numbers SS_ID = Group_ID * K + Object_ID, which ${blockProfile} does not define`);
|
|
230
151
|
}
|
|
231
152
|
return new FecBlockMapper({
|
|
232
153
|
interleaveDepthMs: fecConfig.interleaveDepthMs && fecConfig.interleaveDepthMs > 0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fec-block-mapper.js","sourceRoot":"","sources":["../src/fec-block-mapper.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fec-block-mapper.js","sourceRoot":"","sources":["../src/fec-block-mapper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,cAAc,GAEf,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAA;AA2BnD;;;;;;;;;GASG;AACH,MAAM,UAAU,yBAAyB,CAAC,MAAkB;IAC1D,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAA;IACtC,IAAI,MAAM,CAAC,UAAU,KAAK,eAAe,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CACb,wDAAwD,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,0BAA0B,CAClI,CAAA;IACH,CAAC;IACD,OAAO,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,iBAAiB,CAAA;AAC/E,CAAC;AAED;;;;;GAKG;AACH,MAAM,eAAe,GAAkB,MAAM,CAAC,iBAAiB,CAAC,CAAA;AAUhE,iEAAiE;AACjE,MAAM,OAAO,cAAc;IACzB,gGAAgG;IACvF,CAAC,CAAQ;IAClB,0EAA0E;IACjE,CAAC,CAAQ;IAClB,sDAAsD;IAC7C,iBAAiB,CAAQ;IAClC,8BAA8B;IACrB,aAAa,CAAQ;IAC9B;;;OAGG;IACM,YAAY,CAAwB;IAE7C;;;;OAIG;IACH,YAAY,MAA4C;QACtD,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,eAAe,CAAC,CAAA;QACnD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,KAAK,eAAe;YACzD,CAAC,CAAC,IAAI;YACN,C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AE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,CAAA;IAC9B,CAAC;IAED,2DAA2D;IAC3D,IAAa,iBAAiB;QAC5B,OAAO,CAAC,CAAA;IACV,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAC1B,SAMa,EACb,aAAqB;IAErB,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QAC3C,OAAO,IAAI,eAAe,CAAC,aAAa,CAAC,CAAA;IAC3C,CAAC;IACD,MAAM,YAAY,GAAG,oBAAoB,CAAC,SAAS,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAA;IACrF,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,4EAA4E,YAAY,kBAAkB,CAC3G,CAAA;IACH,CAAC;IACD,OAAO,IAAI,cAAc,CAAC;QACxB,iBAAiB,EAAE,SAAS,CAAC,iBAAiB,IAAI,SAAS,CAAC,iBAAiB,GAAG,CAAC;YAC/E,CAAC,CAAC,SAAS,CAAC,iBAAiB;YAC7B,CAAC,CAAC,aAAa;QACjB,aAAa;QACb,CAAC,EAAE,SAAS,CAAC,aAAa;QAC1B,YAAY;KACb,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,12 +17,12 @@ export { ReorderBuffer, type ReorderBufferConfig, } from "./reorder-buffer.js";
|
|
|
17
17
|
export { splitToSymbols, recoverFromSymbols, computeK, } from "./cmaf-symbols.js";
|
|
18
18
|
export { splitFrameToSymbol, recoverFrameFromSymbol, } from "./loc-symbols.js";
|
|
19
19
|
export { CmafFecRecovery, type CmafFecRecoveryConfig, type FecDecoder, } from "./cmaf-recovery.js";
|
|
20
|
-
export { buildOTI, buildOTIFromCatalog, parseOTI,
|
|
21
|
-
export { FecBlockMapper, NullBlockMapper,
|
|
20
|
+
export { buildOTI, buildOTIFromCatalog, parseOTI, deriveFecInterleaveDepth, catalogFecInterleaveMs, type FecInterleaveCatalog, parseRepairPacket, type OTIParams, fecBlockDeadlineMs, fecBlockBudgetMs, deriveFecRetentionBlocks, tryDeriveFecRetentionBlocks, MAX_FEC_RETENTION_BLOCKS, LOCAL_FEC_RETENTION_BLOCKS, LOCAL_FEC_TIMEOUT_MS, playbackLatencyMs, } from "./oti.js";
|
|
21
|
+
export { FecBlockMapper, NullBlockMapper, createMapper, recoveredPacketMediaGroup, type FecBlockConfig, type FecCoordinates, } from "./fec-block-mapper.js";
|
|
22
22
|
/**
|
|
23
23
|
* MoQ repair group ids for `iso-ssbg1-v1` blocks: the 62-bit
|
|
24
24
|
* wrap-epoch-extended SS_Start, the repair FETCH range for a lost SS_ID, and
|
|
25
25
|
* the check a received repair object's Group ID must pass.
|
|
26
26
|
*/
|
|
27
|
-
export { extSsStart, extendSsId, repairFetchRange, repairGroupIdMatches, type RepairFetchAnchor, type RepairFetchRange, } from "./repair-group.js";
|
|
27
|
+
export { extSsStart, extendSsId, repairFetchRange, repairGroupIdMatches, RepairEpochReferences, type RepairEpochStats, type RepairFetchAnchor, type RepairFetchRange, type RepairGroupPlan, type RepairLargestOutcome, } from "./repair-group.js";
|
|
28
28
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACN,eAAe,EACf,SAAS,EACT,KAAK,QAAQ,EACb,KAAK,sBAAsB,EAC3B,KAAK,aAAa,GAClB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,eAAe,EACf,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,aAAa,EACb,KAAK,mBAAmB,GAC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AM,UAAU,CAAC;AAElB,OAAO,EACN,cAAc,EACd,eAAe,EACf,YAAY,EACZ,yBAAyB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,GACnB,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,OAAO,EACN,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,oBAAoB,GACzB,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -17,12 +17,12 @@ export { ReorderBuffer, } from "./reorder-buffer.js";
|
|
|
17
17
|
export { splitToSymbols, recoverFromSymbols, computeK, } from "./cmaf-symbols.js";
|
|
18
18
|
export { splitFrameToSymbol, recoverFrameFromSymbol, } from "./loc-symbols.js";
|
|
19
19
|
export { CmafFecRecovery, } from "./cmaf-recovery.js";
|
|
20
|
-
export { buildOTI, buildOTIFromCatalog, parseOTI,
|
|
21
|
-
export { FecBlockMapper, NullBlockMapper,
|
|
20
|
+
export { buildOTI, buildOTIFromCatalog, parseOTI, deriveFecInterleaveDepth, catalogFecInterleaveMs, parseRepairPacket, fecBlockDeadlineMs, fecBlockBudgetMs, deriveFecRetentionBlocks, tryDeriveFecRetentionBlocks, MAX_FEC_RETENTION_BLOCKS, LOCAL_FEC_RETENTION_BLOCKS, LOCAL_FEC_TIMEOUT_MS, playbackLatencyMs, } from "./oti.js";
|
|
21
|
+
export { FecBlockMapper, NullBlockMapper, createMapper, recoveredPacketMediaGroup, } from "./fec-block-mapper.js";
|
|
22
22
|
/**
|
|
23
23
|
* MoQ repair group ids for `iso-ssbg1-v1` blocks: the 62-bit
|
|
24
24
|
* wrap-epoch-extended SS_Start, the repair FETCH range for a lost SS_ID, and
|
|
25
25
|
* the check a received repair object's Group ID must pass.
|
|
26
26
|
*/
|
|
27
|
-
export { extSsStart, extendSsId, repairFetchRange, repairGroupIdMatches, } from "./repair-group.js";
|
|
27
|
+
export { extSsStart, extendSsId, repairFetchRange, repairGroupIdMatches, RepairEpochReferences, } from "./repair-group.js";
|
|
28
28
|
//# 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;;;;;;;;;;;;GAYG;AAEH,OAAO,EACN,eAAe,EACf,SAAS,GAIT,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,eAAe,EACf,gBAAgB,GAKhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,aAAa,GAEb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,QAAQ,GACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,kBAAkB,EAClB,sBAAsB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,eAAe,GAGf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EACN,eAAe,EACf,SAAS,GAIT,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,eAAe,EACf,gBAAgB,GAKhB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,aAAa,GAEb,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,cAAc,EACd,kBAAkB,EAClB,QAAQ,GACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,kBAAkB,EAClB,sBAAsB,GACtB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,eAAe,GAGf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,QAAQ,EACR,mBAAmB,EACnB,QAAQ,EACR,wBAAwB,EACxB,sBAAsB,EAEtB,iBAAiB,EAEjB,kBAAkB,EAClB,gBAAgB,EAChB,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,iBAAiB,GACjB,MAAM,UAAU,CAAC;AAElB,OAAO,EACN,cAAc,EACd,eAAe,EACf,YAAY,EACZ,yBAAyB,GAGzB,MAAM,uBAAuB,CAAC;AAE/B;;;;GAIG;AACH,OAAO,EACN,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,GAMrB,MAAM,mBAAmB,CAAC"}
|
package/dist/oti.d.ts
CHANGED
|
@@ -44,15 +44,16 @@ export declare function parseOTI(oti: Uint8Array): OTIParams & {
|
|
|
44
44
|
* Resolve a catalog FEC block's span in milliseconds.
|
|
45
45
|
*
|
|
46
46
|
* The catalog carries exactly ONE interleave field: `interleaveDepthMs`, the
|
|
47
|
-
* full FEC block span in MILLISECONDS (draft-ramadan-moq-fec §5.1).
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* Absent
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
47
|
+
* full FEC block send span in MILLISECONDS (draft-ramadan-moq-fec §5.1).
|
|
48
|
+
* Block boundaries still come from the wire's SS_Start and SSB_length; this
|
|
49
|
+
* field never supplies a group count or replaces those coordinates.
|
|
50
|
+
*
|
|
51
|
+
* Absent → undefined. An explicit zero is returned as zero: it is the
|
|
52
|
+
* catalog's no-elapsed-deadline sentinel, not an invitation to infer a span.
|
|
53
|
+
* Positive values must be safe integer milliseconds. Finiteness is checked
|
|
54
|
+
* separately from the range because `Infinity` satisfies `> 0`: a JSON catalog
|
|
55
|
+
* cannot spell `Infinity`, but any overflowing literal (`1e999`) parses to it,
|
|
56
|
+
* and it would then reach `fecBlockBudgetMs` as an unbounded span. The legacy
|
|
56
57
|
* `interleaveDepth` frame-count key and
|
|
57
58
|
* the `interleaveMs` alias were removed in the BLO-14526 clean cut — producers
|
|
58
59
|
* emit milliseconds only, and there is deliberately NO fallback read.
|
|
@@ -75,26 +76,6 @@ export declare function catalogFecInterleaveMs(fec: FecInterleaveCatalog | undef
|
|
|
75
76
|
* but represents D=120 rather than D=121.
|
|
76
77
|
*/
|
|
77
78
|
export declare function deriveFecInterleaveDepth(interleaveDepthMs: number, mediaUnitDurationMs: number): number;
|
|
78
|
-
/**
|
|
79
|
-
* Compute the full FEC block completion timeout from the catalog block span.
|
|
80
|
-
*
|
|
81
|
-
* The catalog's `interleaveDepthMs` IS the full FEC block span in
|
|
82
|
-
* milliseconds (draft-ramadan-moq-fec §5.1): producers emit
|
|
83
|
-
* D × unit-duration, and every symbol of a block — source and repair —
|
|
84
|
-
* arrives within that span. The full-block timeout is therefore
|
|
85
|
-
* K-INDEPENDENT:
|
|
86
|
-
*
|
|
87
|
-
* timeout = interleaveDepthMs * safetyFactor
|
|
88
|
-
*
|
|
89
|
-
* A caller that genuinely needs a per-sub-block deadline scales the block
|
|
90
|
-
* span by K_sub / K. Never scale it by a symbol count: the span already
|
|
91
|
-
* covers every symbol of the block.
|
|
92
|
-
*
|
|
93
|
-
* @param interleaveDepthMs - Full FEC block span in ms (catalog fec.interleaveDepthMs)
|
|
94
|
-
* @param safetyFactor - Jitter margin (default 3.0)
|
|
95
|
-
* @returns Timeout in milliseconds
|
|
96
|
-
*/
|
|
97
|
-
export declare function computeFecTimeout(interleaveDepthMs: number, safetyFactor?: number): number;
|
|
98
79
|
/**
|
|
99
80
|
* Absolute deadline for one FEC block.
|
|
100
81
|
*
|
|
@@ -209,6 +190,14 @@ export declare function deriveFecRetentionBlocks(deliveryWindowMs: number, inter
|
|
|
209
190
|
* anywhere else.
|
|
210
191
|
*/
|
|
211
192
|
export declare const MAX_FEC_RETENTION_BLOCKS = 255;
|
|
193
|
+
/**
|
|
194
|
+
* Receiver-local block retention used when the catalog carries no elapsed-time
|
|
195
|
+
* FEC window. This is a memory/cleanup bound only; it is never derived from
|
|
196
|
+
* media rate and never treated as a catalog deadline.
|
|
197
|
+
*/
|
|
198
|
+
export declare const LOCAL_FEC_RETENTION_BLOCKS = 2;
|
|
199
|
+
/** Receiver-local cleanup budget used when the catalog has no elapsed span. */
|
|
200
|
+
export declare const LOCAL_FEC_TIMEOUT_MS = 500;
|
|
212
201
|
/**
|
|
213
202
|
* `deriveFecRetentionBlocks` without the throw: the block count, or `undefined`
|
|
214
203
|
* when the geometry cannot define one.
|
package/dist/oti.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oti.d.ts","sourceRoot":"","sources":["../src/oti.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,SAAS;IACzB,2DAA2D;IAC3D,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,0BAA0B;IAC1B,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,GAAG,UAAU,CAwBtD;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,UAAU,CAWpE;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG;IAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAYnE;AAwBD
|
|
1
|
+
{"version":3,"file":"oti.d.ts","sourceRoot":"","sources":["../src/oti.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,SAAS;IACzB,2DAA2D;IAC3D,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,gCAAgC;I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,EAAE,MAAM,GACvB,MAAM,CAmCR;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,MAAO,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAC1C,gBAAgB,EAAE,MAAM,EACxB,iBAAiB,EAAE,MAAM,GACvB,MAAM,GAAG,SAAS,CAKpB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,aAAa,EAAE,MAAM,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAYtG;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG;IACtD,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,UAAU,CAAC;CACzE,GAAG,IAAI,CASP"}
|
package/dist/oti.js
CHANGED
|
@@ -93,7 +93,7 @@ function validateOTIFields(F, T, Z, N, Al) {
|
|
|
93
93
|
}
|
|
94
94
|
export function catalogFecInterleaveMs(fec) {
|
|
95
95
|
const ms = fec?.interleaveDepthMs;
|
|
96
|
-
return typeof ms === "number" &&
|
|
96
|
+
return typeof ms === "number" && Number.isSafeInteger(ms) && ms >= 0 ? ms : undefined;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
99
|
* Derive the integer FEC interleave depth D from a catalog block span and the
|
|
@@ -117,44 +117,6 @@ export function deriveFecInterleaveDepth(interleaveDepthMs, mediaUnitDurationMs)
|
|
|
117
117
|
}
|
|
118
118
|
return Math.max(1, Math.floor(interleaveDepthMs / mediaUnitDurationMs + 0.5));
|
|
119
119
|
}
|
|
120
|
-
/**
|
|
121
|
-
* Compute the full FEC block completion timeout from the catalog block span.
|
|
122
|
-
*
|
|
123
|
-
* The catalog's `interleaveDepthMs` IS the full FEC block span in
|
|
124
|
-
* milliseconds (draft-ramadan-moq-fec §5.1): producers emit
|
|
125
|
-
* D × unit-duration, and every symbol of a block — source and repair —
|
|
126
|
-
* arrives within that span. The full-block timeout is therefore
|
|
127
|
-
* K-INDEPENDENT:
|
|
128
|
-
*
|
|
129
|
-
* timeout = interleaveDepthMs * safetyFactor
|
|
130
|
-
*
|
|
131
|
-
* A caller that genuinely needs a per-sub-block deadline scales the block
|
|
132
|
-
* span by K_sub / K. Never scale it by a symbol count: the span already
|
|
133
|
-
* covers every symbol of the block.
|
|
134
|
-
*
|
|
135
|
-
* @param interleaveDepthMs - Full FEC block span in ms (catalog fec.interleaveDepthMs)
|
|
136
|
-
* @param safetyFactor - Jitter margin (default 3.0)
|
|
137
|
-
* @returns Timeout in milliseconds
|
|
138
|
-
*/
|
|
139
|
-
export function computeFecTimeout(interleaveDepthMs, safetyFactor = 3.0) {
|
|
140
|
-
// Finite, not merely > 0, and on BOTH arguments: the product is the caller's
|
|
141
|
-
// expiry deadline, so a non-finite either side makes every `now > deadline`
|
|
142
|
-
// comparison false and the block never expires -- strictly worse than
|
|
143
|
-
// expiring late. `NaN <= 0` is false, so a bare `> 0` guard passes it
|
|
144
|
-
// through. Both values reach here from JSON (the catalog span, and the
|
|
145
|
-
// safety factor via test-vectors/catalog-validation.json), where an
|
|
146
|
-
// overflowing literal such as `1e999` parses to Infinity -- JSON has no
|
|
147
|
-
// Infinity literal, so there is no other way to spell it.
|
|
148
|
-
if (!Number.isFinite(interleaveDepthMs) || interleaveDepthMs <= 0) {
|
|
149
|
-
throw new Error(`[FEC] interleaveDepthMs must be a finite value > 0 (got ${interleaveDepthMs}ms). Fix encoder config.`);
|
|
150
|
-
}
|
|
151
|
-
if (!Number.isFinite(safetyFactor) || safetyFactor <= 0) {
|
|
152
|
-
throw new Error(`[FEC] safetyFactor must be a finite value > 0 (got ${safetyFactor}). Fix encoder config.`);
|
|
153
|
-
}
|
|
154
|
-
// interleaveDepthMs IS the block span. K=4, D=4 at 30fps:
|
|
155
|
-
// interleaveDepthMs = 133ms → timeout = ceil(133 * 3) = 399ms.
|
|
156
|
-
return Math.ceil(interleaveDepthMs * safetyFactor);
|
|
157
|
-
}
|
|
158
120
|
/**
|
|
159
121
|
* Absolute deadline for one FEC block.
|
|
160
122
|
*
|
|
@@ -314,6 +276,14 @@ export function deriveFecRetentionBlocks(deliveryWindowMs, interleaveDepthMs) {
|
|
|
314
276
|
* anywhere else.
|
|
315
277
|
*/
|
|
316
278
|
export const MAX_FEC_RETENTION_BLOCKS = 0xff;
|
|
279
|
+
/**
|
|
280
|
+
* Receiver-local block retention used when the catalog carries no elapsed-time
|
|
281
|
+
* FEC window. This is a memory/cleanup bound only; it is never derived from
|
|
282
|
+
* media rate and never treated as a catalog deadline.
|
|
283
|
+
*/
|
|
284
|
+
export const LOCAL_FEC_RETENTION_BLOCKS = 2;
|
|
285
|
+
/** Receiver-local cleanup budget used when the catalog has no elapsed span. */
|
|
286
|
+
export const LOCAL_FEC_TIMEOUT_MS = 500;
|
|
317
287
|
/**
|
|
318
288
|
* `deriveFecRetentionBlocks` without the throw: the block count, or `undefined`
|
|
319
289
|
* when the geometry cannot define one.
|
package/dist/oti.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oti.js","sourceRoot":"","sources":["../src/oti.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAe1D;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CAAC,MAAiB;IACzC,MAAM,EACL,cAAc,EAAE,CAAC,EACjB,UAAU,EAAE,CAAC,EACb,YAAY,EAAE,CAAC,EACf,SAAS,EAAE,CAAC,EACZ,SAAS,EAAE,EAAE,GACb,GAAG,MAAM,CAAC;IACX,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,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