import { n as ServiceHandle, t as ServiceClientOptions } from "./service-rpc-BugpSF7V.mjs"; //#region src/video/decoder/decoder-types.d.ts /** Matches `hal::video::DecoderSourceFormat` enum strings. */ type VideoDecoderSourceFormat = 'H264' | 'MJPEG' | 'Max'; /** Matches `hal::video::DecoderSinkFormat` enum strings. */ type VideoDecoderSinkFormat = 'RGB565_LE' | 'RGB565_BE' | 'RGB888' | 'BGR888' | 'YUV420P' | 'YUV422P' | 'YUV422' | 'UYVY422' | 'O_UYY_E_VYY' | 'Max'; type VideoDecoderDisplayConfig = { output_name: string; source_name?: string; source_role?: string; x?: number; y?: number; draw_timeout_ms?: number; publish_sink_event?: boolean; }; type VideoDecoderConfig = { width?: number; height?: number; source_format?: VideoDecoderSourceFormat; sink_format?: VideoDecoderSinkFormat; enable_stream_mode?: boolean; enable_hw_acceleration?: boolean; display?: VideoDecoderDisplayConfig; }; /** Raw frame payload for `FeedFrame`. */ type VideoDecoderFrame = Uint8Array | ArrayBuffer | number[]; type VideoDecoderState = 'Closed' | 'Open' | 'Started' | 'Stopped'; //#endregion //#region src/video/decoder/decoder-client.d.ts /** Default registered name (`helper::VideoDecoder<0>::get_name()`). */ declare const VIDEO_DECODER_DEFAULT_SERVICE_NAME = "VideoDecoder0"; /** RPC function names (`helper::Video::DecoderFunctionId`). */ declare const VIDEO_DECODER_FUNCTIONS: { readonly Open: "Open"; readonly Close: "Close"; readonly Start: "Start"; readonly Stop: "Stop"; readonly FeedFrame: "FeedFrame"; }; type VideoDecoderClientOptions = ServiceClientOptions & { /** Override service instance name (default `VideoDecoder0`). */serviceName?: string; }; declare function isVideoDecoderAvailable(options?: VideoDecoderClientOptions): boolean; declare function openVideoDecoder(options?: VideoDecoderClientOptions): ServiceHandle; declare function closeVideoDecoder(handle: ServiceHandle, options?: VideoDecoderClientOptions): void; declare function openDecoder(handle: ServiceHandle, config: VideoDecoderConfig, options?: VideoDecoderClientOptions): void; declare function closeDecoder(handle: ServiceHandle, options?: VideoDecoderClientOptions): void; declare function startDecoder(handle: ServiceHandle, options?: VideoDecoderClientOptions): void; declare function stopDecoder(handle: ServiceHandle, options?: VideoDecoderClientOptions): void; declare function feedDecoderFrame(handle: ServiceHandle, frame: VideoDecoderFrame, options?: VideoDecoderClientOptions): void; //#endregion //#region src/video/decoder/decoder.d.ts type VideoDecoderModuleOptions = VideoDecoderClientOptions; /** * Inject a mock RPC host and reset the cached service handle (vitest / Node only). * * @param options - Client options, typically `{ host }` from `@brookesia/service/hosts/video-decoder` */ declare function configure(options: VideoDecoderModuleOptions): void; declare const decoder: { /** @returns `true` when video decoder service is registered */available(): boolean; /** Release the video decoder service binding. */ close(): void; /** * Open a decoding session. * * @param config - `{ source_format: 'MJPEG' | 'H264', enable_stream_mode, enable_hw_acceleration }` */ open(config: VideoDecoderConfig): void; /** Close the active decoding session (keeps service handle). */ closeDecoder(): void; /** Start the decoder pipeline. */ start(): void; /** Stop the decoder pipeline. */ stop(): void; /** * Feed one compressed frame into the decoder. * * @param frame - `Uint8Array` of JPEG/H264 NAL data */ feedFrame(frame: VideoDecoderFrame): void; }; //#endregion export { VideoDecoderFrame as _, VIDEO_DECODER_FUNCTIONS as a, VideoDecoderState as b, closeVideoDecoder as c, openDecoder as d, openVideoDecoder as f, VideoDecoderDisplayConfig as g, VideoDecoderConfig as h, VIDEO_DECODER_DEFAULT_SERVICE_NAME as i, feedDecoderFrame as l, stopDecoder as m, configure as n, VideoDecoderClientOptions as o, startDecoder as p, decoder as r, closeDecoder as s, VideoDecoderModuleOptions as t, isVideoDecoderAvailable as u, VideoDecoderSinkFormat as v, VideoDecoderSourceFormat as y }; //# sourceMappingURL=index-2QiR_3zS.d.mts.map