import type { HEVCFrame, HEVCStreamInfo, DecodeResult, DecoderOptions } from "./types.js"; /** * HEVC/H.265 Decoder — JavaScript wrapper for the WASM module. * * @example * ```ts * const decoder = await HEVCDecoder.create(); * const { frames, info } = decoder.decode(bitstreamBytes); * console.log(`${info.width}x${info.height}, ${frames.length} frames`); * decoder.destroy(); * ``` */ export declare class HEVCDecoder { private _m; private _api; private _dec; private constructor(); /** * Create a new decoder instance. Loads the WASM module. */ static create(options?: DecoderOptions): Promise; /** * Decode a complete HEVC bitstream. * @param data Raw .265 bitstream bytes */ decode(data: Uint8Array): DecodeResult; /** Number of decoded frames available */ get frameCount(): number; /** Get stream info (available after decode) */ get info(): HEVCStreamInfo | null; private _extractFrame; private _extractDrainedFrame; private _readFrameFromPtr; private _extractInfo; /** * Feed a chunk of data containing one or more complete NAL units. * The decoder accumulates parameter sets and decodes pictures incrementally. * Call drain() after each feed() to retrieve output-ready frames. */ feed(data: Uint8Array): void; /** * Drain output-ready frames from the decoder (§C.5.2 bumping process). * Returns frames in display order, only when ready per DPB constraints. * Frames are valid until the next feed() or destroy() call. */ drain(): HEVCFrame[]; /** * Flush all remaining frames from the DPB (call at end of stream). * Returns all buffered frames in display order. */ flush(): HEVCFrame[]; /** Release decoder resources */ destroy(): void; } //# sourceMappingURL=decoder.d.ts.map