/** * captureHdrHybridLoop — the hf#732 hybrid parallel layered path. * * Spreads per-frame DOM capture work across N DOM worker sessions (one * Chrome session per worker) and offloads the per-pixel shader-blend onto * a `worker_threads` pool. The encoder is fed via a frame-reorder buffer * so out-of-order worker completions still hit the muxer in ascending * index order. * * Restrictions enforced by `shouldUseHybridLayeredPath`: * - SDR only (HDR raw-frame sources are fd-bound to one worker). * - workerCount >= 2. * - Not every frame inside a transition window. * * Pool teardown is guaranteed in the outer `finally` regardless of which * path threw — see `runHybridLayeredFrameLoop`. The shader-blend pool is * spawned lazily (only when the composition has transitions); the DOM * worker sessions are always spawned. */ import { type CaptureOptions, type CaptureSession, type EngineConfig, type StreamingEncoder, createCaptureSession } from "@hyperframes/engine"; import type { FileServerHandle } from "../../fileServer.js"; import type { ProducerLogger } from "../../../logger.js"; import { type HdrCompositeContext, type HdrPerfCollector, type ProgressCallback, type RenderJob, type TransitionRange } from "../../renderOrchestrator.js"; export interface HybridLoopInput { job: RenderJob; cfg: EngineConfig; log: ProducerLogger; framesDir: string; width: number; height: number; totalFrames: number; nativeHdrIds: Set; nativeHdrImageIds: Set; hdrCompositeCtx: HdrCompositeContext; hdrPerf: HdrPerfCollector | undefined; hdrEncoder: StreamingEncoder; domSession: CaptureSession; fileServer: FileServerHandle; buildCaptureOptions: () => CaptureOptions; createRenderVideoFrameInjector: () => Parameters[3]; transitionRanges: TransitionRange[]; sceneElements: Record; compositeTransfer: "srgb" | "pq" | "hlg"; hdrTargetTransfer: "pq" | "hlg" | undefined; workerCount: number; debugDumpEnabled: boolean; debugDumpDir: string | null; assertNotAborted: () => void; onProgress?: ProgressCallback; } export declare function runHybridLayeredFrameLoop(input: HybridLoopInput): Promise; //# sourceMappingURL=captureHdrHybridLoop.d.ts.map