@blockcast/mmt-container 0.5.0 → 1.0.0-main.3cb7359ea316
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 +21 -16
- package/dist/browser-runtime.js +1024 -1078
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +33 -87
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +12 -434
- package/dist/carp-catalog.js.map +4 -4
- package/dist/catalog-fec-params.d.ts +48 -161
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +567 -592
- package/dist/catalog-fec-params.js.map +4 -4
- package/dist/catalog-network-source.js +6 -2
- package/dist/catalog-network-source.js.map +3 -3
- package/dist/delivery-catalog.js +12 -4
- package/dist/delivery-catalog.js.map +4 -4
- package/dist/delta-fallback-config.d.ts +21 -26
- package/dist/delta-fallback-config.d.ts.map +1 -1
- package/dist/delta-fallback-config.js +582 -24
- package/dist/delta-fallback-config.js.map +4 -4
- package/dist/fec-manager.js +6 -2
- package/dist/fec-manager.js.map +3 -3
- package/dist/fec-state.d.ts +5 -43
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +529 -34
- package/dist/fec-state.js.map +4 -4
- package/dist/fec-worker-setup.js +6 -2
- package/dist/fec-worker-setup.js.map +3 -3
- package/dist/held-layer-admission.js +6 -2
- package/dist/held-layer-admission.js.map +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -39
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.js +6 -2
- package/dist/iso-block-locator.js.map +3 -3
- package/dist/mfu-reassembler.js +6 -2
- package/dist/mfu-reassembler.js.map +3 -3
- package/dist/mmtp-container-parser.js +6 -2
- package/dist/mmtp-container-parser.js.map +3 -3
- package/dist/mmtp-container-parser.no-modules.js +551 -452
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +6 -2
- package/dist/mmtp-decode-pipeline.js.map +3 -3
- package/dist/mmtp-fec-session.d.ts +7 -6
- package/dist/mmtp-fec-session.d.ts.map +1 -1
- package/dist/mmtp-fec-session.js +13 -9
- package/dist/mmtp-fec-session.js.map +3 -3
- package/dist/mmtp-router.d.ts +7 -16
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +19 -29
- package/dist/mmtp-router.js.map +3 -3
- package/dist/multicast-auth-catalog.js +7 -3
- package/dist/multicast-auth-catalog.js.map +3 -3
- package/dist/multicast-input.js +7 -3
- package/dist/multicast-input.js.map +3 -3
- package/dist/multicast-manager.d.ts +29 -32
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +682 -253
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.d.ts +23 -2
- package/dist/multicast-transport.d.ts.map +1 -1
- package/dist/multicast-transport.js +57 -16
- package/dist/multicast-transport.js.map +4 -4
- package/dist/multicast-unwrap.js +6 -2
- package/dist/multicast-unwrap.js.map +3 -3
- package/dist/no-modules.js +551 -452
- package/dist/no-modules.js.map +4 -4
- package/dist/phase14-catalog-override.d.ts +10 -5
- package/dist/phase14-catalog-override.d.ts.map +1 -1
- package/dist/phase14-catalog-override.js +35 -11
- package/dist/phase14-catalog-override.js.map +2 -2
- package/dist/repair-fetch.d.ts +3 -1
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +16 -3
- package/dist/repair-fetch.js.map +3 -3
- package/dist/repair-layers.d.ts +0 -123
- package/dist/repair-layers.d.ts.map +1 -1
- package/dist/repair-layers.js +1 -349
- package/dist/repair-layers.js.map +3 -3
- package/dist/signaling.js +6 -2
- package/dist/signaling.js.map +3 -3
- package/dist/timestamp-codec.js +6 -2
- package/dist/timestamp-codec.js.map +3 -3
- package/dist/wasm-mfu-reassembler.js +6 -2
- package/dist/wasm-mfu-reassembler.js.map +3 -3
- package/dist/wasm-mmtp-container-parser.js +6 -2
- package/dist/wasm-mmtp-container-parser.js.map +3 -3
- package/package.json +9 -5
- package/schemas/catalog.schema.json +53 -58
- package/src/carp-catalog.ts +39 -229
- package/src/catalog-fec-params.ts +130 -493
- package/src/delta-fallback-config.ts +63 -50
- package/src/fec-state.ts +7 -62
- package/src/index.ts +10 -30
- package/src/mmtp-fec-session.ts +11 -10
- package/src/mmtp-router.ts +14 -29
- package/src/multicast-manager.ts +89 -121
- package/src/multicast-transport.ts +65 -12
- package/src/phase14-catalog-override.ts +67 -16
- package/src/repair-fetch.ts +27 -3
- package/src/repair-layers.ts +7 -520
- package/test-vectors/catalog/README.md +39 -67
- package/test-vectors/catalog/fec-01-runtime/README.md +15 -0
- package/test-vectors/catalog/{negative/fec-block-profile-retired.json → fec-01-runtime/fec-iso-ssbg1.json} +1 -1
- package/test-vectors/catalog/fec-01-runtime/fec-layered-repair.json +106 -0
- package/test-vectors/catalog/{negative/fec-block-profile-unknown.json → fec-01-runtime/fec-multicast.json} +2 -1
- package/test-vectors/catalog/fec-01-runtime/multicast-native-ssm-no-network-source.json +44 -0
- package/test-vectors/catalog/negative/fec-block-profile-missing.json +24 -11
- package/test-vectors/catalog/negative/fec-iso-symbol-size-below-floor.json +13 -8
- package/test-vectors/catalog/negative/fec-reed-solomon-iso-symbol-size-13.json +13 -8
- package/test-vectors/catalog/negative/fec-repair-layer-geometry.json +20 -10
- package/test-vectors/catalog/negative/fec-repair-layer-missing-symbols.json +20 -10
- package/test-vectors/catalog/negative/fec-repair-overlay-source-symbols-zero.json +25 -17
- package/test-vectors/catalog/negative/fec-repair-symbols-zero.json +13 -8
- package/test-vectors/catalog/negative/fec-source-symbols-zero.json +13 -8
- package/test-vectors/catalog/negative/fec-symbol-size-zero.json +13 -8
- package/test-vectors/catalog/negative/raptorq-source-symbols-over-max.json +18 -9
- package/test-vectors/catalog/negative/raptorq-unaligned-symbol.json +13 -8
- package/test-vectors/catalog/positive/fec-algorithm-unimplemented.json +14 -9
- package/test-vectors/catalog/positive/fec-iso-ssbg1.json +25 -12
- package/test-vectors/catalog/positive/fec-layered-repair.json +79 -35
- package/test-vectors/catalog/positive/fec-multicast.json +26 -13
- package/test-vectors/catalog/positive/fec-reed-solomon-layered.json +29 -18
- package/test-vectors/catalog/positive/multicast-draft01-4-1-example.json +28 -20
- package/test-vectors/catalog/positive/multicast-draft01-7-2-6-example.json +14 -10
- package/test-vectors/catalog/positive/multicast-native-ssm-no-network-source.json +22 -12
- package/test-vectors/catalog/section-codes.json +13 -22
- package/test-vectors/catalog-timing.json +2 -2
- package/test-vectors/catalog-validation.json +30 -243
- package/test-vectors/catalog/negative/fec-enhancement-repair-removed.json +0 -28
- package/test-vectors/catalog/negative/fec-reed-solomon-k-plus-p-over-255.json +0 -39
- package/test-vectors/catalog/negative/fec-reed-solomon-overlay-over-255.json +0 -40
- package/test-vectors/catalog/negative/fec-repair-multiple-depends.json +0 -32
- package/test-vectors/catalog/negative/fec-repair-overlay-with-layer.json +0 -34
- package/test-vectors/catalog/negative/fec-repair-priority-out-of-band.json +0 -24
- package/test-vectors/catalog/negative/fec-repair-source-symbols-without-scope.json +0 -33
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FEC_BLOCK_PROFILES, isFecBlockProfile, parseFecBlockProfile, type FecBindingUnavailable, type FecBlockProfile } from "@blockcast/mmt-base";
|
|
2
2
|
import { catalogFecInterleaveMs, type FecInterleaveCatalog } from "@blockcast/mmt-fec";
|
|
3
|
-
import {
|
|
3
|
+
import type { RepairLayerParams, RepairLayersResolution, RepairOverlayParams } from "./repair-layers.js";
|
|
4
4
|
import type { RepairTarget } from "./repair-fetch.js";
|
|
5
5
|
export { catalogFecInterleaveMs, type FecInterleaveCatalog };
|
|
6
6
|
export { FEC_BLOCK_PROFILES, isFecBlockProfile, parseFecBlockProfile, type FecBlockProfile };
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
7
|
+
export { validateFecCatalog, type FecCatalogCode, type FecCatalogInstance, type FecCatalogIssue, type FecCatalogOutcome, type FecCatalogReceiver, type FecCatalogReport, } from "@blockcast/mmt-base";
|
|
8
|
+
export { DEFAULT_REPAIR_PRIORITY, MAX_ENCODING_SYMBOL_ID, MAX_RAPTORQ_SOURCE_SYMBOLS, MAX_REPAIR_SYMBOLS, REPAIR_PRIORITY_MAX, REPAIR_PRIORITY_MIN, type RepairLayerParams, type RepairLayersResolution, type RepairOverlayParams, } from "./repair-layers.js";
|
|
9
9
|
/**
|
|
10
10
|
* Minimal structural shape of a resolved endpoint track. Callers may carry
|
|
11
11
|
* extra fields (e.g. hang's ResolvedEndpointTrack adds `pid`) — the resolver
|
|
@@ -15,40 +15,14 @@ export type CatalogTrackRef = {
|
|
|
15
15
|
name: string;
|
|
16
16
|
type: "video" | "audio" | (string & {});
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
algorithm?: unknown;
|
|
20
|
-
/** FEC block profile token (BLO-35597): required on a declared FEC
|
|
21
|
-
* instance, read through `readFecBlockProfile`. */
|
|
22
|
-
blockProfile?: unknown;
|
|
23
|
-
sourceSymbols?: number;
|
|
24
|
-
repairSymbols?: number;
|
|
25
|
-
symbolSize?: number;
|
|
26
|
-
/** Signaled jitter/reorder allowance in ms (added to the block span). */
|
|
27
|
-
reorderToleranceMs?: number;
|
|
28
|
-
/** Layer 0 repair track. Further layers and overlays describe themselves
|
|
29
|
-
* (draft-ramadan-moq-fec §6.3): MSF `tracks[]` entries with
|
|
30
|
-
* `packaging: "fec-repair"`, or hang `repair.renditions` entries, that
|
|
31
|
-
* `depend` on this rendition. */
|
|
32
|
-
repairTrack?: string;
|
|
33
|
-
};
|
|
34
|
-
/** One self-describing repair rendition of the hang catalog's `repair` block
|
|
35
|
-
* (draft-ramadan-moq-fec §6.3). Mirrors the MSF fec-repair track fields. */
|
|
36
|
-
export type RepairRenditionCatalog = {
|
|
37
|
-
depends?: unknown;
|
|
38
|
-
repairLayer?: unknown;
|
|
39
|
-
repairSymbols?: unknown;
|
|
40
|
-
priority?: unknown;
|
|
41
|
-
scope?: unknown;
|
|
42
|
-
sourceSymbols?: unknown;
|
|
43
|
-
};
|
|
44
|
-
/** The container fields the FEC and group-duration readers consult. */
|
|
18
|
+
/** The container fields the group-duration reader consults. */
|
|
45
19
|
type ContainerCatalog = {
|
|
46
20
|
kind?: unknown;
|
|
47
21
|
timescale?: unknown;
|
|
48
22
|
};
|
|
49
23
|
type RenditionCatalog = KeyframeCadenceCatalog & {
|
|
50
24
|
container?: ContainerCatalog;
|
|
51
|
-
fec?:
|
|
25
|
+
fec?: unknown;
|
|
52
26
|
framerate?: unknown;
|
|
53
27
|
sampleRate?: unknown;
|
|
54
28
|
samplerate?: unknown;
|
|
@@ -60,9 +34,9 @@ type CatalogWithRenditions = {
|
|
|
60
34
|
audio?: {
|
|
61
35
|
renditions?: Record<string, RenditionCatalog>;
|
|
62
36
|
};
|
|
63
|
-
/** hang-native repair renditions
|
|
37
|
+
/** hang-native repair renditions, bound by `source` + `instanceId`. */
|
|
64
38
|
repair?: {
|
|
65
|
-
renditions?: Record<string,
|
|
39
|
+
renditions?: Record<string, unknown>;
|
|
66
40
|
};
|
|
67
41
|
};
|
|
68
42
|
/** An MSF/CMSF catalog: `tracks[]` entries, each self-describing. */
|
|
@@ -140,58 +114,30 @@ export declare function catalogFecMediaUnitsPerSecond(type: "video" | "audio", r
|
|
|
140
114
|
timescale?: number;
|
|
141
115
|
} | undefined, endpointSampleRate?: number): number | undefined;
|
|
142
116
|
/**
|
|
143
|
-
* Why a track
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* -
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* -
|
|
150
|
-
*
|
|
151
|
-
* - `track_fec_block_span`: retained for compatibility with older consumers;
|
|
152
|
-
* absence no longer disables in-band FEC.
|
|
153
|
-
* - `track_fec` (on `interleaveDepthMs`): it names `iso-ssbg1-v1` with a
|
|
154
|
-
* declared span that is not a non-negative safe integer in milliseconds.
|
|
155
|
-
*
|
|
156
|
-
* The profile selects the block math and is never defaulted or inferred, and
|
|
157
|
-
* the span is never borrowed from another track. Per §5.1 a receiver consumes
|
|
158
|
-
* such a track's source without FEC and does not join its repair tracks, so it
|
|
159
|
-
* carries no FEC geometry and no repair track; it is the only track affected,
|
|
160
|
-
* and neither the session nor any other track's FEC fails on its account.
|
|
117
|
+
* Why a track that declares FEC resolved to no FEC: its base instance is not
|
|
118
|
+
* `ok` for this receiver (`resolveFecBindings`). `code` and `path` are the
|
|
119
|
+
* validator's (`validateFecCatalog`, draft-ramadan-moq-fec-catalog-00 5,
|
|
120
|
+
* fec-core-00 10.3); `outcome` tells an instance this receiver forgoes
|
|
121
|
+
* (`unavailable`, e.g. a block profile it does not decode) from an invalid
|
|
122
|
+
* one (`violation`). A draft-01 object `fec` is `fec_member` at that `fec`.
|
|
123
|
+
* Per fec-core-00 10.3 the track's source is consumed without FEC and none of
|
|
124
|
+
* its repair tracks is joined; it is the only track affected.
|
|
161
125
|
*/
|
|
162
|
-
export type TrackFecUnavailable =
|
|
163
|
-
/** The repair-contract code a catalog validator reports for the same field
|
|
164
|
-
* (`track_fec_block_span` excepted: an omitted span is valid shape). */
|
|
165
|
-
readonly code: "track_fec_block_profile" | "track_fec_block_profile_unimplemented" | "track_fec_block_span" | "track_fec"
|
|
166
|
-
/** draft-ramadan-moq-fec-01 4: an `algorithm` this receiver does not
|
|
167
|
-
* implement. No validator reports it: such a catalog is valid. */
|
|
168
|
-
| "track_fec_algorithm_unimplemented";
|
|
169
|
-
/** JSON path of the offending field: `blockProfile`, or `interleaveDepthMs`. */
|
|
170
|
-
readonly path: string;
|
|
171
|
-
/** What is wrong, worded as the `RepairContractError` a validator throws. */
|
|
172
|
-
readonly message: string;
|
|
173
|
-
};
|
|
126
|
+
export type TrackFecUnavailable = FecBindingUnavailable;
|
|
174
127
|
export type TrackFecParams = {
|
|
175
128
|
fecK: number;
|
|
176
|
-
/** The
|
|
177
|
-
* present exactly when the track has FEC. An absent catalog `algorithm`
|
|
178
|
-
* (the hang dialect) is RaptorQ; a token this receiver does not implement
|
|
179
|
-
* leaves the track without FEC (`track_fec_algorithm_unimplemented`). */
|
|
129
|
+
/** The base instance's `scheme`: present exactly when the track has FEC. */
|
|
180
130
|
fecAlgorithm?: "raptorq" | "reed-solomon";
|
|
181
|
-
/** The
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
* consecutive SS_IDs); it is never defaulted. A declared instance that
|
|
185
|
-
* names no implemented profile has no FEC; `fecUnavailable` says why. */
|
|
131
|
+
/** The base instance's `blockProfile`, present exactly when the track has
|
|
132
|
+
* FEC. This runtime decodes `iso-ssbg1-v1` only (ssbg_mode1, K' =
|
|
133
|
+
* SSB_length, consecutive SS_IDs); it is never defaulted. */
|
|
186
134
|
fecBlockProfile?: FecBlockProfile;
|
|
187
|
-
/** Present exactly when the track
|
|
188
|
-
* `
|
|
189
|
-
* (
|
|
190
|
-
*
|
|
191
|
-
* the reason a caller surfaces. Absent on every other track, with FEC or
|
|
192
|
-
* without. */
|
|
135
|
+
/** Present exactly when the track declares FEC and its base instance is
|
|
136
|
+
* not `ok` (see `TrackFecUnavailable`). The track then resolves to no FEC
|
|
137
|
+
* (`fecK` 0, no `fecBlockProfile`, no repair track) and this is the
|
|
138
|
+
* reason a caller surfaces. */
|
|
193
139
|
fecUnavailable?: TrackFecUnavailable;
|
|
194
|
-
/** P_0:
|
|
140
|
+
/** P_0: the base instance's `repairSymbols` (layer 0). */
|
|
195
141
|
fecRepairCount: number;
|
|
196
142
|
/** Total repair symbols per block across the BASE layers: the wire
|
|
197
143
|
* RSB_length on every base layer packet. Equals fecRepairCount on a
|
|
@@ -233,72 +179,32 @@ export type TrackFecParams = {
|
|
|
233
179
|
*/
|
|
234
180
|
export declare function joinedRepairSymbolCount(params: Pick<TrackFecParams, "fecRepairCount" | "repairLayers">, joinedRepairTrackNames: Iterable<string>): number;
|
|
235
181
|
/**
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
* catalog dialect.
|
|
239
|
-
*
|
|
240
|
-
* - MSF `tracks[]`: the source is the entry named `source`; repair tracks are
|
|
241
|
-
* `packaging: "fec-repair"` entries. Layer 0 is the source's
|
|
242
|
-
* `fec.repairTrack`; layers 1..n and overlays `depend` on the source.
|
|
243
|
-
* - hang: the source is a `video`/`audio` rendition; repair tracks beyond
|
|
244
|
-
* layer 0 are `repair.renditions` entries that `depend` on it.
|
|
245
|
-
*
|
|
246
|
-
* Returns undefined when the source carries no FEC repair track and nothing
|
|
247
|
-
* depends on it, and when the source's FEC is unavailable
|
|
248
|
-
* (`catalogFecUnavailable`: no implemented `blockProfile`, the retired
|
|
249
|
-
* `k-padded-v1` included, or an `iso-ssbg1-v1` span it cannot use). Per
|
|
250
|
-
* draft-ramadan-moq-fec §5.1 a receiver joins none of that source's repair
|
|
251
|
-
* tracks, so it gets no layers; the catalog's repair contract is still
|
|
252
|
-
* enforced for it as for every source. Throws `RepairContractError` (code +
|
|
253
|
-
* JSON path) on any violation, including a repair rendition whose `depends`
|
|
254
|
-
* names a rendition without FEC, so a player fails closed before joining any
|
|
255
|
-
* repair track.
|
|
182
|
+
* Why `source` has no FEC although it declares some, or undefined (it has FEC,
|
|
183
|
+
* or declares none).
|
|
256
184
|
*/
|
|
257
|
-
export declare function
|
|
185
|
+
export declare function catalogTrackFecUnavailable(catalog: RepairLayerCatalog | undefined, source: string | CatalogTrackRef): TrackFecUnavailable | undefined;
|
|
258
186
|
/**
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
* - `repairPriority`: layer 0's catalog `priority`, or 240 when it declares
|
|
266
|
-
* none; that value is defined by draft-ramadan-moq-fec §10, not chosen
|
|
267
|
-
* here (`resolveRepairLayers` applies it).
|
|
268
|
-
* - `sourcePriority`: the source track's MSF `tracks[]` entry `priority`
|
|
269
|
-
* (MoQ Transport scale). A catalog with no MSF entry for the track (a hang-only catalog,
|
|
270
|
-
* whose renditions carry no MoQ Transport priority) yields null, and the
|
|
271
|
-
* keyframe repair FETCH is then sent without the parameter.
|
|
272
|
-
*
|
|
273
|
-
* Returns null without a positive elapsed span, or when the track has no repair track, including when its FEC is
|
|
274
|
-
* unavailable (`catalogFecUnavailable`): draft-ramadan-moq-fec §5.1 forbids
|
|
275
|
-
* joining that track's repair tracks, so there is nothing to FETCH.
|
|
276
|
-
*
|
|
277
|
-
* @throws RepairContractError exactly as `resolveRepairLayers` does.
|
|
187
|
+
* Every repair track of one source track: base layers with derived RS_ID
|
|
188
|
+
* offsets and its keyframe overlay, from either catalog dialect, as
|
|
189
|
+
* `resolveFecBindings` binds them. Undefined when the source declares no FEC
|
|
190
|
+
* or its base instance is not `ok` (`catalogTrackFecUnavailable` says why): a
|
|
191
|
+
* receiver then joins none of its repair tracks. Never throws.
|
|
278
192
|
*/
|
|
279
|
-
export declare function
|
|
193
|
+
export declare function resolveRepairLayers(catalog: RepairLayerCatalog | undefined, source: string | CatalogTrackRef): RepairLayersResolution | undefined;
|
|
280
194
|
/**
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
* resolver (`resolveCatalogTrackFec`, `resolveRepairLayers`) and the MSF
|
|
285
|
-
* `tracks[]` ingest (`MulticastManager.configureMultiTrack`) read it, so they
|
|
286
|
-
* cannot disagree about which tracks keep FEC.
|
|
195
|
+
* The on-demand repair target of one source track: its base layer 0 repair
|
|
196
|
+
* track and the two catalog priorities draft-ramadan-moq-fec §11.4.5 derives
|
|
197
|
+
* the FETCH's SUBSCRIBER_PRIORITY from (see `repairFetchSubscriberPriority`).
|
|
287
198
|
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
* `iso-ssbg1-v1` instance, carries no usable block span. Returns undefined for
|
|
292
|
-
* a non-object and for every block whose FEC is available. It reads only the
|
|
293
|
-
* profile and the span: malformed geometry (`sourceSymbols`, `symbolSize`, ...)
|
|
294
|
-
* is the caller's to reject, and takes precedence. Never throws on catalog
|
|
295
|
-
* input: whether FEC is available is `catalogFecAvailable` (mmt-base), and a
|
|
296
|
-
* test pins that every unavailable block gets a reason here.
|
|
199
|
+
* - `repairPriority`: layer 0's catalog `priority`, or 240 when it declares none.
|
|
200
|
+
* - `sourcePriority`: the source's MSF `tracks[]` entry `priority` (MoQ
|
|
201
|
+
* Transport scale), or null for a hang rendition, which carries none.
|
|
297
202
|
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
203
|
+
* Null when the source has no `ok` base instance, or no positive
|
|
204
|
+
* `interleaveDepthMs`: unicast repair requires a known elapsed FEC deadline
|
|
205
|
+
* (§11.4).
|
|
300
206
|
*/
|
|
301
|
-
export declare function
|
|
207
|
+
export declare function catalogRepairTarget(catalog: RepairLayerCatalog | undefined, source: string | CatalogTrackRef): RepairTarget | null;
|
|
302
208
|
/**
|
|
303
209
|
* Resolves per-track FEC geometry from the catalog for the active endpoint tracks.
|
|
304
210
|
*
|
|
@@ -309,28 +215,9 @@ export declare function catalogFecUnavailable(fec: unknown, fecPath: string): Tr
|
|
|
309
215
|
* interleave and repair layers, never the first rendition's. A track with no
|
|
310
216
|
* rendition of its type resolves to no FEC (`fecK` 0) and no media rate.
|
|
311
217
|
*
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
* (`track_fec_block_profile`), or whose `fec` (a `none` block included) names
|
|
316
|
-
* any other token (`track_fec_block_profile_unimplemented`; the retired
|
|
317
|
-
* `k-padded-v1` is one), resolves to no FEC: `fecK` 0, no `fecBlockProfile`,
|
|
318
|
-
* no repair track, layers or overlays, and `fecUnavailable` carrying the
|
|
319
|
-
* reason at the field's JSON path for the caller to surface. Every other track
|
|
320
|
-
* resolves as usual. The profile is never defaulted or inferred;
|
|
321
|
-
* `algorithm: "none"` may omit it.
|
|
322
|
-
*
|
|
323
|
-
* @throws RepairContractError `track_fec` when a rendition's `fec` declares an
|
|
324
|
-
* FEC instance (any `algorithm` but `none`) whose `sourceSymbols` or
|
|
325
|
-
* `symbolSize` is not a positive integer, and when a rendition that declares a
|
|
326
|
-
* `fec` block (any algorithm, `none` included) carries a repair contract that
|
|
327
|
-
* violates draft-ramadan-moq-fec 6.3 (a gap or
|
|
328
|
-
* duplicate in the layer chain, a bad `depends` target, an unreachable repair
|
|
329
|
-
* track, a bound violation). Because the hang dialect validates every `repair.renditions`
|
|
330
|
-
* entry of the catalog, resolving the video track fails on a malformed audio
|
|
331
|
-
* repair rendition too. This is deliberate: a player must fail closed before it
|
|
332
|
-
* joins any repair track. Callers that used to treat this function as total
|
|
333
|
-
* must catch it and surface the catalog error.
|
|
218
|
+
* FEC is per track and per instance (fec-core-00 10.3): a track whose base
|
|
219
|
+
* instance is not `ok` resolves to no FEC with `fecUnavailable` saying why,
|
|
220
|
+
* and every other track resolves as usual. Never throws on catalog input.
|
|
334
221
|
*/
|
|
335
222
|
export declare function resolveCatalogTrackFec(catalog: CatalogWithRenditions | undefined, tracks: readonly CatalogTrackRef[]): {
|
|
336
223
|
videoTrackName?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-fec-params.d.ts","sourceRoot":"","sources":["../src/catalog-fec-params.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"catalog-fec-params.d.ts","sourceRoot":"","sources":["../src/catalog-fec-params.ts"],"names":[],"mappings":"AAeA,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EAEpB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EAEpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAEvF,OAAO,KAAK,EACX,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAA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