/**
 * VideoFrame - Represents a single frame of video
 * Implements the W3C WebCodecs VideoFrame interface
 */
import { VideoColorSpace, VideoColorSpaceInit } from './VideoColorSpace';
import { BufferSource, DOMRectReadOnly } from './types';
export type VideoPixelFormat = 'I420' | 'I420A' | 'I422' | 'I444' | 'NV12' | 'RGBA' | 'RGBX' | 'BGRA' | 'BGRX';
export interface PlaneLayout {
    offset: number;
    stride: number;
}
export interface VideoFrameInit {
    timestamp: number;
    duration?: number;
    format?: VideoPixelFormat;
    codedWidth?: number;
    codedHeight?: number;
    displayWidth?: number;
    displayHeight?: number;
    visibleRect?: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    colorSpace?: VideoColorSpaceInit;
}
export interface VideoFrameBufferInit extends VideoFrameInit {
    format: VideoPixelFormat;
    codedWidth: number;
    codedHeight: number;
}
export interface VideoFrameCopyToOptions {
    rect?: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    layout?: PlaneLayout[];
}
export declare class VideoFrame {
    private _native;
    private _closed;
    private _buffer;
    readonly format: VideoPixelFormat | null;
    readonly codedWidth: number;
    readonly codedHeight: number;
    readonly displayWidth: number;
    readonly displayHeight: number;
    readonly timestamp: number;
    readonly duration: number | null;
    readonly colorSpace: VideoColorSpace;
    readonly visibleRect: DOMRectReadOnly | null;
    constructor(data: BufferSource, init: VideoFrameBufferInit);
    constructor(image: VideoFrame, init?: VideoFrameInit);
    /**
     * Get the native frame handle (internal use only)
     */
    _getNative(): any;
    /**
     * Calculate the size in bytes needed to hold the frame data
     */
    allocationSize(options?: VideoFrameCopyToOptions): number;
    /**
     * Copy the frame data to a destination buffer
     */
    copyTo(destination: BufferSource, options?: VideoFrameCopyToOptions): Promise<PlaneLayout[]>;
    /**
     * Create a clone of this frame
     */
    clone(): VideoFrame;
    /**
     * Close the frame and release resources
     */
    close(): void;
    private _assertNotClosed;
    private _getPlaneLayouts;
}
//# sourceMappingURL=VideoFrame.d.ts.map