import type { DepthMap } from "supervision-js-core"; import { type RenderPreparationArtifactDiagnostics } from "#types/render-preparation"; import type { DepthClipOptions } from "./options"; /** A clip's exact frames around the frame at rest. */ export interface ExactFramesAtRest { get(index: number): DepthMap | undefined; /** * The playhead rests on `center`: once it has for `settleSeconds`, that * frame loads, then its neighbours nearest first, most of them the way the * playhead last moved, so a step lands on a frame already loaded. A later * call or `cancel` starts none of the frames not yet asked for; a frame * already loading finishes and is kept. */ settleOn(center: number): void; cancel(): void; /** Resolves once frame `index` is in, or `signal` aborts. */ landing(index: number, signal?: AbortSignal): Promise; diagnostics(): RenderPreparationArtifactDiagnostics; destroy(): void; } /** * Loads each frame once; a second ask shares the first. Frames are kept up * to `maxCacheBytes`, dropping the ones farthest from the frame on screen * first. */ export declare function createExactFramesAtRest(options: { readonly frameCount: number; readonly exactFrameBytes: number; readonly options: DepthClipOptions["exact"]; readonly load: (index: number, signal: AbortSignal) => Promise; /** A frame exact playback already holds, kept here without a second load. */ readonly loadedAhead: (index: number) => DepthMap | null; /** Loads run at once: one per decode worker. */ readonly concurrency: () => number; readonly onScreen: () => number | null; /** Which way the playhead last moved. */ readonly heading: () => -1 | 0 | 1; readonly timeAt: (index: number) => number; readonly onLanded: (index: number) => void; readonly onChange: () => void; /** What a frame that does not load leaves on screen, for its warning. */ readonly stillDrawn: string; }): ExactFramesAtRest; //# sourceMappingURL=exact-at-rest.d.ts.map