export interface RationalTime { readonly numerator: bigint; readonly denominator: bigint; } export interface RationalTimeInput { numerator: bigint | number | string; denominator: bigint | number | string; } export declare function rationalTime(input: RationalTimeInput): RationalTime; export declare function rationalTimeKey(input: RationalTimeInput): string; export declare function rationalTimeToSeconds(input: RationalTimeInput): number; export declare function parsePositiveNumber(source: string, field: string, allowZero?: boolean): number; export declare function parseInteger(source: string, field: string, options?: { positive?: boolean; nonNegative?: boolean; }): number; /** * Converts a V1 time literal to an integer frame using exact rational * arithmetic. Values between frame boundaries are rounded to the nearest frame; * ties round away from zero. Timeline calculations after this conversion only * use integers. */ export declare function parseTimeToFrames(source: string, fpsSource: string, field?: string): number; export declare function framesToSeconds(frames: number, fps: number): number; export declare function framesToFfmpegSeconds(frames: number, fpsSource: string): string; export declare function framesToSamples(frames: number, sampleRate: number, fpsSource: string): number; /** * Returns the smallest whole-frame duration that fully contains an audio * waveform. This deliberately rounds up so the subtitle never disappears * before its final audio sample. */ export declare function samplesToCoveringFrames(samples: number, sampleRate: number, fpsSource: string): number; export interface TimelinePhaseSample { readonly phase: "before" | "active" | "after"; readonly localTime: RationalTime; } /** Exact frame-start clock used by every DOM timeline caller. */ export declare class SampleClock { readonly fps: RationalTime; constructor(source: string | number | RationalTimeInput); frameStart(frame: number): RationalTime; frameAt(input: RationalTimeInput): number; toMilliseconds(input: RationalTimeInput): number; phase(input: RationalTimeInput, start: RationalTimeInput, duration: RationalTimeInput, fill: "none" | "forwards" | "backwards" | "both"): TimelinePhaseSample | undefined; } //# sourceMappingURL=time.d.ts.map