@blockcast/mmt-container 2.2.0-main.5da4e39e7fb8 → 2.2.0-main.5deae23da0f9
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 +125 -2
- package/dist/__tests__/ad-creative-signer.d.ts +11 -0
- package/dist/__tests__/ad-creative-signer.d.ts.map +1 -0
- package/dist/__tests__/test-utils.d.ts +1 -0
- package/dist/__tests__/test-utils.d.ts.map +1 -1
- package/dist/ad-beacon.d.ts +39 -0
- package/dist/ad-beacon.d.ts.map +1 -0
- package/dist/ad-beacon.js +21 -0
- package/dist/ad-beacon.js.map +7 -0
- package/dist/ad-creative-record.d.ts +65 -0
- package/dist/ad-creative-record.d.ts.map +1 -0
- package/dist/ad-creative-record.js +2281 -0
- package/dist/ad-creative-record.js.map +7 -0
- package/dist/ad-creative-timeline.d.ts +103 -0
- package/dist/ad-creative-timeline.d.ts.map +1 -0
- package/dist/ad-creative-timeline.js +2548 -0
- package/dist/ad-creative-timeline.js.map +7 -0
- package/dist/block-policy.d.ts +128 -14
- package/dist/block-policy.d.ts.map +1 -1
- package/dist/block-policy.js +472 -27
- package/dist/block-policy.js.map +2 -2
- package/dist/browser-runtime.js +1024 -117
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +1 -0
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +34 -0
- package/dist/carp-catalog.js.map +4 -4
- package/dist/catalog-fec-params.js.map +1 -1
- package/dist/catalog-network-source.d.ts +1 -17
- package/dist/catalog-network-source.d.ts.map +1 -1
- package/dist/catalog-network-source.js +25 -19
- package/dist/catalog-network-source.js.map +3 -3
- package/dist/cmaf-block-assembler.d.ts +10 -2
- package/dist/cmaf-block-assembler.d.ts.map +1 -1
- package/dist/cmaf-block-assembler.js +30 -8
- package/dist/cmaf-block-assembler.js.map +3 -3
- package/dist/codec-utils.d.ts.map +1 -1
- package/dist/codec-utils.js +16 -3
- package/dist/codec-utils.js.map +2 -2
- package/dist/conceal-timeline.d.ts +24 -1
- package/dist/conceal-timeline.d.ts.map +1 -1
- package/dist/conceal-timeline.js +201 -4
- package/dist/conceal-timeline.js.map +3 -3
- package/dist/datagram-leg-deadline.d.ts +4 -0
- package/dist/datagram-leg-deadline.d.ts.map +1 -1
- package/dist/datagram-leg-deadline.js.map +2 -2
- package/dist/event-timeline-mmtp.d.ts +17 -0
- package/dist/event-timeline-mmtp.d.ts.map +1 -0
- package/dist/event-timeline-mmtp.js +3117 -0
- package/dist/event-timeline-mmtp.js.map +7 -0
- package/dist/fec-manager.d.ts +24 -3
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +531 -38
- package/dist/fec-manager.js.map +2 -2
- package/dist/feed-gate.d.ts +114 -0
- package/dist/feed-gate.d.ts.map +1 -0
- package/dist/feed-gate.js +175 -0
- package/dist/feed-gate.js.map +7 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +2 -2
- package/dist/iso-bmff-timing.d.ts +16 -0
- package/dist/iso-bmff-timing.d.ts.map +1 -1
- package/dist/iso-bmff-timing.js +28 -0
- package/dist/iso-bmff-timing.js.map +2 -2
- package/dist/mfu-reassembler.d.ts +2 -0
- package/dist/mfu-reassembler.d.ts.map +1 -1
- package/dist/mfu-reassembler.js +4 -2
- package/dist/mfu-reassembler.js.map +2 -2
- package/dist/mmtp-container-parser.d.ts +12 -0
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +73 -3
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +103 -25
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +73 -3
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-router.d.ts +20 -2
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +150 -23
- package/dist/mmtp-router.js.map +3 -3
- package/dist/multicast-auth-catalog.js.map +1 -1
- package/dist/multicast-input.js.map +1 -1
- package/dist/multicast-manager.d.ts +23 -2
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +737 -86
- package/dist/multicast-manager.js.map +3 -3
- package/dist/multicast-transport.js +44 -22
- package/dist/multicast-transport.js.map +2 -2
- package/dist/no-modules.js +98 -22
- package/dist/no-modules.js.map +4 -4
- package/dist/repair-fetch.d.ts +10 -3
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +31 -5
- package/dist/repair-fetch.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js.map +2 -2
- package/dist/wasm-mmtp-container-parser.js +73 -3
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/package.json +17 -5
- package/schemas/catalog.schema.json +7 -2
- package/src/ad-beacon.ts +51 -0
- package/src/ad-creative-record.ts +276 -0
- package/src/ad-creative-timeline.ts +410 -0
- package/src/block-policy.ts +673 -42
- package/src/carp-catalog.ts +9 -0
- package/src/catalog-network-source.ts +3 -37
- package/src/cmaf-block-assembler.ts +17 -0
- package/src/codec-utils.ts +19 -3
- package/src/conceal-timeline.ts +60 -5
- package/src/datagram-leg-deadline.ts +4 -0
- package/src/event-timeline-mmtp.ts +55 -0
- package/src/fec-manager.ts +84 -12
- package/src/feed-gate.ts +295 -0
- package/src/index.ts +21 -0
- package/src/iso-bmff-timing.ts +33 -0
- package/src/mfu-reassembler.ts +4 -0
- package/src/mmtp-container-parser.ts +51 -5
- package/src/mmtp-router.ts +116 -4
- package/src/multicast-manager.ts +31 -0
- package/src/repair-fetch.ts +53 -8
- package/test-vectors/catalog/README.md +1 -0
- package/test-vectors/catalog/negative/event-timeline-empty-event-type.json +41 -0
- package/test-vectors/catalog/positive/event-timeline-ad-creative.json +41 -0
- package/test-vectors/catalog/positive/event-timeline-wallclock-no-depends.json +38 -0
- package/test-vectors/catalog/positive/multicast-event-timeline.json +81 -0
- package/test-vectors/catalog/section-codes.json +1 -0
- package/test-vectors/frame-needs-v1.json +295 -0
- package/test-vectors/repair-policy-v1.json +36 -3
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The video feed gate: one loss rule for every codec.
|
|
3
|
+
*
|
|
4
|
+
* Each video frame states, in the `priority` byte of its MFU data-unit
|
|
5
|
+
* header, the one earlier frame it needs (its anchor). The rule:
|
|
6
|
+
*
|
|
7
|
+
* Feed a frame only if its anchor was fed since the last keyframe.
|
|
8
|
+
* A frame that states nothing needs every frame since the keyframe.
|
|
9
|
+
* A decoder known to conceal a missing reference is fed everything.
|
|
10
|
+
*
|
|
11
|
+
* The gate answers only inside a GOP whose keyframe carried 254, and only
|
|
12
|
+
* for a decoder that does not conceal. Everywhere else it answers `unread`
|
|
13
|
+
* and the sink runs its own stall and hold: a stream whose keyframes carry
|
|
14
|
+
* 255 takes no other path.
|
|
15
|
+
*
|
|
16
|
+
* - {@link decodeFrameNeeds} is the value map of the byte.
|
|
17
|
+
* - {@link decoderTolerance} is the one codec table.
|
|
18
|
+
* - {@link VideoFeedGate} is the rule. It keeps no timer and no deadline.
|
|
19
|
+
*/
|
|
20
|
+
/** `priority` on a keyframe whose producer follows the map up to the next keyframe. */
|
|
21
|
+
export declare const FRAME_NEEDS_KEYFRAME = 254;
|
|
22
|
+
/** What one `priority` byte states. */
|
|
23
|
+
export interface FrameStatement {
|
|
24
|
+
/** On a keyframe: every frame up to the next keyframe follows the map. */
|
|
25
|
+
readonly map: boolean;
|
|
26
|
+
/** The anchor is this many frames back in decode order, 1 to 62. 0: nothing stated. */
|
|
27
|
+
readonly distance: number;
|
|
28
|
+
/** False only when the frame states that no later frame needs it. */
|
|
29
|
+
readonly mayBeNeeded: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Read one `priority` byte. On a keyframe only 254 states anything. On any
|
|
33
|
+
* other frame bit 6 is "a later frame may need me" and bits 5 to 0 are the
|
|
34
|
+
* distance back to the anchor; 0, 63, 64, 127 and every value above 127
|
|
35
|
+
* state nothing.
|
|
36
|
+
*/
|
|
37
|
+
export declare function decodeFrameNeeds(code: number, keyframe: boolean): FrameStatement;
|
|
38
|
+
/**
|
|
39
|
+
* `conceals`: the decoder draws through a missing reference and recovers by
|
|
40
|
+
* itself, so it is fed everything. `none`: it errors, closes or draws a wrong
|
|
41
|
+
* picture, so a frame whose reference is missing is never fed.
|
|
42
|
+
*/
|
|
43
|
+
export type DecoderTolerance = 'conceals' | 'none';
|
|
44
|
+
/**
|
|
45
|
+
* The only place a codec name decides loss handling. A page cannot ask which
|
|
46
|
+
* decoder it got, so a codec conceals only when every decoder known for it
|
|
47
|
+
* does: today that is H.264. Any other codec, known or not, gets `none`.
|
|
48
|
+
*/
|
|
49
|
+
export declare function decoderTolerance(codec: string): DecoderTolerance;
|
|
50
|
+
/** One frame's statement as the router read it. Opaque to a sink: forward it like `gapBefore`. */
|
|
51
|
+
export interface FrameNeeds {
|
|
52
|
+
/** MPU_sequence_number of the frame. */
|
|
53
|
+
readonly mpu: number;
|
|
54
|
+
/** The frame's place in decode order: its movie_fragment_sequence_number. */
|
|
55
|
+
readonly position: number;
|
|
56
|
+
/** The `priority` byte. */
|
|
57
|
+
readonly code: number;
|
|
58
|
+
}
|
|
59
|
+
/** `unread`: the gate states nothing about this frame, run your own code. */
|
|
60
|
+
export type GateAnswer = 'unread' | 'feed' | 'withhold';
|
|
61
|
+
export interface GateFrame {
|
|
62
|
+
/** Codec-aware RAP check on this frame's bitstream. */
|
|
63
|
+
readonly keyframe: boolean;
|
|
64
|
+
readonly needs?: FrameNeeds;
|
|
65
|
+
}
|
|
66
|
+
export interface VideoFeedGateOptions {
|
|
67
|
+
readonly tolerance: DecoderTolerance;
|
|
68
|
+
}
|
|
69
|
+
export interface VideoFeedGateStats {
|
|
70
|
+
/** Frames fed after a missing frame of their GOP. */
|
|
71
|
+
fedAcrossGap: number;
|
|
72
|
+
/** Frames the gate answered `withhold` for. A late or repeated frame is not counted. */
|
|
73
|
+
withheld: number;
|
|
74
|
+
/** Decoder failures after a frame was fed across a gap. Must stay 0. */
|
|
75
|
+
selectiveFeedFailures: number;
|
|
76
|
+
/** Statements that reached before their keyframe. Must stay 0. */
|
|
77
|
+
statementViolations: number;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Per-decoder feed state. A sink asks {@link admit} about every frame that
|
|
81
|
+
* is not a keyframe, after its own stall test; reports with {@link fed} each
|
|
82
|
+
* frame it hands to its decoder or buffer, keyframes included; and calls
|
|
83
|
+
* {@link requireKeyframe} where it stalls, resets its decoder or empties its
|
|
84
|
+
* queue. "Fed" is what the sink reports, never what the gate allowed: a frame
|
|
85
|
+
* the sink drops for a reason of its own is not recorded, so every frame
|
|
86
|
+
* anchored on it is withheld. An answer rests on the reports made before it,
|
|
87
|
+
* so a sink reports one frame before it asks about the next.
|
|
88
|
+
*/
|
|
89
|
+
export declare class VideoFeedGate {
|
|
90
|
+
#private;
|
|
91
|
+
constructor(options: VideoFeedGateOptions);
|
|
92
|
+
/** True while the gate answers from the statements of the current GOP. */
|
|
93
|
+
get reading(): boolean;
|
|
94
|
+
get stats(): Readonly<VideoFeedGateStats>;
|
|
95
|
+
/**
|
|
96
|
+
* May this frame be fed? Records no frame as fed, so a sink may ask twice
|
|
97
|
+
* about one frame. `unread` for a keyframe, a concealing decoder, a GOP
|
|
98
|
+
* whose keyframe did not carry 254, and a track switched off. A late or
|
|
99
|
+
* repeated frame is refused with `withhold` and not counted.
|
|
100
|
+
*/
|
|
101
|
+
admit(frame: GateFrame): GateAnswer;
|
|
102
|
+
/** The sink handed this frame to its decoder or buffer. */
|
|
103
|
+
fed(frame: GateFrame): void;
|
|
104
|
+
/** The sink stalled, reset its decoder or emptied its queue: nothing is read before the next keyframe. */
|
|
105
|
+
requireKeyframe(): void;
|
|
106
|
+
/**
|
|
107
|
+
* The decoder raised an error or closed. Returns true when a frame had been
|
|
108
|
+
* fed across a gap: the decoder could not take the selective feed, so no
|
|
109
|
+
* statement is read on this track again. Either way the reading of this GOP
|
|
110
|
+
* stops, and the rest of a GOP with a hole the gate answered for is withheld.
|
|
111
|
+
*/
|
|
112
|
+
onDecoderFailure(): boolean;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=feed-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feed-gate.d.ts","sourceRoot":"","sources":["../src/feed-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,uFAAuF;AACvF,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAEvC,uCAAuC;AACvC,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAA;IACrB,uFAAuF;IACvF,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,qEAAqE;IACrE,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;CAC9B;AAKD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,cAAc,CAMhF;AAID;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,MAAM,CAAA;AAElD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAGhE;AAID,kGAAkG;AAClG,MAAM,WAAW,UAAU;IACzB,wCAAwC;IACxC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,6EAA6E;IAC7E,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,6EAA6E;AAC7E,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAA;AAEvD,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,KAAK,CAAC,EAAE,UAAU,CAAA;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAA;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC,qDAAqD;IACrD,YAAY,EAAE,MAAM,CAAA;IACpB,wFAAwF;IACxF,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,qBAAqB,EAAE,MAAM,CAAA;IAC7B,kEAAkE;IAClE,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAED;;;;;;;;;GASG;AACH,qBAAa,aAAa;;gBA4BZ,OAAO,EAAE,oBAAoB;IAKzC,0EAA0E;IAC1E,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,KAAK,IAAI,QAAQ,CAAC,kBAAkB,CAAC,CAExC;IAED;;;;;OAKG;IACH,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU;IAiCnC,2DAA2D;IAC3D,GAAG,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAgC3B,0GAA0G;IAC1G,eAAe,IAAI,IAAI;IAIvB;;;;;OAKG;IACH,gBAAgB,IAAI,OAAO;CAoD5B"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
// src/feed-gate.ts
|
|
2
|
+
var FRAME_NEEDS_KEYFRAME = 254;
|
|
3
|
+
var NOTHING_STATED = Object.freeze({ map: false, distance: 0, mayBeNeeded: true });
|
|
4
|
+
var MAP_KEYFRAME = Object.freeze({ map: true, distance: 0, mayBeNeeded: true });
|
|
5
|
+
function decodeFrameNeeds(code, keyframe) {
|
|
6
|
+
if (keyframe) return code === FRAME_NEEDS_KEYFRAME ? MAP_KEYFRAME : NOTHING_STATED;
|
|
7
|
+
if (!Number.isInteger(code) || code < 1 || code > 126 || code === 63 || code === 64) {
|
|
8
|
+
return NOTHING_STATED;
|
|
9
|
+
}
|
|
10
|
+
return { map: false, distance: code & 63, mayBeNeeded: code > 64 };
|
|
11
|
+
}
|
|
12
|
+
function decoderTolerance(codec) {
|
|
13
|
+
const lower = codec.toLowerCase();
|
|
14
|
+
return lower.startsWith("avc1") || lower.startsWith("avc3") ? "conceals" : "none";
|
|
15
|
+
}
|
|
16
|
+
var VideoFeedGate = class {
|
|
17
|
+
#inert;
|
|
18
|
+
/** A statement was false, or a decoder failed on a selective feed: this track is read no more. */
|
|
19
|
+
#off = false;
|
|
20
|
+
/** `hold`: reading stopped inside a GOP in which the gate had answered for a hole. */
|
|
21
|
+
#mode = "unread";
|
|
22
|
+
#keyMpu = 0;
|
|
23
|
+
#keyPosition = 0;
|
|
24
|
+
/** Slot `position & 63` holds the position fed there: the last 64 positions. */
|
|
25
|
+
#fedAt = new Float64Array(64).fill(-1);
|
|
26
|
+
/** Frames fed since the keyframe. */
|
|
27
|
+
#fedCount = 0;
|
|
28
|
+
/** Place after the keyframe of the last frame fed. */
|
|
29
|
+
#top = 0;
|
|
30
|
+
/** Place after the keyframe of the last frame the gate allowed. */
|
|
31
|
+
#allowed = 0;
|
|
32
|
+
#withheldInGop = false;
|
|
33
|
+
#fedAcrossGap = false;
|
|
34
|
+
/** A decoder may report a failure after the next keyframe went in. */
|
|
35
|
+
#fedAcrossGapBefore = false;
|
|
36
|
+
#lastWithheld;
|
|
37
|
+
#stats = {
|
|
38
|
+
fedAcrossGap: 0,
|
|
39
|
+
withheld: 0,
|
|
40
|
+
selectiveFeedFailures: 0,
|
|
41
|
+
statementViolations: 0
|
|
42
|
+
};
|
|
43
|
+
constructor(options) {
|
|
44
|
+
this.#inert = options.tolerance !== "none";
|
|
45
|
+
}
|
|
46
|
+
/** True while the gate answers from the statements of the current GOP. */
|
|
47
|
+
get reading() {
|
|
48
|
+
return this.#mode === "reading";
|
|
49
|
+
}
|
|
50
|
+
get stats() {
|
|
51
|
+
return { ...this.#stats };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* May this frame be fed? Records no frame as fed, so a sink may ask twice
|
|
55
|
+
* about one frame. `unread` for a keyframe, a concealing decoder, a GOP
|
|
56
|
+
* whose keyframe did not carry 254, and a track switched off. A late or
|
|
57
|
+
* repeated frame is refused with `withhold` and not counted.
|
|
58
|
+
*/
|
|
59
|
+
admit(frame) {
|
|
60
|
+
if (frame.keyframe) return "unread";
|
|
61
|
+
const needs = frame.needs;
|
|
62
|
+
if (this.#mode === "reading") {
|
|
63
|
+
if (needs === void 0 || needs.code > 128) {
|
|
64
|
+
this.#stopReading();
|
|
65
|
+
} else {
|
|
66
|
+
const offset = this.#offset(needs);
|
|
67
|
+
if (offset < 0) return "withhold";
|
|
68
|
+
if (offset === 0) return this.#withhold(needs);
|
|
69
|
+
const { distance } = decodeFrameNeeds(needs.code, false);
|
|
70
|
+
if (distance > offset) {
|
|
71
|
+
this.#stats.statementViolations++;
|
|
72
|
+
this.#off = true;
|
|
73
|
+
this.#stopReading();
|
|
74
|
+
} else {
|
|
75
|
+
const whole = this.#fedCount === offset - 1;
|
|
76
|
+
const anchor = needs.position - distance >>> 0;
|
|
77
|
+
const anchorFed = distance === 0 ? whole : distance === offset || this.#fedAt[anchor & 63] === anchor;
|
|
78
|
+
if (!anchorFed) return this.#withhold(needs);
|
|
79
|
+
this.#allowed = Math.max(this.#allowed, offset);
|
|
80
|
+
return "feed";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return this.#mode === "hold" ? this.#withhold(needs) : "unread";
|
|
85
|
+
}
|
|
86
|
+
/** The sink handed this frame to its decoder or buffer. */
|
|
87
|
+
fed(frame) {
|
|
88
|
+
const needs = frame.needs;
|
|
89
|
+
if (frame.keyframe) {
|
|
90
|
+
this.#fedAcrossGapBefore = this.#fedAcrossGap;
|
|
91
|
+
this.#fedAcrossGap = false;
|
|
92
|
+
this.#clear();
|
|
93
|
+
if (this.#inert || this.#off || needs === void 0 || !decodeFrameNeeds(needs.code, true).map) return;
|
|
94
|
+
this.#mode = "reading";
|
|
95
|
+
this.#keyMpu = needs.mpu;
|
|
96
|
+
this.#keyPosition = needs.position >>> 0;
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (this.#mode !== "reading") return;
|
|
100
|
+
if (needs === void 0 || needs.code > 128) {
|
|
101
|
+
this.#stopReading();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const offset = this.#offset(needs);
|
|
105
|
+
if (offset <= 0) return;
|
|
106
|
+
if (this.#fedCount !== offset - 1) {
|
|
107
|
+
this.#fedAcrossGap = true;
|
|
108
|
+
this.#stats.fedAcrossGap++;
|
|
109
|
+
}
|
|
110
|
+
const position = needs.position >>> 0;
|
|
111
|
+
this.#fedAt[position & 63] = position;
|
|
112
|
+
this.#fedCount++;
|
|
113
|
+
this.#top = offset;
|
|
114
|
+
}
|
|
115
|
+
/** The sink stalled, reset its decoder or emptied its queue: nothing is read before the next keyframe. */
|
|
116
|
+
requireKeyframe() {
|
|
117
|
+
this.#clear();
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The decoder raised an error or closed. Returns true when a frame had been
|
|
121
|
+
* fed across a gap: the decoder could not take the selective feed, so no
|
|
122
|
+
* statement is read on this track again. Either way the reading of this GOP
|
|
123
|
+
* stops, and the rest of a GOP with a hole the gate answered for is withheld.
|
|
124
|
+
*/
|
|
125
|
+
onDecoderFailure() {
|
|
126
|
+
const selective = this.#fedAcrossGap || this.#fedAcrossGapBefore;
|
|
127
|
+
this.#fedAcrossGap = false;
|
|
128
|
+
this.#fedAcrossGapBefore = false;
|
|
129
|
+
if (selective) {
|
|
130
|
+
this.#stats.selectiveFeedFailures++;
|
|
131
|
+
this.#off = true;
|
|
132
|
+
}
|
|
133
|
+
if (this.#mode === "reading") this.#stopReading();
|
|
134
|
+
if (this.#mode !== "hold") this.#clear();
|
|
135
|
+
return selective;
|
|
136
|
+
}
|
|
137
|
+
#clear() {
|
|
138
|
+
this.#mode = "unread";
|
|
139
|
+
this.#fedAt.fill(-1);
|
|
140
|
+
this.#fedCount = 0;
|
|
141
|
+
this.#top = 0;
|
|
142
|
+
this.#allowed = 0;
|
|
143
|
+
this.#withheldInGop = false;
|
|
144
|
+
}
|
|
145
|
+
/** The frame's place after the keyframe. 0: another MPU. -1: late or repeated, not after the last frame fed. */
|
|
146
|
+
#offset(needs) {
|
|
147
|
+
if (needs.mpu !== this.#keyMpu) return 0;
|
|
148
|
+
const offset = needs.position - this.#keyPosition >>> 0;
|
|
149
|
+
return offset > this.#top && offset < 2147483648 ? offset : -1;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The sink's own hold never saw a hole the gate answered for: a frame it
|
|
153
|
+
* withheld, or one it allowed that was not fed. The gate then holds the
|
|
154
|
+
* rest of that GOP itself.
|
|
155
|
+
*/
|
|
156
|
+
#stopReading() {
|
|
157
|
+
this.#mode = this.#withheldInGop || this.#fedCount < this.#allowed ? "hold" : "unread";
|
|
158
|
+
}
|
|
159
|
+
#withhold(needs) {
|
|
160
|
+
this.#withheldInGop = true;
|
|
161
|
+
const last = this.#lastWithheld;
|
|
162
|
+
if (needs === void 0 || last === void 0 || needs.mpu !== last.mpu || needs.position !== last.position) {
|
|
163
|
+
this.#stats.withheld++;
|
|
164
|
+
}
|
|
165
|
+
this.#lastWithheld = needs;
|
|
166
|
+
return "withhold";
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
export {
|
|
170
|
+
FRAME_NEEDS_KEYFRAME,
|
|
171
|
+
VideoFeedGate,
|
|
172
|
+
decodeFrameNeeds,
|
|
173
|
+
decoderTolerance
|
|
174
|
+
};
|
|
175
|
+
//# sourceMappingURL=feed-gate.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/feed-gate.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The video feed gate: one loss rule for every codec.\n *\n * Each video frame states, in the `priority` byte of its MFU data-unit\n * header, the one earlier frame it needs (its anchor). The rule:\n *\n * Feed a frame only if its anchor was fed since the last keyframe.\n * A frame that states nothing needs every frame since the keyframe.\n * A decoder known to conceal a missing reference is fed everything.\n *\n * The gate answers only inside a GOP whose keyframe carried 254, and only\n * for a decoder that does not conceal. Everywhere else it answers `unread`\n * and the sink runs its own stall and hold: a stream whose keyframes carry\n * 255 takes no other path.\n *\n * - {@link decodeFrameNeeds} is the value map of the byte.\n * - {@link decoderTolerance} is the one codec table.\n * - {@link VideoFeedGate} is the rule. It keeps no timer and no deadline.\n */\n\n// \u2500\u2500\u2500 The value map \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** `priority` on a keyframe whose producer follows the map up to the next keyframe. */\nexport const FRAME_NEEDS_KEYFRAME = 254\n\n/** What one `priority` byte states. */\nexport interface FrameStatement {\n /** On a keyframe: every frame up to the next keyframe follows the map. */\n readonly map: boolean\n /** The anchor is this many frames back in decode order, 1 to 62. 0: nothing stated. */\n readonly distance: number\n /** False only when the frame states that no later frame needs it. */\n readonly mayBeNeeded: boolean\n}\n\nconst NOTHING_STATED: FrameStatement = Object.freeze({ map: false, distance: 0, mayBeNeeded: true })\nconst MAP_KEYFRAME: FrameStatement = Object.freeze({ map: true, distance: 0, mayBeNeeded: true })\n\n/**\n * Read one `priority` byte. On a keyframe only 254 states anything. On any\n * other frame bit 6 is \"a later frame may need me\" and bits 5 to 0 are the\n * distance back to the anchor; 0, 63, 64, 127 and every value above 127\n * state nothing.\n */\nexport function decodeFrameNeeds(code: number, keyframe: boolean): FrameStatement {\n if (keyframe) return code === FRAME_NEEDS_KEYFRAME ? MAP_KEYFRAME : NOTHING_STATED\n if (!Number.isInteger(code) || code < 1 || code > 126 || code === 63 || code === 64) {\n return NOTHING_STATED\n }\n return { map: false, distance: code & 0x3f, mayBeNeeded: code > 64 }\n}\n\n// \u2500\u2500\u2500 The decoder table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * `conceals`: the decoder draws through a missing reference and recovers by\n * itself, so it is fed everything. `none`: it errors, closes or draws a wrong\n * picture, so a frame whose reference is missing is never fed.\n */\nexport type DecoderTolerance = 'conceals' | 'none'\n\n/**\n * The only place a codec name decides loss handling. A page cannot ask which\n * decoder it got, so a codec conceals only when every decoder known for it\n * does: today that is H.264. Any other codec, known or not, gets `none`.\n */\nexport function decoderTolerance(codec: string): DecoderTolerance {\n const lower = codec.toLowerCase()\n return lower.startsWith('avc1') || lower.startsWith('avc3') ? 'conceals' : 'none'\n}\n\n// \u2500\u2500\u2500 The gate \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** One frame's statement as the router read it. Opaque to a sink: forward it like `gapBefore`. */\nexport interface FrameNeeds {\n /** MPU_sequence_number of the frame. */\n readonly mpu: number\n /** The frame's place in decode order: its movie_fragment_sequence_number. */\n readonly position: number\n /** The `priority` byte. */\n readonly code: number\n}\n\n/** `unread`: the gate states nothing about this frame, run your own code. */\nexport type GateAnswer = 'unread' | 'feed' | 'withhold'\n\nexport interface GateFrame {\n /** Codec-aware RAP check on this frame's bitstream. */\n readonly keyframe: boolean\n readonly needs?: FrameNeeds\n}\n\nexport interface VideoFeedGateOptions {\n readonly tolerance: DecoderTolerance\n}\n\nexport interface VideoFeedGateStats {\n /** Frames fed after a missing frame of their GOP. */\n fedAcrossGap: number\n /** Frames the gate answered `withhold` for. A late or repeated frame is not counted. */\n withheld: number\n /** Decoder failures after a frame was fed across a gap. Must stay 0. */\n selectiveFeedFailures: number\n /** Statements that reached before their keyframe. Must stay 0. */\n statementViolations: number\n}\n\n/**\n * Per-decoder feed state. A sink asks {@link admit} about every frame that\n * is not a keyframe, after its own stall test; reports with {@link fed} each\n * frame it hands to its decoder or buffer, keyframes included; and calls\n * {@link requireKeyframe} where it stalls, resets its decoder or empties its\n * queue. \"Fed\" is what the sink reports, never what the gate allowed: a frame\n * the sink drops for a reason of its own is not recorded, so every frame\n * anchored on it is withheld. An answer rests on the reports made before it,\n * so a sink reports one frame before it asks about the next.\n */\nexport class VideoFeedGate {\n readonly #inert: boolean\n /** A statement was false, or a decoder failed on a selective feed: this track is read no more. */\n #off = false\n /** `hold`: reading stopped inside a GOP in which the gate had answered for a hole. */\n #mode: 'unread' | 'reading' | 'hold' = 'unread'\n #keyMpu = 0\n #keyPosition = 0\n /** Slot `position & 63` holds the position fed there: the last 64 positions. */\n readonly #fedAt = new Float64Array(64).fill(-1)\n /** Frames fed since the keyframe. */\n #fedCount = 0\n /** Place after the keyframe of the last frame fed. */\n #top = 0\n /** Place after the keyframe of the last frame the gate allowed. */\n #allowed = 0\n #withheldInGop = false\n #fedAcrossGap = false\n /** A decoder may report a failure after the next keyframe went in. */\n #fedAcrossGapBefore = false\n #lastWithheld: FrameNeeds | undefined\n readonly #stats: VideoFeedGateStats = {\n fedAcrossGap: 0,\n withheld: 0,\n selectiveFeedFailures: 0,\n statementViolations: 0,\n }\n\n constructor(options: VideoFeedGateOptions) {\n // Anything but an explicit `none` leaves the sink on its own code.\n this.#inert = options.tolerance !== 'none'\n }\n\n /** True while the gate answers from the statements of the current GOP. */\n get reading(): boolean {\n return this.#mode === 'reading'\n }\n\n get stats(): Readonly<VideoFeedGateStats> {\n return { ...this.#stats }\n }\n\n /**\n * May this frame be fed? Records no frame as fed, so a sink may ask twice\n * about one frame. `unread` for a keyframe, a concealing decoder, a GOP\n * whose keyframe did not carry 254, and a track switched off. A late or\n * repeated frame is refused with `withhold` and not counted.\n */\n admit(frame: GateFrame): GateAnswer {\n if (frame.keyframe) return 'unread'\n const needs = frame.needs\n if (this.#mode === 'reading') {\n if (needs === undefined || needs.code > 128) {\n // No position, or a keyframe's byte on a frame the sink takes for none: this GOP cannot be read.\n this.#stopReading()\n } else {\n const offset = this.#offset(needs)\n // A late or repeated frame is no hole in the GOP.\n if (offset < 0) return 'withhold'\n if (offset === 0) return this.#withhold(needs)\n const { distance } = decodeFrameNeeds(needs.code, false)\n if (distance > offset) {\n // An anchor is never earlier than the keyframe: this sender does not follow the map.\n this.#stats.statementViolations++\n this.#off = true\n this.#stopReading()\n } else {\n const whole = this.#fedCount === offset - 1\n const anchor = (needs.position - distance) >>> 0\n const anchorFed = distance === 0\n ? whole\n : distance === offset || this.#fedAt[anchor & 63] === anchor\n if (!anchorFed) return this.#withhold(needs)\n this.#allowed = Math.max(this.#allowed, offset)\n return 'feed'\n }\n }\n }\n return this.#mode === 'hold' ? this.#withhold(needs) : 'unread'\n }\n\n /** The sink handed this frame to its decoder or buffer. */\n fed(frame: GateFrame): void {\n const needs = frame.needs\n if (frame.keyframe) {\n this.#fedAcrossGapBefore = this.#fedAcrossGap\n this.#fedAcrossGap = false\n this.#clear()\n if (\n this.#inert || this.#off || needs === undefined ||\n !decodeFrameNeeds(needs.code, true).map\n ) return\n this.#mode = 'reading'\n this.#keyMpu = needs.mpu\n this.#keyPosition = needs.position >>> 0\n return\n }\n if (this.#mode !== 'reading') return\n if (needs === undefined || needs.code > 128) {\n this.#stopReading()\n return\n }\n const offset = this.#offset(needs)\n if (offset <= 0) return\n if (this.#fedCount !== offset - 1) {\n this.#fedAcrossGap = true\n this.#stats.fedAcrossGap++\n }\n const position = needs.position >>> 0\n this.#fedAt[position & 63] = position\n this.#fedCount++\n this.#top = offset\n }\n\n /** The sink stalled, reset its decoder or emptied its queue: nothing is read before the next keyframe. */\n requireKeyframe(): void {\n this.#clear()\n }\n\n /**\n * The decoder raised an error or closed. Returns true when a frame had been\n * fed across a gap: the decoder could not take the selective feed, so no\n * statement is read on this track again. Either way the reading of this GOP\n * stops, and the rest of a GOP with a hole the gate answered for is withheld.\n */\n onDecoderFailure(): boolean {\n const selective = this.#fedAcrossGap || this.#fedAcrossGapBefore\n this.#fedAcrossGap = false\n this.#fedAcrossGapBefore = false\n if (selective) {\n this.#stats.selectiveFeedFailures++\n this.#off = true\n }\n if (this.#mode === 'reading') this.#stopReading()\n if (this.#mode !== 'hold') this.#clear()\n return selective\n }\n\n #clear(): void {\n this.#mode = 'unread'\n this.#fedAt.fill(-1)\n this.#fedCount = 0\n this.#top = 0\n this.#allowed = 0\n this.#withheldInGop = false\n }\n\n /** The frame's place after the keyframe. 0: another MPU. -1: late or repeated, not after the last frame fed. */\n #offset(needs: FrameNeeds): number {\n // Positions may restart per MPU, so a stale bit of another MPU must never look like a fed anchor.\n if (needs.mpu !== this.#keyMpu) return 0\n const offset = (needs.position - this.#keyPosition) >>> 0\n return offset > this.#top && offset < 0x8000_0000 ? offset : -1\n }\n\n /**\n * The sink's own hold never saw a hole the gate answered for: a frame it\n * withheld, or one it allowed that was not fed. The gate then holds the\n * rest of that GOP itself.\n */\n #stopReading(): void {\n this.#mode = this.#withheldInGop || this.#fedCount < this.#allowed ? 'hold' : 'unread'\n }\n\n #withhold(needs: FrameNeeds | undefined): GateAnswer {\n this.#withheldInGop = true\n const last = this.#lastWithheld\n // A sink may ask twice about one frame: it is counted once.\n if (\n needs === undefined || last === undefined ||\n needs.mpu !== last.mpu || needs.position !== last.position\n ) {\n this.#stats.withheld++\n }\n this.#lastWithheld = needs\n return 'with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ACtB,UAAM,OAAO,KAAK;AAElB,QACE,UAAU,UAAa,SAAS,UAChC,MAAM,QAAQ,KAAK,OAAO,MAAM,aAAa,KAAK,UAClD;AACA,WAAK,OAAO;AAAA,IACd;AACA,SAAK,gBAAgB;AACrB,WAAO;AAAA,EACT;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { type CombinedSample, type SampleCombinerStats, SampleCombiner, SampleCo
|
|
|
11
11
|
export { isCompleteFmp4DataUnit } from './fmp4-completion.js';
|
|
12
12
|
export { type AvcCInfo, type AacAscInfo, type SpsPps, type FallbackAvcCOptions, type HevcParameterSets, type H264KeyframeDetectionOptions, type H264AvccSample, type H264SampleFormat, type H264NalUnitFormat, type H264NalUnitSample, extractAvcCFromInitSegment, extractAacAscFromInitSegment, normalizeMmtpInitSegment, generateFallbackAvcC, extractSpsPpsFromAvcC, avccToAnnexB, extractCodecDescriptionFromAnnexB, codecStringFromAvcC, isAnnexB, isCompleteAvccSample, findAnnexBStartCode, splitAnnexBNalUnits, annexBToAvcc, normalizeH264SampleToAvcc, splitH264SampleNalUnits, classifyH264Keyframe, detectH264Keyframe, mmtpTimestampToMicros, isFmp4InitSegment, wrapAdtsFrame, isHevcCodec, removeEmulationPrevention, splitAvccNalUnits, extractHevcParameterSets, generateHvcCFromParameterSets, extractHevcCodecDescription, hevcVclOnly, type VideoSampleEntry, type VideoCodecFamily, type HevcSpsInfo, type HevcCmafSample, videoSampleEntryFromCodecString, videoCodecFamily, HEVC_NAL_UNIT_TYPE, HEVC_NAL_HEADER_LENGTH, hevcNalUnitType, isHevcIrapNalUnitType, parseHevcSps, hevcCodecStringFromSps, classifyHevcKeyframe, detectHevcKeyframe, normalizeHevcSampleToLengthPrefixed, prepareHevcCmafSample, } from './codec-utils.js';
|
|
13
13
|
export { LOCHeaderExtensionId, FEC_SS_ID_MAX, FEC_SOURCE_INFO_LEN, encodeFecSourceInfo, decodeFecSourceInfo, FecSourceInfo, AuthTag, } from './loc.js';
|
|
14
|
-
export { type FecCatalogConfig, type FecInstanceConfig, type MulticastProtocol, type MulticastTrack, type MulticastTrackObject, type MulticastEndpoint, type AmtDiscovery, type MulticastCatalogConfig, type NetworkSource, isMulticastTrackObject, isMulticastEndpoint, isMulticastCatalogConfig, type TrackTimingConfig, isTrackTimingConfig, resolveGroupDurationTicks, resolveGroupDurationMs, validateSwitchingSetTiming, type CmsfCatalog, type CmsfCatalogErrorCode, CmsfCatalogValidationError, validateCmsfMmtpCatalog, type MmtpTrackIssue, type MmtpTrackIssueCode, mmtpTrackIssues, type ArchiveConfig, archiveOrigin, } from './carp-catalog.js';
|
|
14
|
+
export { type FecCatalogConfig, type FecInstanceConfig, type MulticastProtocol, type MulticastTrack, type MulticastTrackObject, type MulticastEndpoint, type AmtDiscovery, type MulticastCatalogConfig, type NetworkSource, isMulticastTrackObject, isMulticastEndpoint, isMulticastCatalogConfig, type TrackTimingConfig, isTrackTimingConfig, resolveGroupDurationTicks, resolveGroupDurationMs, validateSwitchingSetTiming, type CmsfCatalog, type CmsfCatalogErrorCode, CmsfCatalogValidationError, validateCmsfMmtpCatalog, type MmtpTrackIssue, type MmtpTrackIssueCode, mmtpTrackIssues, type ArchiveConfig, archiveOrigin, catalogEventTimelineTracks, type EventTimelineTrack, type EventTimelineTrackIssue, type EventTimelineTrackIssueCode, } from './carp-catalog.js';
|
|
15
15
|
export { normalizeDeliveryCatalog, type DeliveryPackaging, type DeliveryContentType, type DeliveryEndpoint, type DeliveryPolicy, type DeliveryObjectMapping, type DeliveryFec, type DeliveryRouteBase, type DashDeliveryRoute, type HlsDeliveryRoute, type MmtpDeliveryRoute, type DashDeliveryConfig, type HlsDeliveryConfig, type MmtpDeliveryConfig, type DeliveryMulticastBase, type DeliveryMulticastV2, type DeliveryCatalogV2, } from './delivery-catalog.js';
|
|
16
16
|
export { type MulticastInput, type MulticastEndpointInput, type MulticastInputErrorKind, MulticastInputError, multicastFromConfig, multicastFromEnv, } from './multicast-input.js';
|
|
17
17
|
export { type Phase14OverrideTrack, type Phase14CatalogOverride, getPhase14CatalogOverride, mergeOverrideIntoHangRenditions, mergeOverrideIntoCmsfTracks, } from './phase14-catalog-override.js';
|
|
@@ -29,8 +29,9 @@ export { WasmMfuReassembler, resolveGlobalMmtWasmBindings, type MmtWasmBindings,
|
|
|
29
29
|
export { createWasmMmtpContainerParser, type WasmMmtpParserConfig, } from './wasm-mmtp-container-parser.js';
|
|
30
30
|
export { MulticastTransport, type MulticastFailbackReason, type MulticastJoinDeclineReason, type MulticastJoinOutcome, type MulticastJoinProviderError, type MulticastJoinStats, type MulticastTransportConfig, type ResolvedMulticastTransport, } from './multicast-transport.js';
|
|
31
31
|
export { MulticastManager, forwardRepairLifecycleEvents, isRepairLifecycleEvent, REPAIR_LIFECYCLE_EVENT_TYPE, REPAIR_LIFECYCLE_LOG_PREFIX, type MulticastEndpointConfig, type DatagramLegDiagnostics, type DatagramLegPlayerCounters, type MultiTrackCatalog, type MultiTrackCatalogTrack, type WasmFecDecoderFactory, type RepairBlockIdentity, type RepairLifecycleApplicationEvent, type RepairLifecycleEventOptions, type RepairLifecycleEventFactory, type RepairLifecycleEventTarget, type RepairLifecycleSource, type RepairLifecycleEvent, type RepairLifecycleObserver, type RepairStreamIdentity, type BlockPolicyStats, type RenditionSwitch, type RenditionSwitchCancel, type RenditionSwitchRequest, type RenditionSwitchState, } from './multicast-manager.js';
|
|
32
|
-
export { BlockClassifier, decideGap, deriveBlockClassifierGeometry, keyframeIntervalMediaTicks, repairPriorityForClass, type BlockClass, type BlockClassifierGeometry, type BlockClassifierGeometryInput, type ClassifierChange, type ClassifierMode, type ClassifierReason, type DecideGapInput, type FrameGapAction, type FrameGapDecision, type FrameGapReason, type GapFrameEvidence, type GapStreamIdentity, type KeyframeInterval, type ReclassificationEvidence, type RepairPriority, type SourceSymbolEvidence, type TrackKind, } from './block-policy.js';
|
|
32
|
+
export { BlockClassifier, decideGap, deriveBlockClassifierGeometry, keyframeIntervalMediaTicks, repairPriorityForClass, type BlockClass, type BlockClassifierGeometry, type BlockClassifierGeometryInput, type ClassifierChange, type ClassifierMode, type ClassifierReason, type MpuRuleOffReason, type DecideGapInput, type FrameGapAction, type FrameGapDecision, type FrameGapReason, type GapFrameEvidence, type GapStreamIdentity, type KeyframeInterval, type ReclassificationEvidence, type RepairPriority, type SourceSymbolEvidence, type TrackKind, } from './block-policy.js';
|
|
33
33
|
export { AudioGapConcealer, HoldLastTimeline, videoConcealModeForCodec, type AudioAccessUnit, type AudioGapConcealerStats, type AudioGapPlan, type HoldLastTimelineOptions, type HoldLastTimelineStats, type TimelineEmit, type TimelineSample, type VideoConcealMode, } from './conceal-timeline.js';
|
|
34
|
+
export { FRAME_NEEDS_KEYFRAME, VideoFeedGate, decodeFrameNeeds, decoderTolerance, type DecoderTolerance, type FrameNeeds, type FrameStatement, type GateAnswer, type GateFrame, type VideoFeedGateOptions, type VideoFeedGateStats, } from './feed-gate.js';
|
|
34
35
|
export { setupFecWorkerForTrack, type FecWorkerAssetUrls, type FecWorkerSetupOptions, type FecWorkerSetupResult, } from './fec-worker-setup.js';
|
|
35
36
|
export { MediaRouter, TrackSourceConflictError, type MediaRouterOptions, type TrackSource, type SetTrackSourceOptions, type MigrationPolicy, type FrameMeta as RouterFrameMeta, type FrameKind, type SourceKind, type DeltaFallbackConfig, } from './media-router.js';
|
|
36
37
|
export { resolveDeltaFallback, type ResolvedDeltaFallback, } from './delta-fallback-config.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAG1D,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,K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,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EACL,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,KAAK,gBAAgB,GACtB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -72,7 +72,8 @@ import {
|
|
|
72
72
|
CmsfCatalogValidationError,
|
|
73
73
|
validateCmsfMmtpCatalog,
|
|
74
74
|
mmtpTrackIssues,
|
|
75
|
-
archiveOrigin
|
|
75
|
+
archiveOrigin,
|
|
76
|
+
catalogEventTimelineTracks
|
|
76
77
|
} from "./carp-catalog.js";
|
|
77
78
|
import {
|
|
78
79
|
normalizeDeliveryCatalog
|
|
@@ -168,6 +169,12 @@ import {
|
|
|
168
169
|
HoldLastTimeline,
|
|
169
170
|
videoConcealModeForCodec
|
|
170
171
|
} from "./conceal-timeline.js";
|
|
172
|
+
import {
|
|
173
|
+
FRAME_NEEDS_KEYFRAME,
|
|
174
|
+
VideoFeedGate,
|
|
175
|
+
decodeFrameNeeds,
|
|
176
|
+
decoderTolerance
|
|
177
|
+
} from "./feed-gate.js";
|
|
171
178
|
import {
|
|
172
179
|
setupFecWorkerForTrack
|
|
173
180
|
} from "./fec-worker-setup.js";
|
|
@@ -299,6 +306,7 @@ export {
|
|
|
299
306
|
FEC_INACTIVE_REASONS,
|
|
300
307
|
FEC_SOURCE_INFO_LEN,
|
|
301
308
|
FEC_SS_ID_MAX,
|
|
309
|
+
FRAME_NEEDS_KEYFRAME,
|
|
302
310
|
FecSourceInfo,
|
|
303
311
|
FecStarvationDetector,
|
|
304
312
|
HEVC_NAL_HEADER_LENGTH,
|
|
@@ -337,6 +345,7 @@ export {
|
|
|
337
345
|
TrackSession,
|
|
338
346
|
TrackSourceConflictError,
|
|
339
347
|
TransportPool,
|
|
348
|
+
VideoFeedGate,
|
|
340
349
|
WasmMfuReassembler,
|
|
341
350
|
annexBToAvcc,
|
|
342
351
|
archiveOrigin,
|
|
@@ -348,6 +357,7 @@ export {
|
|
|
348
357
|
catalogAmtNetworkSource,
|
|
349
358
|
catalogAtsc3NetworkSource,
|
|
350
359
|
catalogDeclaresFec,
|
|
360
|
+
catalogEventTimelineTracks,
|
|
351
361
|
catalogFecInterleaveMs,
|
|
352
362
|
catalogFecMediaUnitsPerSecond,
|
|
353
363
|
catalogGroupDurationMs,
|
|
@@ -369,9 +379,11 @@ export {
|
|
|
369
379
|
datagramMfuReassembly,
|
|
370
380
|
decideGap,
|
|
371
381
|
decodeFecSourceInfo,
|
|
382
|
+
decodeFrameNeeds,
|
|
372
383
|
decodeLocHeader,
|
|
373
384
|
decodeLocTimestamp,
|
|
374
385
|
decodeTimestamp,
|
|
386
|
+
decoderTolerance,
|
|
375
387
|
deriveBlockClassifierGeometry,
|
|
376
388
|
detectH264Keyframe,
|
|
377
389
|
detectHevcKeyframe,
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @mmt/container - MMTP/LOC Container Parsing\n *\n * Shared container parsing library for MMT over MoQ and SSM.\n *\n * @packageDocumentation\n */\n\nexport type { AuthoredTiming } from './authored-timing.js'\n\n// MFU Reassembler\nexport {\n type MFUFragment,\n type ReassembledMFU,\n type ReassemblerStats,\n type MFUReassemblerOptions,\n type MfuReassemblerBackend,\n type MmtpSourcePath,\n MFUReassembler,\n isMfuReassemblyError,\n MfuReassemblyError,\n type MfuReassemblyErrorCode,\n createFragment,\n processMMTPWithReassembly,\n} from './mfu-reassembler.js'\n\n// Sample combiner: combines subsample data units (moqcast #37) of one\n// timed sample, each already reassembled by MFUReassembler, back into one\n// contiguous sample.\nexport {\n type CombinedSample,\n type SampleCombinerStats,\n SampleCombiner,\n SampleCombineError,\n type SampleCombineErrorCode,\n} from './sample-combiner.js'\n\n// fMP4 data-unit completion policy (BLO-13291)\nexport { isCompleteFmp4DataUnit } from './fmp4-completion.js'\n\n\n// The bc-provenance v2 surface (@blockcast/mmt-manifest-verify) is intentionally\n// NOT re-exported from the eager index barrel: it imports @noble/curves and\n// @noble/hashes, bare specifiers the moq-lib / shred / moqtail players (which\n// load the barrel as raw ESM via an import map) cannot resolve. Import it from\n// that package directly. The router's provenance hooks take it by type only.\n\n// H.264/AVC + H.265/HEVC Codec Utilities\nexport {\n type AvcCInfo,\n type AacAscInfo,\n type SpsPps,\n type FallbackAvcCOptions,\n type HevcParameterSets,\n type H264KeyframeDetectionOptions,\n type H264AvccSample,\n type H264SampleFormat,\n type H264NalUnitFormat,\n type H264NalUnitSample,\n extractAvcCFromInitSegment,\n extractAacAscFromInitSegment,\n normalizeMmtpInitSegment,\n generateFallbackAvcC,\n extractSpsPpsFromAvcC,\n avccToAnnexB,\n extractCodecDescriptionFromAnnexB,\n codecStringFromAvcC,\n isAnnexB,\n isCompleteAvccSample,\n findAnnexBStartCode,\n splitAnnexBNalUnits,\n annexBToAvcc,\n normalizeH264SampleToAvcc,\n splitH264SampleNalUnits,\n classifyH264Keyframe,\n detectH264Keyframe,\n mmtpTimestampToMicros,\n isFmp4InitSegment,\n wrapAdtsFrame,\n // HEVC (BLO-7764): build the hvcC description WebCodecs requires for length-prefixed H.265.\n isHevcCodec,\n removeEmulationPrevention,\n splitAvccNalUnits,\n extractHevcParameterSets,\n generateHvcCFromParameterSets,\n extractHevcCodecDescription,\n hevcVclOnly,\n // HEVC receive path (BLO-35597): catalog-selected family, IRAP keyframes,\n // SPS-derived codec string, MSE sample normalization.\n type VideoSampleEntry,\n type VideoCodecFamily,\n type HevcSpsInfo,\n type HevcCmafSample,\n videoSampleEntryFromCodecString,\n videoCodecFamily,\n HEVC_NAL_UNIT_TYPE,\n HEVC_NAL_HEADER_LENGTH,\n hevcNalUnitType,\n isHevcIrapNalUnitType,\n parseHevcSps,\n hevcCodecStringFromSps,\n classifyHevcKeyframe,\n detectHevcKeyframe,\n normalizeHevcSampleToLengthPrefixed,\n prepareHevcCmafSample,\n} from './codec-utils.js'\n\n// LOC FEC Extensions (draft-ramadan-moq-fec \u00A75.3, object extension 0x11)\nexport {\n LOCHeaderExtensionId,\n FEC_SS_ID_MAX,\n FEC_SOURCE_INFO_LEN,\n encodeFecSourceInfo,\n decodeFecSourceInfo,\n FecSourceInfo,\n AuthTag,\n} from './loc.js'\n\n// CARP Catalog Extensions (draft-law-ramadan-moq-carp-reliability \u00A73-4)\n// + Track Timing (draft-ramadan-moq-mmt-01 \u00A74.4.2)\nexport {\n type FecCatalogConfig,\n type FecInstanceConfig,\n type MulticastProtocol,\n type MulticastTrack,\n type MulticastTrackObject,\n type MulticastEndpoint,\n type AmtDiscovery,\n type MulticastCatalogConfig,\n type NetworkSource,\n isMulticastTrackObject,\n isMulticastEndpoint,\n isMulticastCatalogConfig,\n type TrackTimingConfig,\n isTrackTimingConfig,\n resolveGroupDurationTicks,\n resolveGroupDurationMs,\n validateSwitchingSetTiming,\n type CmsfCatalog,\n type CmsfCatalogErrorCode,\n CmsfCatalogValidationError,\n validateCmsfMmtpCatalog,\n type MmtpTrackIssue,\n type MmtpTrackIssueCode,\n mmtpTrackIssues,\n type ArchiveConfig,\n archiveOrigin,\n} from './carp-catalog.js'\n\n// Strict v2 multicast delivery catalog (DASH/HLS/MMTP routes), moved from\n// moqtail-private so players share one contract (BLO-47003).\nexport {\n normalizeDeliveryCatalog,\n type DeliveryPackaging,\n type DeliveryContentType,\n type DeliveryEndpoint,\n type DeliveryPolicy,\n type DeliveryObjectMapping,\n type DeliveryFec,\n type DeliveryRouteBase,\n type DashDeliveryRoute,\n type HlsDeliveryRoute,\n type MmtpDeliveryRoute,\n type DashDeliveryConfig,\n type HlsDeliveryConfig,\n type MmtpDeliveryConfig,\n type DeliveryMulticastBase,\n type DeliveryMulticastV2,\n type DeliveryCatalogV2,\n} from './delivery-catalog.js'\n\n// Multicast input contract \u2014 validator + builder for publisher-emitted\n// catalogs (draft-ramadan-moq-multicast-01 \u00A74.1, BLO-3323 A.1).\n// `multicastFromEnv` is the env-var helper used by FFmpeg and the\n// cast bridge (BLO-3337).\nexport {\n type MulticastInput,\n type MulticastEndpointInput,\n type MulticastInputErrorKind,\n MulticastInputError,\n multicastFromConfig,\n multicastFromEnv,\n} from './multicast-input.js'\n\n// Phase 14 catalog override hook (test harness injects\n// globalThis.__PHASE14_CATALOG_OVERRIDE; see 7point-validation.test.mjs)\nexport {\n type Phase14OverrideTrack,\n type Phase14CatalogOverride,\n getPhase14CatalogOverride,\n mergeOverrideIntoHangRenditions,\n mergeOverrideIntoCmsfTracks,\n} from './phase14-catalog-override.js'\n\n// Multicast Unwrap (container-aware MMTP dispatch)\nexport {\n type MulticastContainerContract,\n type MulticastContainerErrorCode,\n type FecPayloadId as MulticastFecPayloadId,\n type MulticastFrame,\n MulticastContainerContractError,\n validateMulticastContainerContract,\n unwrapMulticastPacket,\n} from './multicast-unwrap.js'\n\n// Timestamp Codec \u2014 container-format-agnostic timestamp encoding/decoding\nexport {\n type ContainerFormat,\n type LocHeader,\n encodeTimestamp,\n decodeTimestamp,\n getTimestampSize,\n decodeLocHeader,\n decodeLocTimestamp,\n encodeLocTimestamp,\n} from './timestamp-codec.js'\n\n// MMTP \u2192 CMAF conversion (draft-ramadan-moq-mmt \u00A75.3)\nexport {\n MmtpToCmaf,\n encodeDataSegment,\n encodeMultiSampleSegment,\n buildVideoInitSegment,\n buildHevcVideoInitSegment,\n buildAudioInitSegment,\n generateSilenceFrame,\n} from './mmtp-to-cmaf.js'\n\n// MMTP Signaling \u2014 packet type detection and classification\nexport {\n type PacketClass,\n getPacketType,\n isSignalingPacket,\n isSourcePacket,\n classifyPacket,\n} from './signaling.js'\n\n// FEC Block \u2192 CMAF Segment Assembler\nexport {\n CmafBlockAssembler,\n type CmafBlockSample,\n type CmafSampleOrderPolicy,\n type CmafSampleOrderStats,\n type CmafEmitStats,\n type CmafAudioConcealStats,\n type BlockAssemblerConfig,\n} from './cmaf-block-assembler.js'\n\n// MoQ Group \u2192 CMAF Segment Batcher\nexport {\n CmafGroupBatcher,\n type CmafGroupBatcherConfig,\n} from './cmaf-group-batcher.js'\n\n// FEC Manager (codec-agnostic FEC decode service)\nexport {\n FECManager,\n type FECManagerConfig,\n type FecDecoderUnavailableEvent,\n type FecDecoderUnavailableReason,\n type FecFallbackDecoder,\n type WasmFecDecoder,\n type FecStats,\n type FecSymbolSource,\n type DeliveryGapPath,\n type UnresolvedRepairOwnerDrops,\n type UnresolvedRepairOwnerReason,\n type MulticastSymbolDelivery,\n type UndelimitedIsoLoss,\n type ExpiredIsoHole,\n type IsoSpanFailure,\n type FecBlockResolution,\n type RepairVia,\n type FecRepairLayer,\n type FecFailClosedReason,\n type FecFailClosedEvent,\n} from './fec-manager.js'\n\n// MMTP Router (packet processing + frame routing)\nexport {\n MmtpRouter,\n KEYFRAME_LOST_TIMEOUT_SLACK,\n type FrameCallback,\n type FECManagerLike,\n type MmtpIngestSource,\n type MmtpIngressContext,\n type KeyframeOverlayLeg,\n type KeyframeOverlayFec,\n type KeyframeOverlayStats,\n KEYFRAME_OVERLAY_EXTENSION_TYPE,\n keyframeOverlaySsId,\n type MmtpStreamIdentity,\n type RoutedPacketMeta,\n type StagedStreamSwitch,\n type StreamSwitchCommit,\n type StreamSwitchCommitReason,\n type StreamSwitchOptions,\n type StreamSwitchPosition,\n type TrackPacketCallback,\n} from './mmtp-router.js'\n\n// MmtpContainerParser (unified, transport-agnostic)\nexport {\n MmtpContainerParser,\n type MmtpParserConfig,\n type MmtpParserRecord,\n type MmtpParserFeedStats,\n type MmtpFeedDropReason,\n type MmtpFeedOutcomeKey,\n type TrackInfo,\n type MmtpReorderStats,\n type MmtpRecoveredHeadTimingStats,\n type MmtpReorderFrameDiagnostics,\n type MmtpReorderStreamDiagnostics,\n type FrameMeta as ParserFrameMeta,\n type PacketInfo,\n type ParsedMmtpPacket,\n} from './mmtp-container-parser.js'\n\nexport {\n datagramMfuReassembly,\n reliableMoqMfuReassembly,\n mmtpFrameReorderWindowFrames,\n mfuReassemblyTimeoutMs,\n type MfuReassemblyPolicy,\n type MmtpTrackType,\n type ReliableMoqReassemblyOptions,\n} from './mfu-reassembly-policy.js'\n\nexport {\n WasmMfuReassembler,\n resolveGlobalMmtWasmBindings,\n type MmtWasmBindings,\n type WasmMfuReassemblerOptions,\n} from './wasm-mfu-reassembler.js'\n\nexport {\n createWasmMmtpContainerParser,\n type WasmMmtpParserConfig,\n} from './wasm-mmtp-container-parser.js'\n\n// Multicast Transport (SSM join/socket/watchdog)\nexport {\n MulticastTransport,\n type MulticastFailbackReason,\n type MulticastJoinDeclineReason,\n type MulticastJoinOutcome,\n type MulticastJoinProviderError,\n type MulticastJoinStats,\n type MulticastTransportConfig,\n type ResolvedMulticastTransport,\n} from './multicast-transport.js'\n\n// Multicast Manager (backwards-compat facade composing all three)\nexport {\n MulticastManager,\n forwardRepairLifecycleEvents,\n isRepairLifecycleEvent,\n REPAIR_LIFECYCLE_EVENT_TYPE,\n REPAIR_LIFECYCLE_LOG_PREFIX,\n type MulticastEndpointConfig,\n type DatagramLegDiagnostics,\n type DatagramLegPlayerCounters,\n type MultiTrackCatalog,\n type MultiTrackCatalogTrack,\n type WasmFecDecoderFactory,\n type RepairBlockIdentity,\n type RepairLifecycleApplicationEvent,\n type RepairLifecycleEventOptions,\n type RepairLifecycleEventFactory,\n type RepairLifecycleEventTarget,\n type RepairLifecycleSource,\n type RepairLifecycleEvent,\n type RepairLifecycleObserver,\n type RepairStreamIdentity,\n type BlockPolicyStats,\n type RenditionSwitch,\n type RenditionSwitchCancel,\n type RenditionSwitchRequest,\n type RenditionSwitchState,\n} from './multicast-manager.js'\n\n// Keyframe-protected FEC repair policy: block classification, repair\n// priority, and the stall/conceal decision every player applies.\nexport {\n BlockClassifier,\n decideGap,\n deriveBlockClassifierGeometry,\n keyframeIntervalMediaTicks,\n repairPriorityForClass,\n type BlockClass,\n type BlockClassifierGeometry,\n type BlockClassifierGeometryInput,\n type ClassifierChange,\n type ClassifierMode,\n type ClassifierReason,\n type DecideGapInput,\n type FrameGapAction,\n type FrameGapDecision,\n type FrameGapReason,\n type GapFrameEvidence,\n type GapStreamIdentity,\n type KeyframeInterval,\n type ReclassificationEvidence,\n type RepairPriority,\n type SourceSymbolEvidence,\n type TrackKind,\n} from './block-policy.js'\n\n// Sink-side concealment: hold last good frame, exact audio gap sizing.\nexport {\n AudioGapConcealer,\n HoldLastTimeline,\n videoConcealModeForCodec,\n type AudioAccessUnit,\n type AudioGapConcealerStats,\n type AudioGapPlan,\n type HoldLastTimelineOptions,\n type HoldLastTimelineStats,\n type TimelineEmit,\n type TimelineSample,\n type VideoConcealMode,\n} from './conceal-timeline.js'\n\n// FEC Worker Setup (shared fec-setup helper)\nexport {\n setupFecWorkerForTrack,\n type FecWorkerAssetUrls,\n type FecWorkerSetupOptions,\n type FecWorkerSetupResult,\n} from './fec-worker-setup.js'\n\n// Media Router (shared MoQ \u2194 multicast source arbitration)\nexport {\n MediaRouter,\n TrackSourceConflictError,\n type MediaRouterOptions,\n type TrackSource,\n type SetTrackSourceOptions,\n type MigrationPolicy,\n type FrameMeta as RouterFrameMeta,\n type FrameKind,\n type SourceKind,\n type DeltaFallbackConfig,\n} from './media-router.js'\nexport {\n resolveDeltaFallback,\n type ResolvedDeltaFallback,\n} from './delta-fallback-config.js'\n\n// Group-alignment primitive \u2014 shared with Go sender + Rust relay.\n// See align.ts docstring for cross-language contract. Authoritative form\n// is integer-ticks (groupIdForTicks); seconds-form is the legacy ramp.\nexport {\n groupIdForTicks,\n groupIdFor,\n secondsFromTicks,\n asSeconds,\n driftCheck,\n type Seconds,\n type DriftCheckResult,\n} from './align.js'\n\n// Audio Ring Buffer \u2014 DEPRECATED: canonical location is @blockcast/mmt-render/audio.\n// Kept here for backwards compat with consumers not yet migrated to mmt-render.\n// The mmt-render version includes warmup-delayed clock recovery + adaptive target fill.\nexport {\n AudioRingBuffer,\n type AudioRingBufferConfig,\n} from './audio-ring-buffer.js'\n\n// MMTP Decode Pipeline (MoQ + multicast unified decode path)\nexport {\n MmtpDecodePipeline,\n type PipelineFecClient,\n type PipelineConfig,\n type MmtpFeedStats,\n} from './mmtp-decode-pipeline.js'\n\n// Track Pipeline (per-track transport promotion + ABR)\nexport {\n TrackPipeline,\n type TrackTransport,\n type TrackTransportPreference,\n type TransportCapabilityReport,\n type TrackTransportResolution,\n type TrackSourceFactory,\n} from './track-pipeline.js'\n\n// Track Pipeline Setup (shared wiring helper for both players)\nexport {\n setupTrackPipeline,\n type TrackDescriptor,\n type SetupTrackPipelineOptions,\n type SetupTrackPipelineResult,\n} from './track-pipeline-setup.js'\n\n// Audio Init Data Parser (spec-compliant frame samples from initData)\nexport {\n parseAacFrameSamples,\n parseAacSampleRate,\n parseOpusFrameSamples,\n frameSamplesFromInit,\n} from './audio-init-parser.js'\n\n// Transport Pool (ref-counted subscription lifecycle, PIM)\nexport {\n TransportPool,\n type SubscriptionMode,\n type DirectSocketHealth,\n type Subscription,\n type SubscriptionStats,\n type AcquireOptions,\n type TransportPoolOptions,\n} from './transport-pool.js'\n\n// Track Session + Session Manager (per-track state machine, Patent Claim 9)\nexport {\n TrackSession,\n SessionManager,\n MAX_TAKEOVER_DEADLINE_MS,\n JOIN_DEFER_WARN_MS,\n computeFecDeliveryWindowMs,\n computeFecDeliveryWindowMediaUnits,\n computeFecLossWindowMs,\n type FecDeliveryWindowConfig,\n type TrackState,\n type TrackSessionConfig,\n type SessionManagerCallbacks,\n type MmtpTrackEvent,\n type MmtpSessionCallbacks,\n} from './track-session.js'\n\n// FEC starvation detector (post-cutover repair-only/no-progress detection,\n// drives TrackSession lossDetected/lossRecovered \u2014 BLO-9413/D4)\nexport {\n FecStarvationDetector,\n type FecStarvationSnapshot,\n type FecStarvationDetectorConfig,\n} from './fec-starvation-detector.js'\n\n// CMCD v2 Event-mode producer (CTA-5004-B, com.blockcast-* custom keys)\nexport {\n CmcdProducer,\n encodeCmcdRecord,\n type CmcdRecord,\n type CmcdToken,\n type CmcdValue,\n type CmcdProducerOptions,\n type SnapshotData,\n type TransportSnapshot,\n type TransportTransitionEvent,\n} from './cmcd-producer.js'\n\nexport {\n\tcatalogFecInterleaveMs,\n\tresolveCatalogTrackFec,\n\ttype CatalogTrackRef,\n\ttype FecInterleaveCatalog,\n\ttype GroupDurationCatalog,\n\ttype KeyframeCadenceCatalog,\n\ttype TrackFecParams,\n\ttype TrackFecUnavailable,\n\tcatalogTrackFecUnavailable,\n\tcatalogTrackDeliveryMode,\n\tcatalogGroupDurationMs,\n\tcatalogKeyframeCadenceMs,\n\tcatalogFecMediaUnitsPerSecond,\n\ttype GroupDurationRendition,\n\tresolveCatalogTrackGroupDurationMs,\n\tjoinedRepairSymbolCount,\n\tFEC_BLOCK_PROFILES,\n\tisFecBlockProfile,\n\tparseFecBlockProfile,\n\ttype FecBlockProfile,\n\tresolveRepairLayers,\n\tcatalogRepairTarget,\n\tDEFAULT_REPAIR_PRIORITY,\n\tMAX_ENCODING_SYMBOL_ID,\n\tMAX_RAPTORQ_SOURCE_SYMBOLS,\n\tMAX_REPAIR_SYMBOLS,\n\tREPAIR_PRIORITY_MAX,\n\tREPAIR_PRIORITY_MIN,\n\ttype RepairLayerCatalog,\n\ttype RepairLayerParams,\n\ttype RepairLayersResolution,\n\ttype RepairOverlayParams,\n\t// FEC catalog binding, draft-ramadan-moq-fec-catalog-00 array shape (BLO-50171).\n\tvalidateFecCatalog,\n\t// The report the runtime acts on, for hosts that publish it (BLO-55242).\n\truntimeFecCatalogReport,\n\ttype FecCatalogCode,\n\ttype FecCatalogInstance,\n\ttype FecCatalogIssue,\n\ttype FecCatalogOutcome,\n\ttype FecCatalogReceiver,\n\ttype FecCatalogReport,\n} from \"./catalog-fec-params.js\";\n\n// Typed FEC state (active with counters, or inactive with a reason) shared by\n// every player, resolved from catalog, transport policy, bridge and\n// subscription state rather than from counters.\nexport {\n\tFEC_INACTIVE_REASONS,\n\tcatalogDeclaresFec,\n\tresolveFecState,\n\ttype FecActiveState,\n\ttype FecInactiveReason,\n\ttype FecInactiveState,\n\ttype FecState,\n\ttype FecStateEvidence,\n\ttype FecTransportPolicy,\n\ttype NoFecCounters,\n} from \"./fec-state.js\";\n\n// Which mmtp sibling to subscribe (mmt-02 4.3.1), one implementation for every\n// player; vectors in test-vectors/moq/mmtp-mode-selection.json.\nexport {\n\tselectMmtpMode,\n\ttype MmtpModeChoice,\n\ttype MmtpModeOverride,\n\ttype MmtpModeReason,\n\ttype MmtpModeSelection,\n\ttype MmtpModeSelectionInput,\n} from \"./mmtp-mode-selection.js\";\n\n// When an \"mfu-datagram\" leg is taken and when it is handed back (mmt-02\n// 4.3.1): the delay target and the catalog FEC window, no constant. One\n// implementation for every player; vectors in test-vectors/catalog-timing.json.\nexport {\n\tcomputeDatagramLegDeadlines,\n\tDatagramLegWatch,\n\tdatagramLegRetryDelayMs,\n\ttype DatagramLegDeadlineInput,\n\ttype DatagramLegDeadlineReason,\n\ttype DatagramLegDeadlines,\n\ttype DatagramLegFecInstance,\n\ttype DatagramLegLimits,\n\ttype DatagramLegVerdict,\n\ttype DatagramLegWatchOptions,\n} from \"./datagram-leg-deadline.js\";\n\n// In-band AL-FEC for one MMTP asset over a MoQT subscription, for a player\n// that owns its own parser (the Shaka MSF MMTP packaging).\nexport {\n\tMmtpFecSession,\n\ttype MmtpFecSessionCatalogFec,\n\ttype MmtpFecSessionConfig,\n\ttype MmtpFecSessionDecoder,\n\ttype MmtpFecSessionDecoderConstructor,\n\ttype MmtpFecSessionMessageConfig,\n\ttype MmtpFecSessionMessageUpdate,\n\ttype MmtpFecSessionMixedPathStats,\n\ttype MmtpFecSessionPath,\n\ttype MmtpFecSessionPathCounts,\n\ttype MmtpFecSessionStats,\n} from \"./mmtp-fec-session.js\";\n// MoQ repair-layer subscriptions by measured loss (BLO-35456)\nexport {\n\tRepairLayerSubscriptions,\n\ttype MoqRepairDelivery,\n\ttype RepairLayerSource,\n\ttype RepairLayerSubscriptionsOptions,\n\ttype RepairLayerSubscriptionsSnapshot,\n\ttype RepairTrackSubscription,\n} from \"./repair-layer-subscriptions.js\";\n\nexport {\n\tcatalogAmtNetworkSource,\n\tcatalogAtsc3NetworkSource,\n\tDEFAULT_AMT_RELAY_PORT,\n\ttype AmtNetworkSource,\n\ttype Atsc3NetworkSource,\n\ttype CatalogNetworkSource,\n} from \"./catalog-network-source.js\";\n\n// D-28 shared repair-fetch shell (per-SBN on-demand MoQ FEC repair backfill)\nexport {\n wireRepairFetch,\n repairFetchSubscriberPriority,\n SOURCE_MEDIA_PRIORITY_MAX,\n type ResolveRepairTarget,\n type RepairTarget,\n type RepairFetchHost,\n type RepairFetchPriority,\n type RepairFetchRequest,\n type RepairFetchTransport,\n type RepairRangeFetchRequest,\n type RepairRangeFetchTransport,\n type RepairDeadlineBound,\n type RepairPriorityReason,\n type RepairSendMeasurement,\n type RepairSkipReason,\n type RepairStopReason,\n type RepairSubscribeCallback,\n type WireRepairFetchOptions,\n} from './repair-fetch.js'\n// MoQ repair group ids for iso-ssbg1-v1 blocks (BLO-35597): the 62-bit\n// wrap-epoch-extended SS_Start and the repair FETCH range for a lost SS_ID.\nexport {\n extSsStart,\n extendSsId,\n repairFetchRange,\n type RepairFetchRange,\n} from '@blockcast/mmt-fec'\nexport { DeliveryGapEstimator } from './delivery-gap.js'\n"],
|
|
5
|
-
"mappings": ";AAWA;AAAA,EAOE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAKP;AAAA,EAGE;AAAA,EACA;AAAA,OAEK;AAGP,SAAS,8BAA8B;AAUvC;AAAA,EAWE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAOA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP;AAAA,EAUE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EAGA;AAAA,EAEA;AAAA,
|
|
4
|
+
"sourcesContent": ["/**\n * @mmt/container - MMTP/LOC Container Parsing\n *\n * Shared container parsing library for MMT over MoQ and SSM.\n *\n * @packageDocumentation\n */\n\nexport type { AuthoredTiming } from './authored-timing.js'\n\n// MFU Reassembler\nexport {\n type MFUFragment,\n type ReassembledMFU,\n type ReassemblerStats,\n type MFUReassemblerOptions,\n type MfuReassemblerBackend,\n type MmtpSourcePath,\n MFUReassembler,\n isMfuReassemblyError,\n MfuReassemblyError,\n type MfuReassemblyErrorCode,\n createFragment,\n processMMTPWithReassembly,\n} from './mfu-reassembler.js'\n\n// Sample combiner: combines subsample data units (moqcast #37) of one\n// timed sample, each already reassembled by MFUReassembler, back into one\n// contiguous sample.\nexport {\n type CombinedSample,\n type SampleCombinerStats,\n SampleCombiner,\n SampleCombineError,\n type SampleCombineErrorCode,\n} from './sample-combiner.js'\n\n// fMP4 data-unit completion policy (BLO-13291)\nexport { isCompleteFmp4DataUnit } from './fmp4-completion.js'\n\n\n// The bc-provenance v2 surface (@blockcast/mmt-manifest-verify) is intentionally\n// NOT re-exported from the eager index barrel: it imports @noble/curves and\n// @noble/hashes, bare specifiers the moq-lib / shred / moqtail players (which\n// load the barrel as raw ESM via an import map) cannot resolve. Import it from\n// that package directly. The router's provenance hooks take it by type only.\n\n// H.264/AVC + H.265/HEVC Codec Utilities\nexport {\n type AvcCInfo,\n type AacAscInfo,\n type SpsPps,\n type FallbackAvcCOptions,\n type HevcParameterSets,\n type H264KeyframeDetectionOptions,\n type H264AvccSample,\n type H264SampleFormat,\n type H264NalUnitFormat,\n type H264NalUnitSample,\n extractAvcCFromInitSegment,\n extractAacAscFromInitSegment,\n normalizeMmtpInitSegment,\n generateFallbackAvcC,\n extractSpsPpsFromAvcC,\n avccToAnnexB,\n extractCodecDescriptionFromAnnexB,\n codecStringFromAvcC,\n isAnnexB,\n isCompleteAvccSample,\n findAnnexBStartCode,\n splitAnnexBNalUnits,\n annexBToAvcc,\n normalizeH264SampleToAvcc,\n splitH264SampleNalUnits,\n classifyH264Keyframe,\n detectH264Keyframe,\n mmtpTimestampToMicros,\n isFmp4InitSegment,\n wrapAdtsFrame,\n // HEVC (BLO-7764): build the hvcC description WebCodecs requires for length-prefixed H.265.\n isHevcCodec,\n removeEmulationPrevention,\n splitAvccNalUnits,\n extractHevcParameterSets,\n generateHvcCFromParameterSets,\n extractHevcCodecDescription,\n hevcVclOnly,\n // HEVC receive path (BLO-35597): catalog-selected family, IRAP keyframes,\n // SPS-derived codec string, MSE sample normalization.\n type VideoSampleEntry,\n type VideoCodecFamily,\n type HevcSpsInfo,\n type HevcCmafSample,\n videoSampleEntryFromCodecString,\n videoCodecFamily,\n HEVC_NAL_UNIT_TYPE,\n HEVC_NAL_HEADER_LENGTH,\n hevcNalUnitType,\n isHevcIrapNalUnitType,\n parseHevcSps,\n hevcCodecStringFromSps,\n classifyHevcKeyframe,\n detectHevcKeyframe,\n normalizeHevcSampleToLengthPrefixed,\n prepareHevcCmafSample,\n} from './codec-utils.js'\n\n// LOC FEC Extensions (draft-ramadan-moq-fec \u00A75.3, object extension 0x11)\nexport {\n LOCHeaderExtensionId,\n FEC_SS_ID_MAX,\n FEC_SOURCE_INFO_LEN,\n encodeFecSourceInfo,\n decodeFecSourceInfo,\n FecSourceInfo,\n AuthTag,\n} from './loc.js'\n\n// CARP Catalog Extensions (draft-law-ramadan-moq-carp-reliability \u00A73-4)\n// + Track Timing (draft-ramadan-moq-mmt-01 \u00A74.4.2)\nexport {\n type FecCatalogConfig,\n type FecInstanceConfig,\n type MulticastProtocol,\n type MulticastTrack,\n type MulticastTrackObject,\n type MulticastEndpoint,\n type AmtDiscovery,\n type MulticastCatalogConfig,\n type NetworkSource,\n isMulticastTrackObject,\n isMulticastEndpoint,\n isMulticastCatalogConfig,\n type TrackTimingConfig,\n isTrackTimingConfig,\n resolveGroupDurationTicks,\n resolveGroupDurationMs,\n validateSwitchingSetTiming,\n type CmsfCatalog,\n type CmsfCatalogErrorCode,\n CmsfCatalogValidationError,\n validateCmsfMmtpCatalog,\n type MmtpTrackIssue,\n type MmtpTrackIssueCode,\n mmtpTrackIssues,\n type ArchiveConfig,\n archiveOrigin,\n catalogEventTimelineTracks,\n type EventTimelineTrack,\n type EventTimelineTrackIssue,\n type EventTimelineTrackIssueCode,\n} from './carp-catalog.js'\n\n// Strict v2 multicast delivery catalog (DASH/HLS/MMTP routes), moved from\n// moqtail-private so players share one contract (BLO-47003).\nexport {\n normalizeDeliveryCatalog,\n type DeliveryPackaging,\n type DeliveryContentType,\n type DeliveryEndpoint,\n type DeliveryPolicy,\n type DeliveryObjectMapping,\n type DeliveryFec,\n type DeliveryRouteBase,\n type DashDeliveryRoute,\n type HlsDeliveryRoute,\n type MmtpDeliveryRoute,\n type DashDeliveryConfig,\n type HlsDeliveryConfig,\n type MmtpDeliveryConfig,\n type DeliveryMulticastBase,\n type DeliveryMulticastV2,\n type DeliveryCatalogV2,\n} from './delivery-catalog.js'\n\n// Multicast input contract \u2014 validator + builder for publisher-emitted\n// catalogs (draft-ramadan-moq-multicast-01 \u00A74.1, BLO-3323 A.1).\n// `multicastFromEnv` is the env-var helper used by FFmpeg and the\n// cast bridge (BLO-3337).\nexport {\n type MulticastInput,\n type MulticastEndpointInput,\n type MulticastInputErrorKind,\n MulticastInputError,\n multicastFromConfig,\n multicastFromEnv,\n} from './multicast-input.js'\n\n// Phase 14 catalog override hook (test harness injects\n// globalThis.__PHASE14_CATALOG_OVERRIDE; see 7point-validation.test.mjs)\nexport {\n type Phase14OverrideTrack,\n type Phase14CatalogOverride,\n getPhase14CatalogOverride,\n mergeOverrideIntoHangRenditions,\n mergeOverrideIntoCmsfTracks,\n} from './phase14-catalog-override.js'\n\n// Multicast Unwrap (container-aware MMTP dispatch)\nexport {\n type MulticastContainerContract,\n type MulticastContainerErrorCode,\n type FecPayloadId as MulticastFecPayloadId,\n type MulticastFrame,\n MulticastContainerContractError,\n validateMulticastContainerContract,\n unwrapMulticastPacket,\n} from './multicast-unwrap.js'\n\n// Timestamp Codec \u2014 container-format-agnostic timestamp encoding/decoding\nexport {\n type ContainerFormat,\n type LocHeader,\n encodeTimestamp,\n decodeTimestamp,\n getTimestampSize,\n decodeLocHeader,\n decodeLocTimestamp,\n encodeLocTimestamp,\n} from './timestamp-codec.js'\n\n// MMTP \u2192 CMAF conversion (draft-ramadan-moq-mmt \u00A75.3)\nexport {\n MmtpToCmaf,\n encodeDataSegment,\n encodeMultiSampleSegment,\n buildVideoInitSegment,\n buildHevcVideoInitSegment,\n buildAudioInitSegment,\n generateSilenceFrame,\n} from './mmtp-to-cmaf.js'\n\n// MMTP Signaling \u2014 packet type detection and classification\nexport {\n type PacketClass,\n getPacketType,\n isSignalingPacket,\n isSourcePacket,\n classifyPacket,\n} from './signaling.js'\n\n// FEC Block \u2192 CMAF Segment Assembler\nexport {\n CmafBlockAssembler,\n type CmafBlockSample,\n type CmafSampleOrderPolicy,\n type CmafSampleOrderStats,\n type CmafEmitStats,\n type CmafAudioConcealStats,\n type BlockAssemblerConfig,\n} from './cmaf-block-assembler.js'\n\n// MoQ Group \u2192 CMAF Segment Batcher\nexport {\n CmafGroupBatcher,\n type CmafGroupBatcherConfig,\n} from './cmaf-group-batcher.js'\n\n// FEC Manager (codec-agnostic FEC decode service)\nexport {\n FECManager,\n type FECManagerConfig,\n type FecDecoderUnavailableEvent,\n type FecDecoderUnavailableReason,\n type FecFallbackDecoder,\n type WasmFecDecoder,\n type FecStats,\n type FecSymbolSource,\n type DeliveryGapPath,\n type UnresolvedRepairOwnerDrops,\n type UnresolvedRepairOwnerReason,\n type MulticastSymbolDelivery,\n type UndelimitedIsoLoss,\n type ExpiredIsoHole,\n type IsoSpanFailure,\n type FecBlockResolution,\n type RepairVia,\n type FecRepairLayer,\n type FecFailClosedReason,\n type FecFailClosedEvent,\n} from './fec-manager.js'\n\n// MMTP Router (packet processing + frame routing)\nexport {\n MmtpRouter,\n KEYFRAME_LOST_TIMEOUT_SLACK,\n type FrameCallback,\n type FECManagerLike,\n type MmtpIngestSource,\n type MmtpIngressContext,\n type KeyframeOverlayLeg,\n type KeyframeOverlayFec,\n type KeyframeOverlayStats,\n KEYFRAME_OVERLAY_EXTENSION_TYPE,\n keyframeOverlaySsId,\n type MmtpStreamIdentity,\n type RoutedPacketMeta,\n type StagedStreamSwitch,\n type StreamSwitchCommit,\n type StreamSwitchCommitReason,\n type StreamSwitchOptions,\n type StreamSwitchPosition,\n type TrackPacketCallback,\n} from './mmtp-router.js'\n\n// MmtpContainerParser (unified, transport-agnostic)\nexport {\n MmtpContainerParser,\n type MmtpParserConfig,\n type MmtpParserRecord,\n type MmtpParserFeedStats,\n type MmtpFeedDropReason,\n type MmtpFeedOutcomeKey,\n type TrackInfo,\n type MmtpReorderStats,\n type MmtpRecoveredHeadTimingStats,\n type MmtpReorderFrameDiagnostics,\n type MmtpReorderStreamDiagnostics,\n type FrameMeta as ParserFrameMeta,\n type PacketInfo,\n type ParsedMmtpPacket,\n} from './mmtp-container-parser.js'\n\nexport {\n datagramMfuReassembly,\n reliableMoqMfuReassembly,\n mmtpFrameReorderWindowFrames,\n mfuReassemblyTimeoutMs,\n type MfuReassemblyPolicy,\n type MmtpTrackType,\n type ReliableMoqReassemblyOptions,\n} from './mfu-reassembly-policy.js'\n\nexport {\n WasmMfuReassembler,\n resolveGlobalMmtWasmBindings,\n type MmtWasmBindings,\n type WasmMfuReassemblerOptions,\n} from './wasm-mfu-reassembler.js'\n\nexport {\n createWasmMmtpContainerParser,\n type WasmMmtpParserConfig,\n} from './wasm-mmtp-container-parser.js'\n\n// Multicast Transport (SSM join/socket/watchdog)\nexport {\n MulticastTransport,\n type MulticastFailbackReason,\n type MulticastJoinDeclineReason,\n type MulticastJoinOutcome,\n type MulticastJoinProviderError,\n type MulticastJoinStats,\n type MulticastTransportConfig,\n type ResolvedMulticastTransport,\n} from './multicast-transport.js'\n\n// Multicast Manager (backwards-compat facade composing all three)\nexport {\n MulticastManager,\n forwardRepairLifecycleEvents,\n isRepairLifecycleEvent,\n REPAIR_LIFECYCLE_EVENT_TYPE,\n REPAIR_LIFECYCLE_LOG_PREFIX,\n type MulticastEndpointConfig,\n type DatagramLegDiagnostics,\n type DatagramLegPlayerCounters,\n type MultiTrackCatalog,\n type MultiTrackCatalogTrack,\n type WasmFecDecoderFactory,\n type RepairBlockIdentity,\n type RepairLifecycleApplicationEvent,\n type RepairLifecycleEventOptions,\n type RepairLifecycleEventFactory,\n type RepairLifecycleEventTarget,\n type RepairLifecycleSource,\n type RepairLifecycleEvent,\n type RepairLifecycleObserver,\n type RepairStreamIdentity,\n type BlockPolicyStats,\n type RenditionSwitch,\n type RenditionSwitchCancel,\n type RenditionSwitchRequest,\n type RenditionSwitchState,\n} from './multicast-manager.js'\n\n// Keyframe-protected FEC repair policy: block classification, repair\n// priority, and the stall/conceal decision every player applies.\nexport {\n BlockClassifier,\n decideGap,\n deriveBlockClassifierGeometry,\n keyframeIntervalMediaTicks,\n repairPriorityForClass,\n type BlockClass,\n type BlockClassifierGeometry,\n type BlockClassifierGeometryInput,\n type ClassifierChange,\n type ClassifierMode,\n type ClassifierReason,\n type MpuRuleOffReason,\n type DecideGapInput,\n type FrameGapAction,\n type FrameGapDecision,\n type FrameGapReason,\n type GapFrameEvidence,\n type GapStreamIdentity,\n type KeyframeInterval,\n type ReclassificationEvidence,\n type RepairPriority,\n type SourceSymbolEvidence,\n type TrackKind,\n} from './block-policy.js'\n\n// Sink-side concealment: hold last good frame, exact audio gap sizing.\nexport {\n AudioGapConcealer,\n HoldLastTimeline,\n videoConcealModeForCodec,\n type AudioAccessUnit,\n type AudioGapConcealerStats,\n type AudioGapPlan,\n type HoldLastTimelineOptions,\n type HoldLastTimelineStats,\n type TimelineEmit,\n type TimelineSample,\n type VideoConcealMode,\n} from './conceal-timeline.js'\n\n// The video feed gate: per-frame dependency statements, the decoder table,\n// and the one loss rule every player calls.\nexport {\n FRAME_NEEDS_KEYFRAME,\n VideoFeedGate,\n decodeFrameNeeds,\n decoderTolerance,\n type DecoderTolerance,\n type FrameNeeds,\n type FrameStatement,\n type GateAnswer,\n type GateFrame,\n type VideoFeedGateOptions,\n type VideoFeedGateStats,\n} from './feed-gate.js'\n\n// FEC Worker Setup (shared fec-setup helper)\nexport {\n setupFecWorkerForTrack,\n type FecWorkerAssetUrls,\n type FecWorkerSetupOptions,\n type FecWorkerSetupResult,\n} from './fec-worker-setup.js'\n\n// Media Router (shared MoQ \u2194 multicast source arbitration)\nexport {\n MediaRouter,\n TrackSourceConflictError,\n type MediaRouterOptions,\n type TrackSource,\n type SetTrackSourceOptions,\n type MigrationPolicy,\n type FrameMeta as RouterFrameMeta,\n type FrameKind,\n type SourceKind,\n type DeltaFallbackConfig,\n} from './media-router.js'\nexport {\n resolveDeltaFallback,\n type ResolvedDeltaFallback,\n} from './delta-fallback-config.js'\n\n// Group-alignment primitive \u2014 shared with Go sender + Rust relay.\n// See align.ts docstring for cross-language contract. Authoritative form\n// is integer-ticks (groupIdForTicks); seconds-form is the legacy ramp.\nexport {\n groupIdForTicks,\n groupIdFor,\n secondsFromTicks,\n asSeconds,\n driftCheck,\n type Seconds,\n type DriftCheckResult,\n} from './align.js'\n\n// Audio Ring Buffer \u2014 DEPRECATED: canonical location is @blockcast/mmt-render/audio.\n// Kept here for backwards compat with consumers not yet migrated to mmt-render.\n// The mmt-render version includes warmup-delayed clock recovery + adaptive target fill.\nexport {\n AudioRingBuffer,\n type AudioRingBufferConfig,\n} from './audio-ring-buffer.js'\n\n// MMTP Decode Pipeline (MoQ + multicast unified decode path)\nexport {\n MmtpDecodePipeline,\n type PipelineFecClient,\n type PipelineConfig,\n type MmtpFeedStats,\n} from './mmtp-decode-pipeline.js'\n\n// Track Pipeline (per-track transport promotion + ABR)\nexport {\n TrackPipeline,\n type TrackTransport,\n type TrackTransportPreference,\n type TransportCapabilityReport,\n type TrackTransportResolution,\n type TrackSourceFactory,\n} from './track-pipeline.js'\n\n// Track Pipeline Setup (shared wiring helper for both players)\nexport {\n setupTrackPipeline,\n type TrackDescriptor,\n type SetupTrackPipelineOptions,\n type SetupTrackPipelineResult,\n} from './track-pipeline-setup.js'\n\n// Audio Init Data Parser (spec-compliant frame samples from initData)\nexport {\n parseAacFrameSamples,\n parseAacSampleRate,\n parseOpusFrameSamples,\n frameSamplesFromInit,\n} from './audio-init-parser.js'\n\n// Transport Pool (ref-counted subscription lifecycle, PIM)\nexport {\n TransportPool,\n type SubscriptionMode,\n type DirectSocketHealth,\n type Subscription,\n type SubscriptionStats,\n type AcquireOptions,\n type TransportPoolOptions,\n} from './transport-pool.js'\n\n// Track Session + Session Manager (per-track state machine, Patent Claim 9)\nexport {\n TrackSession,\n SessionManager,\n MAX_TAKEOVER_DEADLINE_MS,\n JOIN_DEFER_WARN_MS,\n computeFecDeliveryWindowMs,\n computeFecDeliveryWindowMediaUnits,\n computeFecLossWindowMs,\n type FecDeliveryWindowConfig,\n type TrackState,\n type TrackSessionConfig,\n type SessionManagerCallbacks,\n type MmtpTrackEvent,\n type MmtpSessionCallbacks,\n} from './track-session.js'\n\n// FEC starvation detector (post-cutover repair-only/no-progress detection,\n// drives TrackSession lossDetected/lossRecovered \u2014 BLO-9413/D4)\nexport {\n FecStarvationDetector,\n type FecStarvationSnapshot,\n type FecStarvationDetectorConfig,\n} from './fec-starvation-detector.js'\n\n// CMCD v2 Event-mode producer (CTA-5004-B, com.blockcast-* custom keys)\nexport {\n CmcdProducer,\n encodeCmcdRecord,\n type CmcdRecord,\n type CmcdToken,\n type CmcdValue,\n type CmcdProducerOptions,\n type SnapshotData,\n type TransportSnapshot,\n type TransportTransitionEvent,\n} from './cmcd-producer.js'\n\nexport {\n\tcatalogFecInterleaveMs,\n\tresolveCatalogTrackFec,\n\ttype CatalogTrackRef,\n\ttype FecInterleaveCatalog,\n\ttype GroupDurationCatalog,\n\ttype KeyframeCadenceCatalog,\n\ttype TrackFecParams,\n\ttype TrackFecUnavailable,\n\tcatalogTrackFecUnavailable,\n\tcatalogTrackDeliveryMode,\n\tcatalogGroupDurationMs,\n\tcatalogKeyframeCadenceMs,\n\tcatalogFecMediaUnitsPerSecond,\n\ttype GroupDurationRendition,\n\tresolveCatalogTrackGroupDurationMs,\n\tjoinedRepairSymbolCount,\n\tFEC_BLOCK_PROFILES,\n\tisFecBlockProfile,\n\tparseFecBlockProfile,\n\ttype FecBlockProfile,\n\tresolveRepairLayers,\n\tcatalogRepairTarget,\n\tDEFAULT_REPAIR_PRIORITY,\n\tMAX_ENCODING_SYMBOL_ID,\n\tMAX_RAPTORQ_SOURCE_SYMBOLS,\n\tMAX_REPAIR_SYMBOLS,\n\tREPAIR_PRIORITY_MAX,\n\tREPAIR_PRIORITY_MIN,\n\ttype RepairLayerCatalog,\n\ttype RepairLayerParams,\n\ttype RepairLayersResolution,\n\ttype RepairOverlayParams,\n\t// FEC catalog binding, draft-ramadan-moq-fec-catalog-00 array shape (BLO-50171).\n\tvalidateFecCatalog,\n\t// The report the runtime acts on, for hosts that publish it (BLO-55242).\n\truntimeFecCatalogReport,\n\ttype FecCatalogCode,\n\ttype FecCatalogInstance,\n\ttype FecCatalogIssue,\n\ttype FecCatalogOutcome,\n\ttype FecCatalogReceiver,\n\ttype FecCatalogReport,\n} from \"./catalog-fec-params.js\";\n\n// Typed FEC state (active with counters, or inactive with a reason) shared by\n// every player, resolved from catalog, transport policy, bridge and\n// subscription state rather than from counters.\nexport {\n\tFEC_INACTIVE_REASONS,\n\tcatalogDeclaresFec,\n\tresolveFecState,\n\ttype FecActiveState,\n\ttype FecInactiveReason,\n\ttype FecInactiveState,\n\ttype FecState,\n\ttype FecStateEvidence,\n\ttype FecTransportPolicy,\n\ttype NoFecCounters,\n} from \"./fec-state.js\";\n\n// Which mmtp sibling to subscribe (mmt-02 4.3.1), one implementation for every\n// player; vectors in test-vectors/moq/mmtp-mode-selection.json.\nexport {\n\tselectMmtpMode,\n\ttype MmtpModeChoice,\n\ttype MmtpModeOverride,\n\ttype MmtpModeReason,\n\ttype MmtpModeSelection,\n\ttype MmtpModeSelectionInput,\n} from \"./mmtp-mode-selection.js\";\n\n// When an \"mfu-datagram\" leg is taken and when it is handed back (mmt-02\n// 4.3.1): the delay target and the catalog FEC window, no constant. One\n// implementation for every player; vectors in test-vectors/catalog-timing.json.\nexport {\n\tcomputeDatagramLegDeadlines,\n\tDatagramLegWatch,\n\tdatagramLegRetryDelayMs,\n\ttype DatagramLegDeadlineInput,\n\ttype DatagramLegDeadlineReason,\n\ttype DatagramLegDeadlines,\n\ttype DatagramLegFecInstance,\n\ttype DatagramLegLimits,\n\ttype DatagramLegVerdict,\n\ttype DatagramLegWatchOptions,\n} from \"./datagram-leg-deadline.js\";\n\n// In-band AL-FEC for one MMTP asset over a MoQT subscription, for a player\n// that owns its own parser (the Shaka MSF MMTP packaging).\nexport {\n\tMmtpFecSession,\n\ttype MmtpFecSessionCatalogFec,\n\ttype MmtpFecSessionConfig,\n\ttype MmtpFecSessionDecoder,\n\ttype MmtpFecSessionDecoderConstructor,\n\ttype MmtpFecSessionMessageConfig,\n\ttype MmtpFecSessionMessageUpdate,\n\ttype MmtpFecSessionMixedPathStats,\n\ttype MmtpFecSessionPath,\n\ttype MmtpFecSessionPathCounts,\n\ttype MmtpFecSessionStats,\n} from \"./mmtp-fec-session.js\";\n// MoQ repair-layer subscriptions by measured loss (BLO-35456)\nexport {\n\tRepairLayerSubscriptions,\n\ttype MoqRepairDelivery,\n\ttype RepairLayerSource,\n\ttype RepairLayerSubscriptionsOptions,\n\ttype RepairLayerSubscriptionsSnapshot,\n\ttype RepairTrackSubscription,\n} from \"./repair-layer-subscriptions.js\";\n\nexport {\n\tcatalogAmtNetworkSource,\n\tcatalogAtsc3NetworkSource,\n\tDEFAULT_AMT_RELAY_PORT,\n\ttype AmtNetworkSource,\n\ttype Atsc3NetworkSource,\n\ttype CatalogNetworkSource,\n} from \"./catalog-network-source.js\";\n\n// D-28 shared repair-fetch shell (per-SBN on-demand MoQ FEC repair backfill)\nexport {\n wireRepairFetch,\n repairFetchSubscriberPriority,\n SOURCE_MEDIA_PRIORITY_MAX,\n type ResolveRepairTarget,\n type RepairTarget,\n type RepairFetchHost,\n type RepairFetchPriority,\n type RepairFetchRequest,\n type RepairFetchTransport,\n type RepairRangeFetchRequest,\n type RepairRangeFetchTransport,\n type RepairDeadlineBound,\n type RepairPriorityReason,\n type RepairSendMeasurement,\n type RepairSkipReason,\n type RepairStopReason,\n type RepairSubscribeCallback,\n type WireRepairFetchOptions,\n} from './repair-fetch.js'\n// MoQ repair group ids for iso-ssbg1-v1 blocks (BLO-35597): the 62-bit\n// wrap-epoch-extended SS_Start and the repair FETCH range for a lost SS_ID.\nexport {\n extSsStart,\n extendSsId,\n repairFetchRange,\n type RepairFetchRange,\n} from '@blockcast/mmt-fec'\nexport { DeliveryGapEstimator } from './delivery-gap.js'\n"],
|
|
5
|
+
"mappings": ";AAWA;AAAA,EAOE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAKP;AAAA,EAGE;AAAA,EACA;AAAA,OAEK;AAGP,SAAS,8BAA8B;AAUvC;AAAA,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AAA,EAEA;AAAA,OAOM;AAKP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OAQM;AAIP;AAAA,EACC;AAAA,OAMM;AAKP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OAQM;AAIP;AAAA,EACC;AAAA,OAWM;AAEP;AAAA,EACC;AAAA,OAMM;AAEP;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,OAIM;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAgBK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,4BAA4B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -48,6 +48,17 @@ export declare class IsoBmffTimingResolver {
|
|
|
48
48
|
get evictedSampleCount(): number;
|
|
49
49
|
/** Typed reason for the most recent rejected movie fragment. */
|
|
50
50
|
get lastMovieFragmentRejection(): IsoBmffMovieFragmentRejection | null;
|
|
51
|
+
/**
|
|
52
|
+
* Decode times of the first and the last sample of the movie fragment that
|
|
53
|
+
* the most recent `addMovieFragment` parsed, or null when it parsed none. A
|
|
54
|
+
* `trun` lists samples in decode order, so these bound the fragment. It is
|
|
55
|
+
* set whether or not the fragment was then admitted: the caller knows that.
|
|
56
|
+
*/
|
|
57
|
+
get lastMovieFragmentDecodeSpan(): {
|
|
58
|
+
first: bigint;
|
|
59
|
+
last: bigint;
|
|
60
|
+
timescale: number;
|
|
61
|
+
} | null;
|
|
51
62
|
addInitialization(data: Uint8Array): boolean;
|
|
52
63
|
/**
|
|
53
64
|
* `recovered` marks an FEC-recovered copy. A recovered block hands back
|
|
@@ -58,6 +69,11 @@ export declare class IsoBmffTimingResolver {
|
|
|
58
69
|
*/
|
|
59
70
|
addMovieFragment(mpuSequenceNumber: number, data: Uint8Array, additionalSampleLimit?: number, recovered?: boolean): boolean;
|
|
60
71
|
sampleTiming(mpuSequenceNumber: number, movieFragmentSequenceNumber: number, sampleNumber: number): IsoBmffSampleTiming | null;
|
|
72
|
+
/**
|
|
73
|
+
* True when FT=1 declared exactly one sample for this movie fragment,
|
|
74
|
+
* pending or delivered. False once the fragment is forgotten.
|
|
75
|
+
*/
|
|
76
|
+
movieFragmentHoldsOneSample(mpuSequenceNumber: number, movieFragmentSequenceNumber: number): boolean;
|
|
61
77
|
consumeSample(mpuSequenceNumber: number, movieFragmentSequenceNumber: number, sampleNumber: number, expected: IsoBmffSampleTiming): boolean;
|
|
62
78
|
/**
|
|
63
79
|
* Free the budget slot of a sample that will never be delivered.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iso-bmff-timing.d.ts","sourceRoot":"","sources":["../src/iso-bmff-timing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqCH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAClC,iDAAiD;IACjD,UAAU,EAAE,MAAM,CAAA;IAClB,6EAA6E;IAC7E,gBAAgB,EAAE,MAAM,CAAA;IACxB,uDAAuD;IACvD,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,0BAA0B;IACzC,2BAA2B,EAAE,MAAM,CAAA;IACnC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAA;CACxC;AAED,MAAM,MAAM,6BAA6B,GAAG,SAAS,GAAG,QAAQ,CAAA;AAmNhE,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,UAAU,GACf,kBAAkB,GAAG,IAAI,CA8C3B;AA4LD,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,UAAU,EAChB,KAAK,EAA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