export interface Libde265SoftDecoderOptions {
    container: HTMLElement;
    onPlaying?: () => void;
    onPaused?: () => void;
    onError?: (error: Error) => void;
}
type Libde265Decoder = {
    disable_filters: (disable: boolean) => void;
    set_image_callback: (cb: (img: Libde265Image) => void) => void;
    push_data: (data: Uint8Array, pts: number) => void;
    decode: (cb: (err: number) => void) => void;
    has_more: () => boolean;
    reset: () => void;
    free: () => void;
};
type Libde265Image = {
    get_width: () => number;
    get_height: () => number;
    display: (imageData: ImageData, cb: (rgb: ImageData) => void) => void;
    free: () => void;
};
type Libde265Namespace = {
    Decoder?: new () => Libde265Decoder;
    DE265_ERROR_WAITING_FOR_INPUT_DATA?: number;
    de265_isOK?: (err: number) => number;
    de265_get_error_text?: (err: number) => string;
};
declare global {
    interface Window {
        libde265?: Libde265Namespace;
    }
}
export declare class Libde265SoftDecoder {
    private container;
    private canvas;
    private ctx;
    private decoder;
    private demuxer;
    private abortController;
    private running;
    private paused;
    private imageData;
    private pendingFrame;
    private decodeScheduled;
    private pauseWaiters;
    private onPlaying?;
    private onPaused?;
    private onError?;
    constructor(options: Libde265SoftDecoderOptions);
    static isAvailable(): boolean;
    private waitContainerReady;
    private createDecoder;
    /**
     * 安排一次异步 decode 调用：避免频繁同步 decode 阻塞主线程，
     * 同时在 has_more() 为真时串联下一轮解码。
     */
    private scheduleDecode;
    /**
     * 使用 requestAnimationFrame 启动渲染循环：只要 running 为真，就消费最新一帧并绘制到 canvas。
     */
    private startRenderLoop;
    play(url: string): Promise<void>;
    private waitWhilePaused;
    private resolvePauseWaiters;
    pause(): void;
    resume(): void;
    stop(): void;
    private stopInternal;
    destroy(): void;
    isRunning(): boolean;
    isPaused(): boolean;
}
export {};
