import type { VideoFrameMessage } from './protocol';
import { ILogger } from './logger';
export declare enum FrameType {
    KeyFrame = 0,
    DeltaFrame = 1
}
/**
 * Decoder class responsible for decoding video frames and rendering them using WebGL.
 */
export declare class DecoderWithWorker {
    private readonly _canvas;
    private readonly _renderer;
    private readonly _logger;
    private _firstDecoded;
    private _skipUntil;
    private _queue;
    private _pendingFrame;
    private _renderId;
    private _decodeId;
    private _worker;
    /**
     * Indicates whether the decoder is ready and configured.
     * @returns {boolean} True if the decoder is configured, false otherwise.
     */
    get ready(): boolean;
    /**
     * Creates an instance of the Decoder class.
     * @param originalCanvas - The original HTML canvas element.
     * @param logger - Logger for logging messages and errors.
     */
    constructor(originalCanvas: HTMLCanvasElement, logger: ILogger);
    sendFrameToWorker(frame: VideoFrameMessage): void;
    /**
     * Indicates whether the decoder is currently paused.
     * @returns {boolean} True if paused, false otherwise.
     */
    get paused(): boolean;
    /**
     * Pauses the decoder and renderer.
     */
    stop(): void;
    /**
     * Resumes the decoder and renderer.
     */
    start(): void;
    /**
     * Clears decoding and rendering callbacks.
     */
    private _clearCallbacks;
    /**
     * Enqueues a video frame message for decoding.
     * @param frame - The video frame message to enqueue.
     */
    enqueue(frame: VideoFrameMessage): void;
    /**
     * Decodes enqueued video frame messages.
     */
    decode(): void;
    /**
     * Clears the decoder and renderer, resetting the internal state.
     */
    clear(): void;
    /**
     * Disposes of the decoder, releasing resources.
     */
    dispose(): void;
    /**
     * Cleans up the renderer and clears the frame queue.
     */
    private _cleanUp;
    /**
     * Animation loop for rendering frames.
     */
    private animate;
    /**
     * Handles rendering of a decoded video frame.
     * @param frame - The decoded video frame.
     */
    private renderFrame;
}
