@diffusionstudio/core
Version:
A fast, browser based video compositing engine powered by WebCodecs
26 lines (25 loc) • 757 B
TypeScript
import { WrappedCanvas } from 'mediabunny';
import { VideoSource } from '../../sources';
export declare class VideoDecoder {
private source;
private hasCache;
private seeking;
private canvasSink;
private packetSink;
private iterator;
private currentFrame;
private nextFrame;
private frameCache;
private cacheCanvasWidth;
private cacheCanvasHeight;
private nextKeyPacket;
private lastValue;
private frameRate;
private preseekTime;
constructor(source: VideoSource, hasCache: boolean);
init(): Promise<void>;
private getCacheEntryFor;
seekTo(relativeTime: number): Promise<void>;
getBestFrameFor(relativeTime: number): WrappedCanvas | OffscreenCanvas | null;
reset(): void;
}