import type { MessageEvent } from "@foxglove/studio-base/players/types";
import { type TopicSizes } from "./deserialization/detections/detection.js";
import type { NeuralCameraIntrinsics } from "./deserialization/pointcloud/utils.js";
import { type TopicDecoders } from "./deserialization/video/h264.js";
import type { FoxgloveMessage } from "../connection/communicator";
import { type EncodedFrame } from "../protobuf.generated/EncodedFrame.js";
import { IMUData } from "../protobuf.generated/IMUData.js";
import type { ImageAnnotations } from "../protobuf.generated/ImageAnnotations.js";
import type { ImgDetections } from "../protobuf.generated/ImgDetections.js";
import { type ImgFrame } from "../protobuf.generated/ImgFrame.js";
import type { PointCloudData } from "../protobuf.generated/PointCloudData.js";
import type { SpatialImgDetections } from "../protobuf.generated/SpatialImgDetections.js";
import { ConfigStore } from "../utils/config-store";
import { type DecodingErrorCode } from "../utils/error";
import { RGBDData } from "../protobuf.generated/RGBDData.js";
export type DeserializeDepthAiMessageArgs = {
    topic: string;
    topicDecoders: TopicDecoders;
    neuralCameraIntrinsics: NeuralCameraIntrinsics;
    maxSteroDepth: number;
    topicSizes: TopicSizes;
    callback: (event: MessageEvent) => void;
    onError: (error: Error) => void;
} & ({
    type: "imageFrame";
    message: ImgFrame;
} | {
    type: "encodedFrame";
    message: EncodedFrame;
} | {
    type: "imageDetections";
    message: ImgDetections;
} | {
    type: "imageDetectionsCustom";
    message: ImageAnnotations;
} | {
    type: "imageDetectionsSpatial";
    message: SpatialImgDetections;
} | {
    type: "pointCloud";
    message: PointCloudData;
} | {
    type: "imu";
    message: IMUData;
} | {
    type: 'rgbd';
    message: RGBDData;
});
export type ErrorCode = DecodingErrorCode;
export declare function errorInstanceToErrorCode(error: Error): ErrorCode;
export type DeserializationErrorCallback = (errorCode: ErrorCode, topic: string, errorData?: unknown) => void;
export type DeserializationWorkerApi = {
    initCallback: (cb: (event: MessageEvent) => void) => void;
    handleMessageToDecode: ({ schema, buffer, topic, neuralCameraIntrinsics, stereoDepthMaxValue, }: FoxgloveMessage & {
        neuralCameraIntrinsics: NeuralCameraIntrinsics;
        stereoDepthMaxValue: number;
    }, configStore: ConfigStore, errorCallback?: DeserializationErrorCallback) => void;
};
//# sourceMappingURL=deserialization.worker.d.ts.map