UNPKG

@meframe/core

Version:

Next generation media processing framework based on WebCodecs

11 lines 822 B
export type QuantizeStrategy = 'nearest' | 'floor' | 'ceil'; type TimeUs = number; export declare const MICROSECONDS_PER_SECOND = 1000000; export declare const DEFAULT_FRAME_TOLERANCE_US: TimeUs; export declare function normalizeFps(value?: number): number; export declare function frameDurationFromFps(fps?: number): TimeUs; export declare function frameIndexFromTimestamp(baseTimestampUs: TimeUs, timestampUs: TimeUs, fps?: number, strategy?: QuantizeStrategy): number; export declare function quantizeTimestampToFrame(timestampUs: TimeUs, baseTimestampUs: TimeUs, fps?: number, strategy?: QuantizeStrategy): TimeUs; export declare function isTimestampWithinFrame(targetTimeUs: TimeUs, frameTimestampUs: TimeUs, frameDurationUs: TimeUs, toleranceUs?: TimeUs): boolean; export {}; //# sourceMappingURL=time-utils.d.ts.map