@blockcast/mmt-container 2.2.0-main.a88c3a0aa4f3 → 2.2.0-main.aee8d33d2cc8
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 +34 -19
- package/dist/block-policy.d.ts +55 -13
- package/dist/block-policy.d.ts.map +1 -1
- package/dist/block-policy.js +104 -32
- package/dist/block-policy.js.map +2 -2
- package/dist/browser-runtime.js +2094 -385
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.js.map +2 -2
- package/dist/catalog-fec-params.d.ts +18 -2
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +29 -1
- package/dist/catalog-fec-params.js.map +2 -2
- package/dist/catalog-network-source.js.map +2 -2
- package/dist/cmaf-block-assembler.js +92 -1
- package/dist/cmaf-block-assembler.js.map +2 -2
- package/dist/cmcd-producer.d.ts +60 -47
- package/dist/cmcd-producer.d.ts.map +1 -1
- package/dist/cmcd-producer.js +138 -109
- package/dist/cmcd-producer.js.map +2 -2
- package/dist/codec-utils.d.ts.map +1 -1
- package/dist/codec-utils.js +92 -1
- package/dist/codec-utils.js.map +2 -2
- package/dist/delivery-catalog.js +26 -16
- package/dist/delivery-catalog.js.map +2 -2
- package/dist/delta-fallback-config.js +5 -1
- package/dist/delta-fallback-config.js.map +3 -3
- package/dist/fec-manager.d.ts +114 -15
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +639 -95
- package/dist/fec-manager.js.map +2 -2
- package/dist/fec-state.js +5 -1
- package/dist/fec-state.js.map +2 -2
- package/dist/fec-worker-setup.d.ts +1 -1
- package/dist/fec-worker-setup.js +1 -1
- package/dist/fec-worker-setup.js.map +2 -2
- package/dist/held-layer-admission.js.map +2 -2
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.d.ts +48 -13
- package/dist/iso-block-locator.d.ts.map +1 -1
- package/dist/iso-block-locator.js +97 -25
- package/dist/iso-block-locator.js.map +2 -2
- package/dist/iso-bmff-timing.d.ts +10 -1
- package/dist/iso-bmff-timing.d.ts.map +1 -1
- package/dist/iso-bmff-timing.js +36 -2
- package/dist/iso-bmff-timing.js.map +2 -2
- package/dist/media-router.js.map +1 -1
- package/dist/mfu-reassembler.js +12 -19
- package/dist/mfu-reassembler.js.map +2 -2
- package/dist/mmtp-container-parser.d.ts +106 -12
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +324 -46
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +466 -66
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +323 -46
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-fec-session.d.ts +41 -3
- package/dist/mmtp-fec-session.d.ts.map +1 -1
- package/dist/mmtp-fec-session.js +118 -13
- package/dist/mmtp-fec-session.js.map +3 -3
- package/dist/mmtp-router.d.ts +36 -8
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +716 -100
- package/dist/mmtp-router.js.map +3 -3
- package/dist/multicast-auth-catalog.js.map +2 -2
- package/dist/multicast-input.js.map +2 -2
- package/dist/multicast-manager.d.ts +28 -3
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +1451 -215
- package/dist/multicast-manager.js.map +3 -3
- package/dist/multicast-transport.js +28 -18
- package/dist/multicast-transport.js.map +2 -2
- package/dist/multicast-unwrap.js +12 -19
- package/dist/multicast-unwrap.js.map +2 -2
- package/dist/no-modules.d.ts +1 -0
- package/dist/no-modules.d.ts.map +1 -1
- package/dist/no-modules.js +463 -64
- package/dist/no-modules.js.map +4 -4
- package/dist/repair-fetch.d.ts +38 -8
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +286 -27
- package/dist/repair-fetch.js.map +3 -3
- package/dist/repair-layer-subscriptions.d.ts +82 -0
- package/dist/repair-layer-subscriptions.d.ts.map +1 -0
- package/dist/repair-layer-subscriptions.js +192 -0
- package/dist/repair-layer-subscriptions.js.map +7 -0
- package/dist/signaling.js.map +2 -2
- package/dist/timestamp-codec.js +12 -19
- package/dist/timestamp-codec.js.map +2 -2
- package/dist/track-session.d.ts +1 -1
- package/dist/track-session.d.ts.map +1 -1
- package/dist/track-session.js +1 -0
- package/dist/track-session.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js.map +2 -2
- package/dist/wasm-mmtp-container-parser.js +323 -46
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/package.json +8 -5
- package/schemas/catalog.schema.json +4 -0
- package/src/block-policy.ts +216 -52
- package/src/catalog-fec-params.ts +37 -1
- package/src/cmcd-producer.ts +189 -179
- package/src/codec-utils.ts +121 -1
- package/src/fec-manager.ts +619 -37
- package/src/fec-worker-setup.ts +2 -2
- package/src/index.ts +22 -2
- package/src/iso-block-locator.ts +133 -31
- package/src/iso-bmff-timing.ts +40 -1
- package/src/mmtp-container-parser.ts +353 -32
- package/src/mmtp-fec-session.ts +115 -15
- package/src/mmtp-router.ts +618 -44
- package/src/multicast-manager.ts +139 -16
- package/src/no-modules.ts +3 -0
- package/src/repair-fetch.ts +366 -50
- package/src/repair-layer-subscriptions.ts +261 -0
- package/src/track-session.ts +4 -1
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ The package exposes a wide subpath surface so consumers can tree-shake aggressiv
|
|
|
74
74
|
| `./multicast-unwrap` | Container-aware MMTP dispatch (LOC vs raw MMTP) |
|
|
75
75
|
| `./signaling` | Packet-type classifier (`isSignalingPacket`, `isSourcePacket`, `classifyPacket`) |
|
|
76
76
|
| `./mmtp-container-parser` | `MmtpContainerParser` (the unified, transport-agnostic parser) |
|
|
77
|
-
| `./cmcd-producer` | `CmcdProducer` —
|
|
77
|
+
| `./cmcd-producer` | `CmcdProducer` — CMCD v2 Event-mode reports (CTA-5004-B) with `com.blockcast-*` custom keys |
|
|
78
78
|
| `./cmaf-block-assembler` | `CmafBlockAssembler` — assembles one CMAF segment per FEC source block |
|
|
79
79
|
| `./cmaf-group-batcher` | `CmafGroupBatcher` — MoQ group → CMAF segment batcher |
|
|
80
80
|
| `./carp-catalog` | CARP / CMSF catalog types, track-role parser, switching-set validator, track-timing |
|
|
@@ -350,8 +350,11 @@ FEC blocks follow one block profile, `iso-ssbg1-v1` (ISO/IEC 23008-1 Annex C ssb
|
|
|
350
350
|
Every FEC block still gets in-band FEC decode. On top of that:
|
|
351
351
|
|
|
352
352
|
- **Classification.** Each block is `keyframe | delta | unknown | audio`, from
|
|
353
|
-
first-arrival network source evidence only (MMTP R bit, MPU number,
|
|
354
|
-
DU
|
|
353
|
+
first-arrival network source evidence only (MMTP R bit, MPU number, and
|
|
354
|
+
the MFU DU header's MPU position: `sample_number − 1` in a one-fragment
|
|
355
|
+
MPU, or, when each frame is its own movie fragment, the fragment's distance
|
|
356
|
+
from the MPU's RAP fragment once two RAPs proved G fragments per MPU, every
|
|
357
|
+
later RAP fragment held to that spacing) against catalog geometry (framerate,
|
|
355
358
|
`interleaveDepthMs`, keyframe interval). Geometry that cannot be derived
|
|
356
359
|
exactly, or any violated invariant, runs the track `all-protected` (every
|
|
357
360
|
video block `unknown`). A block every symbol of which vanished is
|
|
@@ -425,36 +428,47 @@ Per-track timestamp rebase (`#videoBaseTs` / `#audioBaseTs` at `mmtp-to-cmaf.ts:
|
|
|
425
428
|
|
|
426
429
|
### CMCD producer (`./cmcd-producer`)
|
|
427
430
|
|
|
428
|
-
|
|
431
|
+
CMCD v2 Event-mode reports (**CTA-5004-B** §2.2) for a player. Maps `FecTrackStats` snapshots, repair lifecycle events and `TransportSnapshot` state to newline-separated `application/cmcd` records (§3.3). Each record is an RFC 8941 dictionary with keys in alphabetical order and carries `v=2`, `ts`, `e`, `sn` and `sid`. Does NOT call `fetch()`: the player POSTs the body handed to `onCmcdPost` with `Content-Type: application/cmcd`.
|
|
429
432
|
|
|
430
433
|
```ts
|
|
431
434
|
class CmcdProducer {
|
|
432
|
-
constructor(opts:
|
|
435
|
+
constructor(opts: { onCmcdPost?: (body: string) => void; intervalMs?: number; sessionId?: string; now?: () => number })
|
|
433
436
|
updateTransport(snapshot: TransportSnapshot): void
|
|
434
437
|
updatePlayMode(mode: "full" | "base-only" | "single-track"): void
|
|
435
438
|
updateDeltaFailRate(rate: number): void
|
|
439
|
+
updateFecFailClosed(reason: FecFailClosedReason): void
|
|
440
|
+
updateManifestVerification(stats: ManifestVerificationStats): void
|
|
436
441
|
incrementSwitchMiscount(): void
|
|
442
|
+
onRepairLifecycle(event: RepairLifecycleEvent): void
|
|
437
443
|
emitSwitchDrift(driftUs: number): void
|
|
438
444
|
onSnapshot(data: SnapshotData): void
|
|
445
|
+
onTransportSnapshot(data: TransportOnlySnapshotData): void
|
|
439
446
|
onTransition(event: TransportTransitionEvent): void
|
|
440
447
|
}
|
|
441
448
|
```
|
|
442
449
|
|
|
443
|
-
|
|
450
|
+
Reports:
|
|
444
451
|
|
|
445
|
-
|
|
|
452
|
+
| `e` | When | Carries |
|
|
453
|
+
|-----|------|---------|
|
|
454
|
+
| `t` | heartbeat, every `intervalMs` (default 30 s), driven by snapshots | Table 1 keys only |
|
|
455
|
+
| `ce`, `cen="com.blockcast-fec"` | with each `t` | the `com.blockcast-*` counters below |
|
|
456
|
+
| `e` | FEC fails closed (fec-01 6.3.9), once per reason | `ec` = reason code |
|
|
457
|
+
| `ce`, `cen="com.blockcast-ct"` | transport transition | `-ct` (`mc-start` / `mc-to-uc` / `amt-start`), transport keys |
|
|
458
|
+
| `ce`, `cen="com.blockcast-switch-drift"` | `emitSwitchDrift()` | `-sdu` |
|
|
459
|
+
|
|
460
|
+
Custom keys ride only `e=ce` (§2.2 admits only Table 1 keys on Event reports; the Table 1 `cen` row admits a custom key-value pair). Values are STRING or TOKEN of at most 64 characters (§4.1); numbers go out as strings, and a longer value is omitted. A value that is unknown is omitted, never sent as zero (§3). Counters are absolute since session start.
|
|
461
|
+
|
|
462
|
+
| Key (`com.blockcast-`) | Source | Value |
|
|
446
463
|
|-----|--------|-------|
|
|
447
|
-
| `
|
|
448
|
-
| `
|
|
449
|
-
| `
|
|
450
|
-
| `
|
|
451
|
-
| `
|
|
452
|
-
| `
|
|
453
|
-
| `
|
|
454
|
-
| `
|
|
455
|
-
| `x-bc-ct` | transport transition | `mc-start` / `mc-to-uc` / `amt-start` |
|
|
456
|
-
|
|
457
|
-
All string values pass through `sanitize()` (T-06-01) — commas, `\r`, `\n` are stripped to prevent header injection.
|
|
464
|
+
| `fa`, `fk`, `fp` | FEC config | algorithm; K; P as joined |
|
|
465
|
+
| `pr`, `pl`, `pu` | `FecTrackStats` | source packets received; missing before FEC; still missing after FEC |
|
|
466
|
+
| `fbf` | `FecTrackStats.blocksFailed` | failed blocks |
|
|
467
|
+
| `fbr`, `fbq`, `fbfk` | repair lifecycle (video blocks) | recovered in band; recovered by repair FETCH; failed keyframe-class. Absent until `onRepairLifecycle` is fed |
|
|
468
|
+
| `tr`, `sg`, `ar` | `TransportSnapshot` | `ssm` / `amt` / `moq`; `"<group>@<source>"`; AMT relay |
|
|
469
|
+
| `pm`, `dfr` | play mode | `full` / `base-only` / `single-track`; delta fail rate, 3 decimals |
|
|
470
|
+
| `ffc`, `ffl` | FEC fail-closed | reason code; held layer |
|
|
471
|
+
| `sm`, `mv`, `mf` | switching set, source auth | miscount; manifests verified; verification failures |
|
|
458
472
|
|
|
459
473
|
### Multicast transport (`./multicast-transport`)
|
|
460
474
|
|
|
@@ -527,7 +541,8 @@ Roles are required by:
|
|
|
527
541
|
- **draft-ramadan-moq-mmt-01** — MMT-over-MoQ wire format (§4.4.2 group-duration signaling, §4 MoQ object mapping, §5 MFU mode)
|
|
528
542
|
- **draft-ramadan-moq-fec** — AL-FEC over MoQ (§5.3 FEC Source Info object extension 0x11: SS_ID(32), fixed 4 bytes)
|
|
529
543
|
- **RFC 6330** — RaptorQ Forward Error Correction (strict OTI codec in `@blockcast/mmt-fec`)
|
|
530
|
-
- **
|
|
544
|
+
- **CTA-5004-B** — CMCD v2 (used by `CmcdProducer`, Event mode)
|
|
545
|
+
- **RFC 8941** — Structured Field Values (CMCD record encoding)
|
|
531
546
|
- **ATSC A/331:2026-02 (informative for draft-fec-01 / draft-mmt-01; 7.2 SLS/MP table, 8.1.2.1 MMTP session, 8.1.2.5 AL-FEC) and A/331:2026-04 (normative for draft-multicast-01)** — Signaling, Delivery, Synchronization, Error Protection
|
|
532
547
|
|
|
533
548
|
## Related packages
|
package/dist/block-policy.d.ts
CHANGED
|
@@ -49,7 +49,19 @@ export type ClassifierReason = 'framerate-absent' | 'keyframe-cadence-absent' |
|
|
|
49
49
|
* and this one was not, so no geometry provably belongs to it (ABR rungs
|
|
50
50
|
* sharing a packetId).
|
|
51
51
|
*/
|
|
52
|
-
| 'stream-geometry-absent' | 'rap-not-mpu-start' | 'mpu-longer-than-gop' | 'block-not-contiguous'
|
|
52
|
+
| 'stream-geometry-absent' | 'rap-not-mpu-start' | 'mpu-longer-than-gop' | 'block-not-contiguous'
|
|
53
|
+
/**
|
|
54
|
+
* MPU-start RAPs are not exactly one keyframe interval apart per MPU:
|
|
55
|
+
* released RAPs in the media timescale, or, once each frame is its own
|
|
56
|
+
* movie fragment, RAP fragments G fragments apart per MPU (P3).
|
|
57
|
+
*/
|
|
58
|
+
| 'rap-spacing-mismatch'
|
|
59
|
+
/**
|
|
60
|
+
* An MPU of several movie fragments whose fragments hold several samples:
|
|
61
|
+
* neither sample_number nor the fragment number states a frame's MPU
|
|
62
|
+
* position (P3).
|
|
63
|
+
*/
|
|
64
|
+
| 'mpu-multiple-fragments' | 'block-wider-than-interleave';
|
|
53
65
|
/** Raw catalog timing for one track. Never a resolved cadence. */
|
|
54
66
|
export interface BlockClassifierGeometryInput {
|
|
55
67
|
readonly trackKind: TrackKind;
|
|
@@ -111,13 +123,18 @@ export interface SourceSymbolEvidence {
|
|
|
111
123
|
/** MPU_sequence_number, when parsed from this packet. */
|
|
112
124
|
readonly mpu?: number;
|
|
113
125
|
/**
|
|
114
|
-
* 0-based sample position within
|
|
126
|
+
* 0-based sample position within its movie fragment: the MFU DU-header
|
|
115
127
|
* `sample_number` minus one (ISO/IEC 23008-1 numbers samples from 1, and
|
|
116
128
|
* the parser rejects `sample_number` 0). Present only when this packet
|
|
117
|
-
* carried a DU header.
|
|
129
|
+
* carried a DU header. It is the MPU position only while the MPU is one
|
|
130
|
+
* movie fragment; BlockClassifier derives MPU positions (P3).
|
|
118
131
|
*/
|
|
119
132
|
readonly idx?: number;
|
|
120
|
-
/**
|
|
133
|
+
/**
|
|
134
|
+
* movie_fragment_sequence_number from the DU header, when present. When
|
|
135
|
+
* each frame is its own fragment, it positions the frame from its MPU's
|
|
136
|
+
* RAP fragment (P3).
|
|
137
|
+
*/
|
|
121
138
|
readonly movieFragment?: number;
|
|
122
139
|
/**
|
|
123
140
|
* DU-header `offset`: the data unit's authored byte position within its
|
|
@@ -167,14 +184,33 @@ export type ClassifierChange = {
|
|
|
167
184
|
* from the previous block (`block-wider-than-interleave`). The producer
|
|
168
185
|
* counts a media-unit boundary only once the open block holds a symbol.
|
|
169
186
|
* - P3: an MPU starts with its only RAP and holds at most G frames
|
|
170
|
-
* (`rap-not-mpu-start`, `mpu-longer-than-gop`, `rap-spacing-mismatch`),
|
|
171
|
-
* one
|
|
187
|
+
* (`rap-not-mpu-start`, `mpu-longer-than-gop`, `rap-spacing-mismatch`),
|
|
188
|
+
* and its DU headers state each frame's MPU position in one of two layouts
|
|
189
|
+
* (`mpu-multiple-fragments` when an MPU shows two fragments and a DU
|
|
190
|
+
* header states sample_number above 1, which is neither):
|
|
191
|
+
* - one movie fragment per MPU (ATSC 3.0): the position is
|
|
192
|
+
* sample_number − 1. This is the rule until some MPU of the sequence
|
|
193
|
+
* shows two fragments.
|
|
194
|
+
* - one fragment per frame, numbered one per frame (FFmpeg's MoQ MMT
|
|
195
|
+
* muxer, every DU header stating sample_number 1): the position is the
|
|
196
|
+
* fragment's distance from the fragment of the MPU's first RAP-flagged
|
|
197
|
+
* DU header (its anchor). The RAP's own fragment is position 0. Each
|
|
198
|
+
* anchor must lie exactly G fragments per MPU from the anchor received
|
|
199
|
+
* before it, which is kept past the horizon, and from the anchor
|
|
200
|
+
* received last (`rap-spacing-mismatch`, as after a dropped frame).
|
|
201
|
+
* Once two anchors kept that spacing, fragment numbers count frames:
|
|
202
|
+
* later fragments get positions, and an anchor arriving past the
|
|
203
|
+
* spacing is a RAP inside its MPU or follows an MPU longer than G
|
|
204
|
+
* (`rap-not-mpu-start`). An MPU whose anchor was not received has no
|
|
205
|
+
* positions; its blocks stay unknown. A second RAP-flagged fragment, or
|
|
206
|
+
* a DU header in a fragment before the anchor, refutes the MPU start
|
|
207
|
+
* (`rap-not-mpu-start`).
|
|
172
208
|
*
|
|
173
209
|
* P1 and P2 are what make a block's frames contiguous and lie within
|
|
174
|
-
* [
|
|
175
|
-
* source packets whose wire-stated authored order and SBN order
|
|
176
|
-
* a later MPU in an earlier block, a later data unit of one MPU
|
|
177
|
-
* movie_fragment_sequence_number, sample_number, then DU offset) in an
|
|
210
|
+
* [positionMax − D + 1, positionMin + D − 1] of its MPU. What refutes P1 is
|
|
211
|
+
* a pair of source packets whose wire-stated authored order and SBN order
|
|
212
|
+
* disagree: a later MPU in an earlier block, a later data unit of one MPU
|
|
213
|
+
* (by movie_fragment_sequence_number, sample_number, then DU offset) in an
|
|
178
214
|
* earlier block, or one data unit in two blocks. That is the signature of a
|
|
179
215
|
* round-robin interleave, which scatters one run over several concurrent
|
|
180
216
|
* blocks. Non-adjacency alone is not: a sample larger than K packets
|
|
@@ -203,8 +239,9 @@ export declare class BlockClassifier {
|
|
|
203
239
|
/**
|
|
204
240
|
* The stream's SBN sequence restarted (FECManager source discontinuity:
|
|
205
241
|
* a publisher restart, or the SS_ID space wrapped). Authored order and SBN
|
|
206
|
-
* order are comparable only within one continuous sequence,
|
|
207
|
-
*
|
|
242
|
+
* order are comparable only within one continuous sequence, and a
|
|
243
|
+
* restarted publisher numbers MPUs and movie fragments again, so the P1
|
|
244
|
+
* ledger and the P3 layout start again.
|
|
208
245
|
*/
|
|
209
246
|
noteSourceDiscontinuity(): void;
|
|
210
247
|
/** Register a block that exists without evidence (a vanished block). */
|
|
@@ -245,7 +282,12 @@ export interface GapFrameEvidence {
|
|
|
245
282
|
* same-MPU then no longer proves a gap lost only deltas.
|
|
246
283
|
*/
|
|
247
284
|
readonly mpu?: number;
|
|
248
|
-
/**
|
|
285
|
+
/**
|
|
286
|
+
* 0-based sample position within its movie fragment (sample_number − 1).
|
|
287
|
+
* State it on both sides only when both frames are in one movie fragment:
|
|
288
|
+
* decideGap reads `after.idx − before.idx − 1` as the samples missed
|
|
289
|
+
* between them.
|
|
290
|
+
*/
|
|
249
291
|
readonly idx?: number;
|
|
250
292
|
/** Authored presentation time in `timescale` ticks. */
|
|
251
293
|
readonly pts?: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-policy.d.ts","sourceRoot":"","sources":["../src/block-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAA;AAEnE,6CAA6C;AAC7C,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAEtC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEzC,wEAAwE;AACxE,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,cAAc,CAU7E;AAID,MAAM,MAAM,cAAc,GAAG,aAAa,GAAG,eAAe,CAAA;AAE5D,wCAAwC;AACxC,MAAM,MAAM,gBAAgB,GAExB,kBAAkB,GAClB,yBAAyB,GACzB,gCAAgC,GAChC,iBAAiB;AACnB;;;;;GAKG;GACD,sCAA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IAC7B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,uEAAuE;IACvE,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IACrC,0EAA0E;IAC1E,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;IAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,0CAA0C;IAC1C,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAA;IAChC,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAA;IAC/B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CACvB;AAaD;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,gBAAgB,CAkEjE"}
|
package/dist/block-policy.js
CHANGED
|
@@ -76,8 +76,9 @@ function keyframeIntervalMediaTicks(geometry, mediaTimescale) {
|
|
|
76
76
|
return scaled / divisor;
|
|
77
77
|
}
|
|
78
78
|
function compareDataUnitStarts(a, b) {
|
|
79
|
-
return a.movieFragment - b.movieFragment || a.idx - b.idx || a.offset - b.offset;
|
|
79
|
+
return a.movieFragment - b.movieFragment | 0 || a.idx - b.idx || a.offset - b.offset;
|
|
80
80
|
}
|
|
81
|
+
var UNPLACED = { rapNotMpuStart: false };
|
|
81
82
|
var BlockClassifier = class {
|
|
82
83
|
#geometry;
|
|
83
84
|
#mode;
|
|
@@ -100,8 +101,23 @@ var BlockClassifier = class {
|
|
|
100
101
|
#mpuSbnSpans = /* @__PURE__ */ new Map();
|
|
101
102
|
#dataUnitStarts = /* @__PURE__ */ new Map();
|
|
102
103
|
#highestMpu = null;
|
|
103
|
-
/**
|
|
104
|
-
|
|
104
|
+
/**
|
|
105
|
+
* P3 layout, kept for the MPUs within the classification horizon and valid
|
|
106
|
+
* within one continuous SBN sequence (`noteSourceDiscontinuity`).
|
|
107
|
+
*/
|
|
108
|
+
#mpus = /* @__PURE__ */ new Map();
|
|
109
|
+
/** An MPU of this sequence showed two movie fragments: each frame is one. */
|
|
110
|
+
#fragmentPerFrame = false;
|
|
111
|
+
/** A DU header of this sequence stated sample_number above 1. */
|
|
112
|
+
#multiSampleFragment = false;
|
|
113
|
+
/**
|
|
114
|
+
* The anchor received last, whether or not its MPU is still in the
|
|
115
|
+
* horizon. Each new anchor, and the anchor of every DU header's MPU, is
|
|
116
|
+
* checked against it.
|
|
117
|
+
*/
|
|
118
|
+
#lastAnchor = null;
|
|
119
|
+
/** Two anchors were exactly G fragments per MPU apart. */
|
|
120
|
+
#fragmentsProven = false;
|
|
105
121
|
#lastRap = null;
|
|
106
122
|
constructor(geometry) {
|
|
107
123
|
this.#geometry = geometry;
|
|
@@ -131,7 +147,7 @@ var BlockClassifier = class {
|
|
|
131
147
|
this.#geometry = geometry;
|
|
132
148
|
this.#blocks.clear();
|
|
133
149
|
this.#clearContiguityLedger();
|
|
134
|
-
this.#
|
|
150
|
+
this.#clearMpuLayout();
|
|
135
151
|
this.#lastRap = null;
|
|
136
152
|
this.#mpuBoundsRaps = true;
|
|
137
153
|
if (geometry.trackKind === "video" && geometry.mode === "all-protected") {
|
|
@@ -165,11 +181,13 @@ var BlockClassifier = class {
|
|
|
165
181
|
/**
|
|
166
182
|
* The stream's SBN sequence restarted (FECManager source discontinuity:
|
|
167
183
|
* a publisher restart, or the SS_ID space wrapped). Authored order and SBN
|
|
168
|
-
* order are comparable only within one continuous sequence,
|
|
169
|
-
*
|
|
184
|
+
* order are comparable only within one continuous sequence, and a
|
|
185
|
+
* restarted publisher numbers MPUs and movie fragments again, so the P1
|
|
186
|
+
* ledger and the P3 layout start again.
|
|
170
187
|
*/
|
|
171
188
|
noteSourceDiscontinuity() {
|
|
172
189
|
this.#clearContiguityLedger();
|
|
190
|
+
this.#clearMpuLayout();
|
|
173
191
|
}
|
|
174
192
|
/** Register a block that exists without evidence (a vanished block). */
|
|
175
193
|
touch(sbn) {
|
|
@@ -188,16 +206,16 @@ var BlockClassifier = class {
|
|
|
188
206
|
if (this.#geometry.trackKind === "audio") return [];
|
|
189
207
|
const changes = [];
|
|
190
208
|
const block = this.#blockFor(sbn);
|
|
209
|
+
const placement = this.#place(evidence);
|
|
191
210
|
if (evidence.rap) block.rapSeen = true;
|
|
192
211
|
if (evidence.mpu !== void 0) block.mpus.add(evidence.mpu);
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
block.
|
|
196
|
-
|
|
197
|
-
if (evidence.rap && evidence.idx !== void 0 && evidence.idx !== 0) {
|
|
198
|
-
this.#mpuBoundsRaps = false;
|
|
212
|
+
const { position } = placement;
|
|
213
|
+
if (position !== void 0) {
|
|
214
|
+
block.positionMin = block.positionMin === void 0 ? position : Math.min(block.positionMin, position);
|
|
215
|
+
block.positionMax = block.positionMax === void 0 ? position : Math.max(block.positionMax, position);
|
|
199
216
|
}
|
|
200
|
-
|
|
217
|
+
if (placement.rapNotMpuStart) this.#mpuBoundsRaps = false;
|
|
218
|
+
const violation = this.#checkInvariants(sbn, block, evidence, placement);
|
|
201
219
|
if (violation !== null) changes.push(...this.#disable(violation));
|
|
202
220
|
const next = this.#classify(block);
|
|
203
221
|
if (next !== block.cls && this.#allowed(block.cls, next)) {
|
|
@@ -250,35 +268,89 @@ var BlockClassifier = class {
|
|
|
250
268
|
}
|
|
251
269
|
return block;
|
|
252
270
|
}
|
|
253
|
-
#checkInvariants(sbn, block, evidence) {
|
|
271
|
+
#checkInvariants(sbn, block, evidence, placement) {
|
|
254
272
|
if (this.#mode === "all-protected" || this.#geometry.trackKind !== "video") return null;
|
|
255
273
|
const geometry = this.#geometry;
|
|
256
274
|
if (geometry.mode !== "classifying") return null;
|
|
257
|
-
if (
|
|
258
|
-
|
|
259
|
-
}
|
|
260
|
-
if (evidence.idx !== void 0 && evidence.idx >= geometry.gopFrames) {
|
|
275
|
+
if (placement.rapNotMpuStart) return "rap-not-mpu-start";
|
|
276
|
+
if (placement.position !== void 0 && placement.position >= geometry.gopFrames) {
|
|
261
277
|
return "mpu-longer-than-gop";
|
|
262
278
|
}
|
|
263
|
-
if (block.mpus.size === 1 && block.
|
|
279
|
+
if (block.mpus.size === 1 && block.positionMin !== void 0 && block.positionMax !== void 0 && block.positionMax - block.positionMin >= geometry.interleaveUnits) {
|
|
264
280
|
return "block-wider-than-interleave";
|
|
265
281
|
}
|
|
266
|
-
if (
|
|
267
|
-
const fragment = this.#mpuFragments.get(evidence.mpu);
|
|
268
|
-
if (fragment === void 0) {
|
|
269
|
-
this.#mpuFragments.set(evidence.mpu, evidence.movieFragment);
|
|
270
|
-
for (const mpu of this.#mpuFragments.keys()) {
|
|
271
|
-
if (mpu + 1 < evidence.mpu) this.#mpuFragments.delete(mpu);
|
|
272
|
-
}
|
|
273
|
-
} else if (fragment !== evidence.movieFragment) {
|
|
274
|
-
return "mpu-multiple-fragments";
|
|
275
|
-
}
|
|
276
|
-
}
|
|
282
|
+
if (placement.violation !== void 0) return placement.violation;
|
|
277
283
|
if (evidence.mpu !== void 0 && this.#contradictsAuthoredOrder(sbn, evidence.mpu, evidence)) {
|
|
278
284
|
return "block-not-contiguous";
|
|
279
285
|
}
|
|
280
286
|
return null;
|
|
281
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* The MPU position a source symbol's DU header proves (P3), and what it
|
|
290
|
+
* refutes. Runs in every mode: mpuBoundsRaps needs its RAP verdict.
|
|
291
|
+
*/
|
|
292
|
+
#place(evidence) {
|
|
293
|
+
const { mpu, idx, movieFragment: fragment } = evidence;
|
|
294
|
+
if (idx === void 0) return UNPLACED;
|
|
295
|
+
const bySample = { position: idx, rapNotMpuStart: evidence.rap && idx !== 0 };
|
|
296
|
+
if (mpu === void 0 || fragment === void 0) {
|
|
297
|
+
return this.#fragmentPerFrame && !this.#multiSampleFragment ? { rapNotMpuStart: bySample.rapNotMpuStart } : bySample;
|
|
298
|
+
}
|
|
299
|
+
let layout = this.#mpus.get(mpu);
|
|
300
|
+
if (layout === void 0) {
|
|
301
|
+
layout = { low: fragment };
|
|
302
|
+
this.#mpus.set(mpu, layout);
|
|
303
|
+
for (const other of this.#mpus.keys()) {
|
|
304
|
+
if (other + 1 < mpu) this.#mpus.delete(other);
|
|
305
|
+
}
|
|
306
|
+
} else if (fragment !== layout.low) {
|
|
307
|
+
this.#fragmentPerFrame = true;
|
|
308
|
+
if ((fragment - layout.low | 0) < 0) layout.low = fragment;
|
|
309
|
+
}
|
|
310
|
+
if (idx !== 0) this.#multiSampleFragment = true;
|
|
311
|
+
let arrival;
|
|
312
|
+
if (evidence.rap && layout.anchor === void 0) {
|
|
313
|
+
layout.anchor = fragment;
|
|
314
|
+
arrival = this.#anchorDrift(mpu, fragment);
|
|
315
|
+
if (arrival === 0 && this.#lastAnchor?.mpu !== mpu) this.#fragmentsProven = true;
|
|
316
|
+
this.#lastAnchor = { mpu, fragment };
|
|
317
|
+
}
|
|
318
|
+
if (!this.#fragmentPerFrame) return bySample;
|
|
319
|
+
if (this.#multiSampleFragment) return { ...bySample, violation: "mpu-multiple-fragments" };
|
|
320
|
+
const { anchor } = layout;
|
|
321
|
+
if (anchor === void 0) return UNPLACED;
|
|
322
|
+
const drift = arrival ?? this.#anchorDrift(mpu, anchor);
|
|
323
|
+
const offset = fragment - anchor | 0;
|
|
324
|
+
return {
|
|
325
|
+
...offset === 0 || offset > 0 && this.#fragmentsProven ? { position: offset } : {},
|
|
326
|
+
rapNotMpuStart: evidence.rap && offset !== 0 || (layout.low - anchor | 0) < 0 || // Fragments count frames: an anchor arriving past the spacing is a
|
|
327
|
+
// RAP inside its MPU, or an earlier MPU outran G.
|
|
328
|
+
arrival !== void 0 && arrival > 0 && this.#fragmentsProven,
|
|
329
|
+
...drift === void 0 || drift === 0 ? {} : { violation: "rap-spacing-mismatch" }
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* How many fragments MPU m's anchor `fragment` lies past the start that
|
|
334
|
+
* the anchor received last predicts for MPU m: one frame per fragment and
|
|
335
|
+
* G frames per MPU put the anchors of MPUs m and m' exactly G * (m - m')
|
|
336
|
+
* fragments apart, modulo 2^32. Undefined without a last anchor, a
|
|
337
|
+
* cadence, or this layout.
|
|
338
|
+
*/
|
|
339
|
+
#anchorDrift(mpu, fragment) {
|
|
340
|
+
const geometry = this.#geometry;
|
|
341
|
+
const last = this.#lastAnchor;
|
|
342
|
+
if (last === null || !this.#fragmentPerFrame || this.#multiSampleFragment || geometry.trackKind !== "video" || geometry.mode !== "classifying") {
|
|
343
|
+
return void 0;
|
|
344
|
+
}
|
|
345
|
+
return fragment - last.fragment - geometry.gopFrames * (mpu - last.mpu) | 0;
|
|
346
|
+
}
|
|
347
|
+
#clearMpuLayout() {
|
|
348
|
+
this.#mpus.clear();
|
|
349
|
+
this.#fragmentPerFrame = false;
|
|
350
|
+
this.#multiSampleFragment = false;
|
|
351
|
+
this.#lastAnchor = null;
|
|
352
|
+
this.#fragmentsProven = false;
|
|
353
|
+
}
|
|
282
354
|
#clearContiguityLedger() {
|
|
283
355
|
this.#mpuSbnSpans.clear();
|
|
284
356
|
this.#dataUnitStarts.clear();
|
|
@@ -378,9 +450,9 @@ var BlockClassifier = class {
|
|
|
378
450
|
if (this.#mode === "all-protected") return "unknown";
|
|
379
451
|
const geometry = this.#geometry;
|
|
380
452
|
if (geometry.trackKind !== "video" || geometry.mode !== "classifying") return "unknown";
|
|
381
|
-
if (block.mpus.size === 1 && block.
|
|
453
|
+
if (block.mpus.size === 1 && block.positionMin !== void 0 && block.positionMax !== void 0) {
|
|
382
454
|
const span = geometry.interleaveUnits - 1;
|
|
383
|
-
if (block.
|
|
455
|
+
if (block.positionMax - span >= 1 && block.positionMin + span <= geometry.gopFrames - 1) {
|
|
384
456
|
return "delta";
|
|
385
457
|
}
|
|
386
458
|
}
|