/** * Low Overhead Container (LOC): encode and decode codec bitstreams framed with * per-frame timestamp and timescale metadata for MoQ. * * @module */ import * as Moq from "@moq/net"; import { Time } from "@moq/net"; /** A decoded LOC frame: the codec bitstream plus its timing metadata. */ export interface Frame { /** The codec bitstream payload, with the LOC property block stripped. */ payload: Uint8Array; /** Presentation timestamp in microseconds. */ timestamp: Time.Micro; /** True if this frame can be decoded without any preceding frames. */ keyframe: boolean; } /** * Decoder for the Low Overhead Container (LOC) defined in * draft-ietf-moq-loc. * * Each MoQ frame is a small property block (timestamp, optional per-frame * timescale) followed by the codec bitstream payload. Frames without a 0x08 * timescale property are interpreted as microseconds. */ export declare class Format { /** Decode one moq-net frame into its LOC frames. Throws on malformed input. */ decode(frame: Uint8Array): Frame[]; } /** A payload that can be copied into a buffer without first materializing a Uint8Array. */ export interface Source { /** Size in bytes of the payload. */ byteLength: number; /** Copy the payload into the provided buffer. */ copyTo(buffer: Uint8Array): void; } /** * Encoder that packages frames as LOC and writes them to a moq-net track. * * Each call to {@link encode} produces one moq-net frame containing a * property block with the 0x06 timestamp (in microseconds) and the codec * bitstream payload. */ export declare class Producer { #private; constructor(track: Moq.Track.Producer); /** Encode one frame and write it to the track. Keyframes start a new group. */ encode(data: Uint8Array | Source, timestamp: Time.Micro, keyframe: boolean): void; /** Close the current group and the underlying track, optionally with an error. */ close(err?: Error): void; } //# sourceMappingURL=index.d.ts.map