@blockcast/mmt-container 0.4.0 → 0.4.1-main.cbe342dbdd9c
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 +36 -20
- package/dist/align.d.ts +24 -18
- package/dist/align.d.ts.map +1 -1
- package/dist/align.js +23 -4
- package/dist/align.js.map +2 -2
- package/dist/browser-runtime.js +1839 -692
- package/dist/browser-runtime.js.map +4 -4
- package/dist/carp-catalog.d.ts +76 -39
- package/dist/carp-catalog.d.ts.map +1 -1
- package/dist/carp-catalog.js +321 -205
- package/dist/carp-catalog.js.map +3 -3
- package/dist/catalog-fec-params.d.ts +12 -4
- package/dist/catalog-fec-params.d.ts.map +1 -1
- package/dist/catalog-fec-params.js +40 -17
- package/dist/catalog-fec-params.js.map +3 -3
- package/dist/catalog-network-source.d.ts +28 -7
- package/dist/catalog-network-source.d.ts.map +1 -1
- package/dist/catalog-network-source.js +21 -1
- package/dist/catalog-network-source.js.map +2 -2
- package/dist/catalog-validator.d.ts +4 -3
- package/dist/catalog-validator.d.ts.map +1 -1
- package/dist/catalog-validator.js +0 -29
- package/dist/catalog-validator.js.map +3 -3
- package/dist/cmcd-producer.d.ts +8 -0
- package/dist/cmcd-producer.d.ts.map +1 -1
- package/dist/cmcd-producer.js +14 -0
- package/dist/cmcd-producer.js.map +2 -2
- package/dist/delivery-catalog.js +98 -234
- package/dist/delivery-catalog.js.map +4 -4
- package/dist/fec-manager.d.ts +121 -1
- package/dist/fec-manager.d.ts.map +1 -1
- package/dist/fec-manager.js +421 -66
- package/dist/fec-manager.js.map +3 -3
- package/dist/fec-state.d.ts +2 -1
- package/dist/fec-state.d.ts.map +1 -1
- package/dist/fec-state.js +18 -3
- package/dist/fec-state.js.map +3 -3
- package/dist/fec-worker-setup.d.ts +10 -0
- package/dist/fec-worker-setup.d.ts.map +1 -1
- package/dist/fec-worker-setup.js +15 -4
- package/dist/fec-worker-setup.js.map +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +2 -2
- package/dist/iso-block-locator.d.ts +39 -1
- package/dist/iso-block-locator.d.ts.map +1 -1
- package/dist/iso-block-locator.js +109 -17
- package/dist/iso-block-locator.js.map +3 -3
- package/dist/manifest-auth-plan.d.ts +26 -25
- package/dist/manifest-auth-plan.d.ts.map +1 -1
- package/dist/manifest-auth-plan.js +331 -1171
- package/dist/manifest-auth-plan.js.map +4 -4
- package/dist/mfu-reassembler.js +21 -13
- package/dist/mfu-reassembler.js.map +2 -2
- package/dist/mmtp-container-parser.d.ts.map +1 -1
- package/dist/mmtp-container-parser.js +93 -22
- package/dist/mmtp-container-parser.js.map +2 -2
- package/dist/mmtp-container-parser.no-modules.js +1137 -317
- package/dist/mmtp-container-parser.no-modules.js.map +4 -4
- package/dist/mmtp-decode-pipeline.js +93 -22
- package/dist/mmtp-decode-pipeline.js.map +2 -2
- package/dist/mmtp-fec-session.d.ts +159 -0
- package/dist/mmtp-fec-session.d.ts.map +1 -0
- package/dist/mmtp-fec-session.js +531 -0
- package/dist/mmtp-fec-session.js.map +7 -0
- package/dist/mmtp-router.d.ts +39 -6
- package/dist/mmtp-router.d.ts.map +1 -1
- package/dist/mmtp-router.js +184 -27
- package/dist/mmtp-router.js.map +2 -2
- package/dist/multicast-auth-catalog.d.ts +86 -92
- package/dist/multicast-auth-catalog.d.ts.map +1 -1
- package/dist/multicast-auth-catalog.js +347 -132
- package/dist/multicast-auth-catalog.js.map +4 -4
- package/dist/multicast-input.d.ts +31 -8
- package/dist/multicast-input.d.ts.map +1 -1
- package/dist/multicast-input.js +299 -35
- package/dist/multicast-input.js.map +3 -3
- package/dist/multicast-manager.d.ts +94 -5
- package/dist/multicast-manager.d.ts.map +1 -1
- package/dist/multicast-manager.js +877 -357
- package/dist/multicast-manager.js.map +4 -4
- package/dist/multicast-transport.d.ts +12 -2
- package/dist/multicast-transport.d.ts.map +1 -1
- package/dist/multicast-transport.js +108 -238
- package/dist/multicast-transport.js.map +4 -4
- package/dist/multicast-unwrap.js +21 -13
- package/dist/multicast-unwrap.js.map +2 -2
- package/dist/no-modules.d.ts +4 -1
- package/dist/no-modules.d.ts.map +1 -1
- package/dist/no-modules.js +1086 -301
- package/dist/no-modules.js.map +4 -4
- package/dist/phase14-catalog-override.d.ts +1 -1
- package/dist/phase14-catalog-override.d.ts.map +1 -1
- package/dist/phase14-catalog-override.js +2 -2
- package/dist/phase14-catalog-override.js.map +2 -2
- package/dist/repair-fetch.d.ts +81 -6
- package/dist/repair-fetch.d.ts.map +1 -1
- package/dist/repair-fetch.js +156 -31
- package/dist/repair-fetch.js.map +3 -3
- package/dist/repair-layers.d.ts +2 -0
- package/dist/repair-layers.d.ts.map +1 -1
- package/dist/repair-layers.js +19 -2
- package/dist/repair-layers.js.map +2 -2
- package/dist/sample-combiner.d.ts +7 -1
- package/dist/sample-combiner.d.ts.map +1 -1
- package/dist/sample-combiner.js +14 -2
- package/dist/sample-combiner.js.map +2 -2
- package/dist/signaling.d.ts +2 -2
- package/dist/signaling.d.ts.map +1 -1
- package/dist/signaling.js +3 -3
- package/dist/signaling.js.map +2 -2
- package/dist/source-auth.js +2710 -7
- package/dist/source-auth.js.map +4 -4
- package/dist/switching-set-alignment.d.ts +1 -1
- package/dist/switching-set-alignment.js.map +1 -1
- package/dist/timestamp-codec.js +21 -13
- package/dist/timestamp-codec.js.map +2 -2
- package/dist/wasm-mfu-reassembler.js.map +1 -1
- package/dist/wasm-mmtp-container-parser.js +93 -22
- package/dist/wasm-mmtp-container-parser.js.map +2 -2
- package/package.json +6 -9
- package/schemas/catalog.schema.json +133 -38
- package/src/align.ts +52 -21
- package/src/carp-catalog.ts +188 -68
- package/src/catalog-fec-params.ts +28 -3
- package/src/catalog-network-source.ts +49 -7
- package/src/catalog-validator.ts +4 -11
- package/src/cmcd-producer.ts +17 -0
- package/src/fec-manager.ts +452 -63
- package/src/fec-state.ts +11 -4
- package/src/fec-worker-setup.ts +30 -2
- package/src/index.ts +27 -10
- package/src/iso-block-locator.ts +110 -7
- package/src/manifest-auth-plan.ts +39 -91
- package/src/mmtp-container-parser.ts +75 -7
- package/src/mmtp-fec-session.ts +533 -0
- package/src/mmtp-router.ts +166 -7
- package/src/multicast-auth-catalog.ts +131 -238
- package/src/multicast-input.ts +148 -124
- package/src/multicast-manager.ts +267 -21
- package/src/multicast-transport.ts +17 -3
- package/src/no-modules.ts +7 -1
- package/src/phase14-catalog-override.ts +3 -3
- package/src/repair-fetch.ts +283 -39
- package/src/repair-layers.ts +22 -2
- package/src/sample-combiner.ts +15 -2
- package/src/signaling.ts +2 -2
- package/src/switching-set-alignment.ts +1 -1
- package/test-vectors/align.json +108 -32
- package/test-vectors/bc-provenance-v2.json +1526 -0
- package/test-vectors/catalog/README.md +71 -4
- package/test-vectors/catalog/negative/fec-block-profile-missing.json +1 -1
- package/test-vectors/catalog/negative/fec-block-profile-retired.json +1 -1
- package/test-vectors/catalog/negative/fec-block-profile-unknown.json +1 -1
- package/test-vectors/catalog/negative/fec-iso-symbol-size-below-floor.json +28 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-iso-symbol-size-13.json +28 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-k-plus-p-over-255.json +39 -0
- package/test-vectors/catalog/negative/fec-reed-solomon-overlay-over-255.json +40 -0
- package/test-vectors/catalog/negative/fec-repair-overlay-source-symbols-zero.json +43 -0
- package/test-vectors/catalog/negative/fec-repair-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-source-symbols-zero.json +28 -0
- package/test-vectors/catalog/negative/fec-symbol-size-zero.json +28 -0
- package/test-vectors/catalog/negative/init-data-inline-without-data.json +22 -0
- package/test-vectors/catalog/negative/mmtp-mode-mpu.json +15 -0
- package/test-vectors/catalog/negative/multicast-amt-dns-without-relay.json +37 -0
- package/test-vectors/catalog/negative/multicast-amt-driad-with-relay.json +38 -0
- package/test-vectors/catalog/negative/multicast-auth-asm-missing-sender-address.json +77 -0
- package/test-vectors/catalog/negative/multicast-auth-duplicate-first-epoch.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-duplicate-kid.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-auth-without-object-auth.json +38 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-auth.json +49 -0
- package/test-vectors/catalog/negative/multicast-auth-endpoint-missing-bandwidth.json +55 -0
- package/test-vectors/catalog/negative/multicast-auth-manifest-port-equals-port.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-manifest-timer-out-of-range.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-above-max.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-max-auth-delay-below-min.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-root-dotted-key.json +55 -0
- package/test-vectors/catalog/negative/multicast-auth-sender-address-on-ssm.json +57 -0
- package/test-vectors/catalog/negative/multicast-auth-version-1.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-version-3.json +56 -0
- package/test-vectors/catalog/negative/multicast-auth-version-missing.json +55 -0
- package/test-vectors/catalog/negative/multicast-endpoint-foreign-namespace-track.json +44 -0
- package/test-vectors/catalog/negative/multicast-endpoint-protocol-amt.json +38 -0
- package/test-vectors/catalog/negative/multicast-endpoint-protocol-atsc3.json +38 -0
- package/test-vectors/catalog/negative/presentation-anchor-unsafe.json +16 -0
- package/test-vectors/catalog/positive/fec-algorithm-unimplemented.json +29 -0
- package/test-vectors/catalog/positive/fec-iso-ssbg1.json +1 -1
- package/test-vectors/catalog/positive/fec-multicast.json +1 -1
- package/test-vectors/catalog/positive/fec-reed-solomon-layered.json +50 -0
- package/test-vectors/catalog/positive/mmt01-12-1-init-ref-anchor.json +29 -0
- package/test-vectors/catalog/positive/multicast-amt-discovery-omitted.json +37 -0
- package/test-vectors/catalog/positive/multicast-amt-dns-relay.json +38 -0
- package/test-vectors/catalog/positive/multicast-amt-manual-relay.json +3 -3
- package/test-vectors/catalog/{negative/multicast-endpoint-missing-protocol-and-source.json → positive/multicast-asm-unprotected.json} +10 -5
- package/test-vectors/catalog/positive/multicast-auth-asm-sender.json +78 -0
- package/test-vectors/catalog/positive/multicast-auth-rotation.json +39 -38
- package/test-vectors/catalog/positive/multicast-draft01-4-1-example.json +81 -0
- package/test-vectors/catalog/positive/multicast-draft01-7-2-6-example.json +70 -0
- package/test-vectors/catalog/positive/presentation-anchor-negative.json +27 -0
- package/test-vectors/catalog/section-codes.json +31 -1
- package/test-vectors/catalog-multicast-auth-v1.json +38 -20
- package/test-vectors/catalog-validation.json +101 -5
- package/test-vectors/catalog-validator-public-api.mjs +14 -9
- package/test-vectors/generate-bc-provenance-v2.mjs +252 -0
- package/dist/fec-codec.d.ts +0 -32
- package/dist/fec-codec.d.ts.map +0 -1
- package/dist/fec-codec.js +0 -47
- package/dist/fec-codec.js.map +0 -7
- package/src/fec-codec.ts +0 -61
package/dist/index.d.ts
CHANGED
|
@@ -21,13 +21,12 @@ export { MmtpToCmaf, encodeDataSegment, encodeMultiSampleSegment, buildVideoInit
|
|
|
21
21
|
export { type PacketClass, getPacketType, isSignalingPacket, isSourcePacket, classifyPacket, } from './signaling.js';
|
|
22
22
|
export { CmafBlockAssembler, type CmafBlockSample, type CmafSampleOrderPolicy, type CmafSampleOrderStats, type CmafEmitStats, type CmafAudioConcealStats, type BlockAssemblerConfig, } from './cmaf-block-assembler.js';
|
|
23
23
|
export { CmafGroupBatcher, type CmafGroupBatcherConfig, } from './cmaf-group-batcher.js';
|
|
24
|
-
export { FECManager, type FECManagerConfig, type FecDecoderUnavailableEvent, type FecDecoderUnavailableReason, type FecFallbackDecoder, type WasmFecDecoder, type FecStats, type MulticastSymbolDelivery, type FecBlockResolution, type RepairVia, } from './fec-manager.js';
|
|
24
|
+
export { FECManager, type FECManagerConfig, type FecDecoderUnavailableEvent, type FecDecoderUnavailableReason, type FecFallbackDecoder, type WasmFecDecoder, type FecStats, type MulticastSymbolDelivery, type UndelimitedIsoLoss, type FecBlockResolution, type RepairVia, type FecRepairLayer, type FecFailClosedReason, type FecFailClosedEvent, } from './fec-manager.js';
|
|
25
25
|
export { MmtpRouter, KEYFRAME_LOST_TIMEOUT_SLACK, type FrameCallback, type FECManagerLike, type MmtpIngressContext, type MmtpStreamIdentity, type RoutedPacketMeta, type StagedStreamSwitch, type StreamSwitchCommit, type StreamSwitchCommitReason, type StreamSwitchOptions, type StreamSwitchPosition, type TrackPacketCallback, } from './mmtp-router.js';
|
|
26
26
|
export { MmtpContainerParser, type MmtpParserConfig, type MmtpParserRecord, type MmtpParserFeedStats, type MmtpFeedDropReason, type MmtpFeedOutcomeKey, type TrackInfo, type MmtpReorderStats, type MmtpReorderFrameDiagnostics, type MmtpReorderStreamDiagnostics, type FrameMeta as ParserFrameMeta, type PacketInfo, type ParsedMmtpPacket, } from './mmtp-container-parser.js';
|
|
27
27
|
export { datagramMfuReassembly, reliableMoqMfuReassembly, mmtpFrameReorderWindowFrames, mfuReassemblyTimeoutMs, type MfuReassemblyPolicy, type MmtpTrackType, type ReliableMoqReassemblyOptions, } from './mfu-reassembly-policy.js';
|
|
28
28
|
export { WasmMfuReassembler, resolveGlobalMmtWasmBindings, type MmtWasmBindings, type WasmMfuReassemblerOptions, } from './wasm-mfu-reassembler.js';
|
|
29
29
|
export { createWasmMmtpContainerParser, type WasmMmtpParserConfig, } from './wasm-mmtp-container-parser.js';
|
|
30
|
-
export { type FecCodec, NoneCodec, ReedSolomonCodec, createFecCodec, } from './fec-codec.js';
|
|
31
30
|
export { MulticastTransport, type MulticastFailbackReason, type MulticastJoinDeclineReason, type MulticastJoinOutcome, type MulticastJoinProviderError, type MulticastJoinStats, type MulticastTransportConfig, type ResolvedMulticastTransport, } from './multicast-transport.js';
|
|
32
31
|
export { MulticastManager, forwardRepairLifecycleEvents, isRepairLifecycleEvent, REPAIR_LIFECYCLE_EVENT_TYPE, REPAIR_LIFECYCLE_LOG_PREFIX, type MulticastEndpointConfig, 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';
|
|
33
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';
|
|
@@ -45,10 +44,11 @@ export { TransportPool, type SubscriptionMode, type DirectSocketHealth, type Sub
|
|
|
45
44
|
export { TrackSession, SessionManager, MAX_TAKEOVER_DEADLINE_MS, JOIN_DEFER_WARN_MS, computeFecDeliveryWindowMs, computeFecDeliveryWindowMediaUnits, computeFecLossWindowMs, type FecDeliveryWindowConfig, type TrackState, type TrackSessionConfig, type SessionManagerCallbacks, type MmtpTrackEvent, type MmtpSessionCallbacks, } from './track-session.js';
|
|
46
45
|
export { FecStarvationDetector, type FecStarvationSnapshot, type FecStarvationDetectorConfig, } from './fec-starvation-detector.js';
|
|
47
46
|
export { CmcdProducer, type CmcdParams, type CmcdProducerOptions, type SnapshotData, type TransportSnapshot, type TransportTransitionEvent, } from './cmcd-producer.js';
|
|
48
|
-
export { catalogFecInterleaveMs, resolveCatalogTrackFec, type CatalogTrackRef, type FecInterleaveCatalog, type GroupDurationCatalog, type KeyframeCadenceCatalog, type TrackFecParams, type TrackFecUnavailable, catalogFecUnavailable, catalogFecAvailable, catalogFecDeclaresUnconfigurableInstance, locateCatalogFecSource, type CatalogFecRole, type CatalogFecSource, catalogGroupDurationMs, catalogKeyframeCadenceMs, catalogFecMediaUnitsPerSecond, type GroupDurationRendition, resolveCatalogTrackGroupDurationMs, joinedRepairSymbolCount, FEC_BLOCK_PROFILES, isFecBlockProfile, parseFecBlockProfile, readFecBlockProfile, type FecBlockProfile, resolveRepairLayers, catalogRepairTarget, assembleRepairLayers, assertRepairTrackReachable, repairReachability, type AssembleRepairLayersOptions, type RepairReachability, dependsTarget, describeRepairTrack, rejectRepairFieldsOnMediaTrack, rejectRepairTrackGeometry, REPAIR_TRACK_GEOMETRY_KEYS, REPAIR_TRACK_ONLY_KEYS, validateRepairTrackFields, RepairContractError, DEFAULT_REPAIR_PRIORITY, MAX_ENCODING_SYMBOL_ID, MAX_RAPTORQ_SOURCE_SYMBOLS, MAX_REPAIR_SYMBOLS, REPAIR_PRIORITY_MAX, REPAIR_PRIORITY_MIN, type RepairContractCode, type RepairContractFail, type RepairLayerCatalog, type RepairLayerParams, type RepairLayersResolution, type RepairOverlayParams, type RepairRenditionCatalog, type RepairSourceGeometry, type RepairTrackDescriptor, } from "./catalog-fec-params.js";
|
|
47
|
+
export { catalogFecInterleaveMs, resolveCatalogTrackFec, type CatalogTrackRef, type FecInterleaveCatalog, type GroupDurationCatalog, type KeyframeCadenceCatalog, type TrackFecParams, type TrackFecUnavailable, catalogFecUnavailable, catalogFecAvailable, catalogFecDeclaresUnconfigurableInstance, fecAlgorithmUnimplemented, locateCatalogFecSource, type CatalogFecRole, type CatalogFecSource, catalogGroupDurationMs, catalogKeyframeCadenceMs, catalogFecMediaUnitsPerSecond, type GroupDurationRendition, resolveCatalogTrackGroupDurationMs, joinedRepairSymbolCount, FEC_BLOCK_PROFILES, isFecBlockProfile, parseFecBlockProfile, readFecBlockProfile, type FecBlockProfile, resolveRepairLayers, catalogRepairTarget, assembleRepairLayers, assertRepairTrackReachable, repairReachability, type AssembleRepairLayersOptions, type RepairReachability, dependsTarget, describeRepairTrack, rejectRepairFieldsOnMediaTrack, rejectRepairTrackGeometry, REPAIR_TRACK_GEOMETRY_KEYS, REPAIR_TRACK_ONLY_KEYS, validateRepairTrackFields, RepairContractError, DEFAULT_REPAIR_PRIORITY, MAX_ENCODING_SYMBOL_ID, MAX_RAPTORQ_SOURCE_SYMBOLS, MAX_REPAIR_SYMBOLS, REPAIR_PRIORITY_MAX, REPAIR_PRIORITY_MIN, type RepairContractCode, type RepairContractFail, type RepairLayerCatalog, type RepairLayerParams, type RepairLayersResolution, type RepairOverlayParams, type RepairRenditionCatalog, type RepairSourceGeometry, type RepairTrackDescriptor, } from "./catalog-fec-params.js";
|
|
49
48
|
export { FEC_INACTIVE_REASONS, catalogDeclaresFec, resolveFecState, type FecActiveState, type FecInactiveReason, type FecInactiveState, type FecState, type FecStateEvidence, type FecTransportPolicy, type NoFecCounters, } from "./fec-state.js";
|
|
50
|
-
export {
|
|
51
|
-
export {
|
|
49
|
+
export { MmtpFecSession, type MmtpFecSessionCatalogFec, type MmtpFecSessionConfig, type MmtpFecSessionDecoder, type MmtpFecSessionDecoderConstructor, type MmtpFecSessionMixedPathStats, type MmtpFecSessionPath, type MmtpFecSessionPathCounts, type MmtpFecSessionStats, } from "./mmtp-fec-session.js";
|
|
50
|
+
export { catalogAmtNetworkSource, catalogAtsc3NetworkSource, DEFAULT_AMT_RELAY_PORT, type AmtNetworkSource, type Atsc3NetworkSource, type CatalogNetworkSource, } from "./catalog-network-source.js";
|
|
51
|
+
export { wireRepairFetch, repairFetchSubscriberPriority, SOURCE_MEDIA_PRIORITY_MAX, type ResolveRepairTarget, type RepairTarget, type RepairFetchHost, type RepairFetchPriority, type RepairFetchRequest, type RepairFetchTransport, type RepairRangeFetchRequest, type RepairRangeFetchTransport, type RepairDeadlineBound, type RepairPriorityReason, type RepairSendMeasurement, type RepairSkipReason, type RepairSubscribeCallback, type WireRepairFetchOptions, } from './repair-fetch.js';
|
|
52
52
|
export { extSsStart, extendSsId, repairFetchRange, type RepairFetchRange, } from '@blockcast/mmt-fec';
|
|
53
53
|
export { DeliveryGapEstimator } from './delivery-gap.js';
|
|
54
54
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;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,KAAK,cAAc,EACnB,cAAc,EACd,oBAAoB,EACpB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,cAAc,EACd,yBAAyB,GAC1B,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,cAAc,EACd,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,MAAM,sBAAsB,CAAA;AAG7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAc7D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,MAAM,EACX,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,EACrB,YAAY,EACZ,iCAAiC,EACjC,mBAAmB,EACnB,QAAQ,EACR,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,yBAAyB,EACzB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EAEb,WAAW,EACX,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,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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
|
@@ -145,11 +145,6 @@ import {
|
|
|
145
145
|
import {
|
|
146
146
|
createWasmMmtpContainerParser
|
|
147
147
|
} from "./wasm-mmtp-container-parser.js";
|
|
148
|
-
import {
|
|
149
|
-
NoneCodec,
|
|
150
|
-
ReedSolomonCodec,
|
|
151
|
-
createFecCodec
|
|
152
|
-
} from "./fec-codec.js";
|
|
153
148
|
import {
|
|
154
149
|
MulticastTransport
|
|
155
150
|
} from "./multicast-transport.js";
|
|
@@ -231,6 +226,7 @@ import {
|
|
|
231
226
|
catalogFecUnavailable,
|
|
232
227
|
catalogFecAvailable,
|
|
233
228
|
catalogFecDeclaresUnconfigurableInstance,
|
|
229
|
+
fecAlgorithmUnimplemented,
|
|
234
230
|
locateCatalogFecSource,
|
|
235
231
|
catalogGroupDurationMs,
|
|
236
232
|
catalogKeyframeCadenceMs,
|
|
@@ -266,8 +262,12 @@ import {
|
|
|
266
262
|
catalogDeclaresFec,
|
|
267
263
|
resolveFecState
|
|
268
264
|
} from "./fec-state.js";
|
|
265
|
+
import {
|
|
266
|
+
MmtpFecSession
|
|
267
|
+
} from "./mmtp-fec-session.js";
|
|
269
268
|
import {
|
|
270
269
|
catalogAmtNetworkSource,
|
|
270
|
+
catalogAtsc3NetworkSource,
|
|
271
271
|
DEFAULT_AMT_RELAY_PORT
|
|
272
272
|
} from "./catalog-network-source.js";
|
|
273
273
|
import {
|
|
@@ -315,20 +315,19 @@ export {
|
|
|
315
315
|
MfuReassemblyError,
|
|
316
316
|
MmtpContainerParser,
|
|
317
317
|
MmtpDecodePipeline,
|
|
318
|
+
MmtpFecSession,
|
|
318
319
|
MmtpRouter,
|
|
319
320
|
MmtpToCmaf,
|
|
320
321
|
MulticastContainerContractError,
|
|
321
322
|
MulticastInputError,
|
|
322
323
|
MulticastManager,
|
|
323
324
|
MulticastTransport,
|
|
324
|
-
NoneCodec,
|
|
325
325
|
REPAIR_LIFECYCLE_EVENT_TYPE,
|
|
326
326
|
REPAIR_LIFECYCLE_LOG_PREFIX,
|
|
327
327
|
REPAIR_PRIORITY_MAX,
|
|
328
328
|
REPAIR_PRIORITY_MIN,
|
|
329
329
|
REPAIR_TRACK_GEOMETRY_KEYS,
|
|
330
330
|
REPAIR_TRACK_ONLY_KEYS,
|
|
331
|
-
ReedSolomonCodec,
|
|
332
331
|
RepairContractError,
|
|
333
332
|
SOURCE_MEDIA_PRIORITY_MAX,
|
|
334
333
|
SampleCombineError,
|
|
@@ -349,6 +348,7 @@ export {
|
|
|
349
348
|
buildHevcVideoInitSegment,
|
|
350
349
|
buildVideoInitSegment,
|
|
351
350
|
catalogAmtNetworkSource,
|
|
351
|
+
catalogAtsc3NetworkSource,
|
|
352
352
|
catalogDeclaresFec,
|
|
353
353
|
catalogFecAvailable,
|
|
354
354
|
catalogFecDeclaresUnconfigurableInstance,
|
|
@@ -365,7 +365,6 @@ export {
|
|
|
365
365
|
computeFecDeliveryWindowMediaUnits,
|
|
366
366
|
computeFecDeliveryWindowMs,
|
|
367
367
|
computeFecLossWindowMs,
|
|
368
|
-
createFecCodec,
|
|
369
368
|
createFragment,
|
|
370
369
|
createWasmMmtpContainerParser,
|
|
371
370
|
datagramMfuReassembly,
|
|
@@ -393,6 +392,7 @@ export {
|
|
|
393
392
|
extractHevcCodecDescription,
|
|
394
393
|
extractHevcParameterSets,
|
|
395
394
|
extractSpsPpsFromAvcC,
|
|
395
|
+
fecAlgorithmUnimplemented,
|
|
396
396
|
findAnnexBStartCode,
|
|
397
397
|
forwardRepairLifecycleEvents,
|
|
398
398
|
frameSamplesFromInit,
|
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// source-auth (authenticated-manifest / Merkle) is intentionally NOT re-exported\n// from the eager index barrel. It statically imports blake3 from @noble/hashes,\n// and re-exporting it here pulls that bare specifier into every browser consumer\n// of @blockcast/mmt-container (the moq-lib / shred / moqtail players load the\n// barrel as raw ESM via an import map, where @noble/hashes has no mapping \u2192\n// \"Failed to resolve module specifier\". No browser player uses source-auth.)\n// Consumers that need it import the dedicated subpath: '@blockcast/mmt-container/source-auth'.\n// The same rule covers the @blockcast/mmt-manifest-verify surface (ManifestVerifier et al.):\n// import it from that package (or the subpath above) directly, never from this barrel.\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-00 \u00A74.4.4)\nexport {\n type FecAlgorithm,\n type FecCatalogConfig,\n isFecCatalogConfig,\n isFecCatalogGeometry,\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 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-00 \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 MulticastSymbolDelivery,\n type FecBlockResolution,\n type RepairVia,\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 MmtpIngressContext,\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 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// FEC Codec (generic, algorithm-pluggable)\nexport {\n type FecCodec,\n NoneCodec,\n ReedSolomonCodec,\n createFecCodec,\n} from './fec-codec.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 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 DeltaFallbackTrack,\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 Producer (x-bc-* vendor key telemetry, BLO-1044)\nexport {\n CmcdProducer,\n type CmcdParams,\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\tcatalogFecUnavailable,\n\tcatalogFecAvailable,\n\tcatalogFecDeclaresUnconfigurableInstance,\n\tlocateCatalogFecSource,\n\ttype CatalogFecRole,\n\ttype CatalogFecSource,\n\tcatalogGroupDurationMs,\n\tcatalogKeyframeCadenceMs,\n\tcatalogFecMediaUnitsPerSecond,\n\ttype GroupDurationRendition,\n\tresolveCatalogTrackGroupDurationMs,\n\tjoinedRepairSymbolCount,\n\tFEC_BLOCK_PROFILES,\n\tisFecBlockProfile,\n\tparseFecBlockProfile,\n\treadFecBlockProfile,\n\ttype FecBlockProfile,\n\tresolveRepairLayers,\n\tcatalogRepairTarget,\n\tassembleRepairLayers,\n\tassertRepairTrackReachable,\n\trepairReachability,\n\ttype AssembleRepairLayersOptions,\n\ttype RepairReachability,\n\tdependsTarget,\n\tdescribeRepairTrack,\n\trejectRepairFieldsOnMediaTrack,\n\trejectRepairTrackGeometry,\n\tREPAIR_TRACK_GEOMETRY_KEYS,\n\tREPAIR_TRACK_ONLY_KEYS,\n\tvalidateRepairTrackFields,\n\tRepairContractError,\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 RepairContractCode,\n\ttype RepairContractFail,\n\ttype RepairLayerCatalog,\n\ttype RepairLayerParams,\n\ttype RepairLayersResolution,\n\ttype RepairOverlayParams,\n\ttype RepairRenditionCatalog,\n\ttype RepairSourceGeometry,\n\ttype RepairTrackDescriptor,\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\nexport {\n\tcatalogAmtNetworkSource,\n\tDEFAULT_AMT_RELAY_PORT,\n\ttype AmtNetworkSource,\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 RepairPriorityReason,\n type RepairSkipReason,\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;AAcvC;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,EAGE;AAAA,EACA;AAAA,EAQA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AAIP;AAAA,EACE;AAAA,OAiBK;AAMP;AAAA,EAIE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EAKE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EAGE;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;AAGP;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,OAOK;AAGP;AAAA,EACE;AAAA,OAEK;AAGP;AAAA,EACE;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// source-auth (authenticated-manifest / Merkle) is intentionally NOT re-exported\n// from the eager index barrel. It statically imports blake3 from @noble/hashes,\n// and re-exporting it here pulls that bare specifier into every browser consumer\n// of @blockcast/mmt-container (the moq-lib / shred / moqtail players load the\n// barrel as raw ESM via an import map, where @noble/hashes has no mapping \u2192\n// \"Failed to resolve module specifier\". No browser player uses source-auth.)\n// Consumers that need it import the dedicated subpath: '@blockcast/mmt-container/source-auth'.\n// The same rule covers the @blockcast/mmt-manifest-verify surface (ManifestVerifier et al.):\n// import it from that package (or the subpath above) directly, never from this barrel.\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 FecAlgorithm,\n type FecCatalogConfig,\n isFecCatalogConfig,\n isFecCatalogGeometry,\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 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 MulticastSymbolDelivery,\n type UndelimitedIsoLoss,\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 MmtpIngressContext,\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 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 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 DeltaFallbackTrack,\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 Producer (x-bc-* vendor key telemetry, BLO-1044)\nexport {\n CmcdProducer,\n type CmcdParams,\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\tcatalogFecUnavailable,\n\tcatalogFecAvailable,\n\tcatalogFecDeclaresUnconfigurableInstance,\n\tfecAlgorithmUnimplemented,\n\tlocateCatalogFecSource,\n\ttype CatalogFecRole,\n\ttype CatalogFecSource,\n\tcatalogGroupDurationMs,\n\tcatalogKeyframeCadenceMs,\n\tcatalogFecMediaUnitsPerSecond,\n\ttype GroupDurationRendition,\n\tresolveCatalogTrackGroupDurationMs,\n\tjoinedRepairSymbolCount,\n\tFEC_BLOCK_PROFILES,\n\tisFecBlockProfile,\n\tparseFecBlockProfile,\n\treadFecBlockProfile,\n\ttype FecBlockProfile,\n\tresolveRepairLayers,\n\tcatalogRepairTarget,\n\tassembleRepairLayers,\n\tassertRepairTrackReachable,\n\trepairReachability,\n\ttype AssembleRepairLayersOptions,\n\ttype RepairReachability,\n\tdependsTarget,\n\tdescribeRepairTrack,\n\trejectRepairFieldsOnMediaTrack,\n\trejectRepairTrackGeometry,\n\tREPAIR_TRACK_GEOMETRY_KEYS,\n\tREPAIR_TRACK_ONLY_KEYS,\n\tvalidateRepairTrackFields,\n\tRepairContractError,\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 RepairContractCode,\n\ttype RepairContractFail,\n\ttype RepairLayerCatalog,\n\ttype RepairLayerParams,\n\ttype RepairLayersResolution,\n\ttype RepairOverlayParams,\n\ttype RepairRenditionCatalog,\n\ttype RepairSourceGeometry,\n\ttype RepairTrackDescriptor,\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// 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 MmtpFecSessionMixedPathStats,\n\ttype MmtpFecSessionPath,\n\ttype MmtpFecSessionPathCounts,\n\ttype MmtpFecSessionStats,\n} from \"./mmtp-fec-session.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 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;AAcvC;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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E;AAAA,EACA;AAAA,EACA;AAAA,OAeK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,SAAS,4BAA4B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,10 +22,19 @@ export type IsoRepairPlacement<T> = {
|
|
|
22
22
|
readonly block: IsoBlockRange;
|
|
23
23
|
readonly placed: readonly IsoPlacedSource<T>[];
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* With `deferIncompleteGaps`: the SS_IDs in front of `block` whose every
|
|
27
|
+
* repair was lost and some source too, kept as a pending hole instead of
|
|
28
|
+
* a span (see `closeHolesWithin`). `lostSsId` is the highest missing one.
|
|
29
|
+
*/
|
|
30
|
+
readonly hole?: {
|
|
31
|
+
readonly block: IsoBlockRange;
|
|
32
|
+
readonly lostSsId: number;
|
|
33
|
+
};
|
|
25
34
|
}
|
|
26
35
|
/** Not a block this stream can use; the repair symbol is dropped. */
|
|
27
36
|
| {
|
|
28
|
-
readonly status: 'conflict' | 'overlap' | 'stale';
|
|
37
|
+
readonly status: 'conflict' | 'overlap' | 'stale' | 'ahead';
|
|
29
38
|
readonly reason: string;
|
|
30
39
|
};
|
|
31
40
|
/**
|
|
@@ -43,6 +52,13 @@ export type IsoRepairPlacement<T> = {
|
|
|
43
52
|
*/
|
|
44
53
|
export declare class IsoBlockLocator<T> {
|
|
45
54
|
#private;
|
|
55
|
+
/**
|
|
56
|
+
* Keep a gap that is missing a source as a pending hole rather than a span,
|
|
57
|
+
* so a repair FETCHed for it (draft-ramadan-moq-fec §7.5) can still state
|
|
58
|
+
* its blocks. Set only while a range repair scheduler is wired; its owner
|
|
59
|
+
* must close every hole it is told about (`closeHolesWithin`).
|
|
60
|
+
*/
|
|
61
|
+
deferIncompleteGaps: boolean;
|
|
46
62
|
/**
|
|
47
63
|
* @param kMax the catalog maximum K (`sourceSymbols`), the bound on SSB_length.
|
|
48
64
|
* @param retentionBlocks how many blocks behind the newest position the
|
|
@@ -79,6 +95,10 @@ export declare class IsoBlockLocator<T> {
|
|
|
79
95
|
block: IsoBlockRange;
|
|
80
96
|
esi: number;
|
|
81
97
|
} | null;
|
|
98
|
+
/** Number of pending holes. */
|
|
99
|
+
get holeCount(): number;
|
|
100
|
+
/** The stated block (never a span) ending exactly at `end`. */
|
|
101
|
+
blockEndingAt(end: number): IsoBlockRange | undefined;
|
|
82
102
|
/** The known block or span starting exactly at `start`. */
|
|
83
103
|
blockAt(start: number): IsoBlockRange | undefined;
|
|
84
104
|
/** Known blocks and spans overlapping the SS_IDs strictly between `a` and `b`. */
|
|
@@ -103,8 +123,26 @@ export declare class IsoBlockLocator<T> {
|
|
|
103
123
|
* known block (a different length, or an overlap with another block or a
|
|
104
124
|
* span) fails closed: the repair symbol is dropped and no block changes.
|
|
105
125
|
* A newly stated block retires behind its SS_Start (see the class note).
|
|
126
|
+
* A block so far past `newest` that stating it would retire the position
|
|
127
|
+
* `newest` is refused as `ahead`. When `newest` is a placed block's SS_Start
|
|
128
|
+
* this is slightly conservative (retirement measures that block from its
|
|
129
|
+
* last SS_ID), dropping up to one block-length of repairs past the horizon
|
|
130
|
+
* until a source moves `newest`. Placing it would turn everything
|
|
131
|
+
* between into a repair-less span and leave every real repair behind it
|
|
132
|
+
* `stale`. Sources move `newest` (`hold`, `observe`), so after a real outage
|
|
133
|
+
* the first source back brings the next repair inside the horizon; until one
|
|
134
|
+
* arrives, a stream's repairs alone cannot pass it.
|
|
106
135
|
*/
|
|
107
136
|
placeRepair(start: number, length: number): IsoRepairPlacement<T>;
|
|
137
|
+
/**
|
|
138
|
+
* Turn every pending hole inside `[start, start + length)` into a
|
|
139
|
+
* repair-less span, claiming its held sources: its range FETCH ended, so
|
|
140
|
+
* nothing more will state its blocks. Returns the spans, in SS_ID order.
|
|
141
|
+
*/
|
|
142
|
+
closeHolesWithin(start: number, length: number): {
|
|
143
|
+
block: IsoBlockRange;
|
|
144
|
+
placed: IsoPlacedSource<T>[];
|
|
145
|
+
}[];
|
|
108
146
|
/**
|
|
109
147
|
* Retire every block and span whose last SS_ID, and every held source,
|
|
110
148
|
* lies more than `retentionBlocks` blocks behind `position`, with the shared
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iso-block-locator.d.ts","sourceRoot":"","sources":["../src/iso-block-locator.ts"],"names":[],"mappings":"AA6BA,4EAA4E;AAC5E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CACvB;AAED,kEAAkE;AAClE,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;CACpB;AAED,4EAA4E;AAC5E,MAAM,MAAM,kBAAkB,CAAC,CAAC,IAC5B;IACE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;IAC7B,+DAA+D;IAC/D,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9C,2EAA2E;IAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAA;KAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"iso-block-locator.d.ts","sourceRoot":"","sources":["../src/iso-block-locator.ts"],"names":[],"mappings":"AA6BA,4EAA4E;AAC5E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACv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AAkB,CAAC,CAAC,CAAC;IAoFjE;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,aAAa,CAAC;QAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAA;KAAE,EAAE;IAuBzG;;;;;OAKG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAuBxC,0DAA0D;IAC1D,KAAK,IAAI,IAAI;CAkBd"}
|
|
@@ -53,16 +53,6 @@ var ALL_ROLES = Object.freeze(["video", "audio"]);
|
|
|
53
53
|
|
|
54
54
|
// src/iso-block-locator.ts
|
|
55
55
|
var IsoBlockLocator = class _IsoBlockLocator {
|
|
56
|
-
/** Known blocks and spans, in serial order of their start. */
|
|
57
|
-
#blocks = [];
|
|
58
|
-
/** Held first-arrival sources whose block no repair has stated yet. */
|
|
59
|
-
#held = /* @__PURE__ */ new Map();
|
|
60
|
-
/** End of contiguous coverage: the SS_ID the next unknown block starts at. */
|
|
61
|
-
#coverageEnd;
|
|
62
|
-
#kMax;
|
|
63
|
-
#retentionBlocks;
|
|
64
|
-
#heldEvicted = 0;
|
|
65
|
-
#newest;
|
|
66
56
|
/**
|
|
67
57
|
* @param kMax the catalog maximum K (`sourceSymbols`), the bound on SSB_length.
|
|
68
58
|
* @param retentionBlocks how many blocks behind the newest position the
|
|
@@ -70,12 +60,35 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
70
60
|
* no locator exists without retention.
|
|
71
61
|
*/
|
|
72
62
|
constructor(kMax, retentionBlocks) {
|
|
63
|
+
/** Known blocks and spans, in serial order of their start. */
|
|
64
|
+
this.#blocks = [];
|
|
65
|
+
/** Held first-arrival sources whose block no repair has stated yet. */
|
|
66
|
+
this.#held = /* @__PURE__ */ new Map();
|
|
67
|
+
this.#heldEvicted = 0;
|
|
68
|
+
/** Pending holes (see `deferIncompleteGaps`): unstated, sources still held. */
|
|
69
|
+
this.#holes = [];
|
|
70
|
+
/**
|
|
71
|
+
* Keep a gap that is missing a source as a pending hole rather than a span,
|
|
72
|
+
* so a repair FETCHed for it (draft-ramadan-moq-fec §7.5) can still state
|
|
73
|
+
* its blocks. Set only while a range repair scheduler is wired; its owner
|
|
74
|
+
* must close every hole it is told about (`closeHolesWithin`).
|
|
75
|
+
*/
|
|
76
|
+
this.deferIncompleteGaps = false;
|
|
73
77
|
if (!Number.isSafeInteger(kMax) || kMax <= 0) {
|
|
74
78
|
throw new Error(`[IsoBlockLocator] maximum K must be a positive integer (got ${kMax})`);
|
|
75
79
|
}
|
|
76
80
|
this.#kMax = kMax;
|
|
77
81
|
this.#retentionBlocks = _IsoBlockLocator.#checkedRetention(retentionBlocks);
|
|
78
82
|
}
|
|
83
|
+
#blocks;
|
|
84
|
+
#held;
|
|
85
|
+
/** End of contiguous coverage: the SS_ID the next unknown block starts at. */
|
|
86
|
+
#coverageEnd;
|
|
87
|
+
#kMax;
|
|
88
|
+
#retentionBlocks;
|
|
89
|
+
#heldEvicted;
|
|
90
|
+
#newest;
|
|
91
|
+
#holes;
|
|
79
92
|
static #checkedRetention(retentionBlocks) {
|
|
80
93
|
if (!Number.isSafeInteger(retentionBlocks) || retentionBlocks <= 0) {
|
|
81
94
|
throw new Error(
|
|
@@ -138,6 +151,14 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
138
151
|
}
|
|
139
152
|
return null;
|
|
140
153
|
}
|
|
154
|
+
/** Number of pending holes. */
|
|
155
|
+
get holeCount() {
|
|
156
|
+
return this.#holes.length;
|
|
157
|
+
}
|
|
158
|
+
/** The stated block (never a span) ending exactly at `end`. */
|
|
159
|
+
blockEndingAt(end) {
|
|
160
|
+
return this.#blocks.find((block) => !block.span && isoBlockEnd(block.start, block.length) === end);
|
|
161
|
+
}
|
|
141
162
|
/** The known block or span starting exactly at `start`. */
|
|
142
163
|
blockAt(start) {
|
|
143
164
|
return this.#blocks.find((block) => block.start === start);
|
|
@@ -160,6 +181,9 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
160
181
|
coversBetween(a, b) {
|
|
161
182
|
if (this.#coverageEnd === void 0) return false;
|
|
162
183
|
if (!serial32Precedes(a, b) || serial32Distance(a, b) <= 1) return true;
|
|
184
|
+
const first = a + 1 >>> 0;
|
|
185
|
+
const count = serial32Distance(a, b) - 1;
|
|
186
|
+
if (this.#holes.some((hole) => isoRangesOverlap(first, count, hole.start, hole.length))) return false;
|
|
163
187
|
return serial32Precedes(b - 1 >>> 0, this.#coverageEnd);
|
|
164
188
|
}
|
|
165
189
|
/**
|
|
@@ -189,6 +213,15 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
189
213
|
* known block (a different length, or an overlap with another block or a
|
|
190
214
|
* span) fails closed: the repair symbol is dropped and no block changes.
|
|
191
215
|
* A newly stated block retires behind its SS_Start (see the class note).
|
|
216
|
+
* A block so far past `newest` that stating it would retire the position
|
|
217
|
+
* `newest` is refused as `ahead`. When `newest` is a placed block's SS_Start
|
|
218
|
+
* this is slightly conservative (retirement measures that block from its
|
|
219
|
+
* last SS_ID), dropping up to one block-length of repairs past the horizon
|
|
220
|
+
* until a source moves `newest`. Placing it would turn everything
|
|
221
|
+
* between into a repair-less span and leave every real repair behind it
|
|
222
|
+
* `stale`. Sources move `newest` (`hold`, `observe`), so after a real outage
|
|
223
|
+
* the first source back brings the next repair inside the horizon; until one
|
|
224
|
+
* arrives, a stream's repairs alone cannot pass it.
|
|
192
225
|
*/
|
|
193
226
|
placeRepair(start, length) {
|
|
194
227
|
if (!Number.isSafeInteger(length) || length <= 0 || length > this.#kMax) {
|
|
@@ -207,6 +240,22 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
207
240
|
}
|
|
208
241
|
return { status: "placed", block: known, placed: [] };
|
|
209
242
|
}
|
|
243
|
+
const pending = this.#holes.find((h) => isoBlockContains(h.start, h.length, start));
|
|
244
|
+
if (pending !== void 0) {
|
|
245
|
+
if (!isoBlockContains(pending.start, pending.length, serial32Add(start, length - 1))) {
|
|
246
|
+
return { status: "overlap", reason: `repair block ${start}+${length} runs past pending hole ${pending.start}+${pending.length}` };
|
|
247
|
+
}
|
|
248
|
+
this.#holes.splice(this.#holes.indexOf(pending), 1);
|
|
249
|
+
const before = serial32Distance(pending.start, start);
|
|
250
|
+
const afterStart = isoBlockEnd(start, length);
|
|
251
|
+
const after = pending.length - before - length;
|
|
252
|
+
if (before > 0) this.#holes.push({ start: pending.start, length: before, span: false });
|
|
253
|
+
if (after > 0) this.#holes.push({ start: afterStart, length: after, span: false });
|
|
254
|
+
const block2 = { start, length, span: false };
|
|
255
|
+
const placed2 = this.#claim(block2);
|
|
256
|
+
this.#blocks.push(block2);
|
|
257
|
+
return { status: "placed", block: block2, placed: placed2 };
|
|
258
|
+
}
|
|
210
259
|
for (const block2 of this.#blocks) {
|
|
211
260
|
if (isoBlockContains(block2.start, block2.length, start) || isoBlockContains(start, length, block2.start)) {
|
|
212
261
|
return {
|
|
@@ -215,7 +264,11 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
215
264
|
};
|
|
216
265
|
}
|
|
217
266
|
}
|
|
267
|
+
if (this.#newest !== void 0 && isoBlocksBehindLowerBound(this.#newest, start, this.#kMax) > this.#retentionBlocks) {
|
|
268
|
+
return { status: "ahead", reason: `repair block ${start}+${length} is past the retention horizon ahead of ${this.#newest}` };
|
|
269
|
+
}
|
|
218
270
|
let span;
|
|
271
|
+
let hole;
|
|
219
272
|
if (this.#coverageEnd === void 0) {
|
|
220
273
|
for (const ssId of this.#held.keys()) {
|
|
221
274
|
if (serial32Precedes(ssId, start)) this.#held.delete(ssId);
|
|
@@ -224,21 +277,51 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
224
277
|
} else if (serial32Precedes(start, this.#coverageEnd)) {
|
|
225
278
|
return { status: "stale", reason: `repair block ${start}+${length} precedes known coverage` };
|
|
226
279
|
} else if (start !== this.#coverageEnd) {
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
span:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
280
|
+
const gap = { start: this.#coverageEnd, length: serial32Distance(this.#coverageEnd, start) };
|
|
281
|
+
const lostSsId = this.deferIncompleteGaps ? this.#highestMissing(gap.start, gap.length) : void 0;
|
|
282
|
+
if (lostSsId !== void 0) {
|
|
283
|
+
const holeBlock = { ...gap, span: false };
|
|
284
|
+
this.#holes.push(holeBlock);
|
|
285
|
+
hole = { block: holeBlock, lostSsId };
|
|
286
|
+
} else {
|
|
287
|
+
const spanBlock = { ...gap, span: true };
|
|
288
|
+
span = { block: spanBlock, placed: this.#claim(spanBlock) };
|
|
289
|
+
this.#blocks.push(spanBlock);
|
|
290
|
+
}
|
|
234
291
|
}
|
|
235
292
|
const block = { start, length, span: false };
|
|
236
293
|
const placed = this.#claim(block);
|
|
237
294
|
this.#blocks.push(block);
|
|
238
295
|
this.#coverageEnd = isoBlockEnd(start, length);
|
|
239
296
|
this.retireBehind(start);
|
|
297
|
+
if (hole !== void 0) return { status: "placed", block, placed, hole };
|
|
240
298
|
return span === void 0 ? { status: "placed", block, placed } : { status: "placed", block, placed, span };
|
|
241
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* Turn every pending hole inside `[start, start + length)` into a
|
|
302
|
+
* repair-less span, claiming its held sources: its range FETCH ended, so
|
|
303
|
+
* nothing more will state its blocks. Returns the spans, in SS_ID order.
|
|
304
|
+
*/
|
|
305
|
+
closeHolesWithin(start, length) {
|
|
306
|
+
const closed = [];
|
|
307
|
+
for (const hole of [...this.#holes]) {
|
|
308
|
+
if (!isoBlockContains(start, length, hole.start)) continue;
|
|
309
|
+
this.#holes.splice(this.#holes.indexOf(hole), 1);
|
|
310
|
+
const spanBlock = { start: hole.start, length: hole.length, span: true };
|
|
311
|
+
closed.push({ block: spanBlock, placed: this.#claim(spanBlock) });
|
|
312
|
+
this.#blocks.push(spanBlock);
|
|
313
|
+
}
|
|
314
|
+
return closed.sort((x, y) => serial32Distance(start, x.block.start) - serial32Distance(start, y.block.start));
|
|
315
|
+
}
|
|
316
|
+
/** The highest SS_ID in the range no source is held for, or undefined when all are. */
|
|
317
|
+
#highestMissing(start, length) {
|
|
318
|
+
const steps = Math.min(length, this.#held.size + 1);
|
|
319
|
+
for (let i = 1; i <= steps; i++) {
|
|
320
|
+
const ssId = serial32Add(start, length - i);
|
|
321
|
+
if (!this.#held.has(ssId)) return ssId;
|
|
322
|
+
}
|
|
323
|
+
return void 0;
|
|
324
|
+
}
|
|
242
325
|
/**
|
|
243
326
|
* Retire every block and span whose last SS_ID, and every held source,
|
|
244
327
|
* lies more than `retentionBlocks` blocks behind `position`, with the shared
|
|
@@ -257,6 +340,11 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
257
340
|
this.#blocks.splice(i, 1);
|
|
258
341
|
}
|
|
259
342
|
}
|
|
343
|
+
for (let i = this.#holes.length - 1; i >= 0; i--) {
|
|
344
|
+
const hole = this.#holes[i];
|
|
345
|
+
const last = serial32Add(hole.start, hole.length - 1);
|
|
346
|
+
if (isoBlocksBehindLowerBound(last, position, this.#kMax) > horizon) this.#holes.splice(i, 1);
|
|
347
|
+
}
|
|
260
348
|
for (const ssId of [...this.#held.keys()]) {
|
|
261
349
|
if (isoBlocksBehindLowerBound(ssId, position, this.#kMax) > horizon) this.#held.delete(ssId);
|
|
262
350
|
}
|
|
@@ -265,6 +353,7 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
265
353
|
/** Forget everything (publisher restart, track reset). */
|
|
266
354
|
reset() {
|
|
267
355
|
this.#blocks.length = 0;
|
|
356
|
+
this.#holes.length = 0;
|
|
268
357
|
this.#held.clear();
|
|
269
358
|
this.#coverageEnd = void 0;
|
|
270
359
|
this.#newest = void 0;
|
|
@@ -280,6 +369,9 @@ var IsoBlockLocator = class _IsoBlockLocator {
|
|
|
280
369
|
return placed;
|
|
281
370
|
}
|
|
282
371
|
};
|
|
372
|
+
function isoRangesOverlap(aStart, aLength, bStart, bLength) {
|
|
373
|
+
return serial32Distance(aStart, bStart) < aLength || serial32Distance(bStart, aStart) < bLength;
|
|
374
|
+
}
|
|
283
375
|
export {
|
|
284
376
|
IsoBlockLocator
|
|
285
377
|
};
|