interface Pipeline {
    module: {
        createEffectStream: (inputStream: MediaStream, setup: Pipeline["getDefaultSetup"], params: Params) => Promise<{
            stream: MediaStream;
            stop: () => void;
            updateParams: (params: Params) => Promise<void> | Promise<boolean>;
        }>;
    };
    getDefaultSetup: () => {
        useWebGL?: boolean;
        segmentationModelId?: string;
        logToConsole?: boolean;
        framerate?: number;
        useInsertableStreams?: boolean;
        canvasMemoryLeakWorkaround?: boolean;
        transferType?: string;
        useBackgroundWorker?: boolean;
    };
    canUse: (options: {
        allowSafari?: boolean;
    }) => boolean;
}
interface Params {
    backgroundUrl?: Promise<unknown> | string;
    backgroundType?: "image" | "video";
    backgroundBlur?: {
        amount: "slight" | "normal" | "heavy";
    };
}
interface Preset {
    id: string;
    backgroundUrl?: Promise<string>;
    pipelineConfigs?: {
        [pipelineId: string]: {
            setup?: Pipeline["getDefaultSetup"] | undefined;
            params: Params;
        };
    };
}

declare const createEffectStream: (inputStream: MediaStream, presetId: string, setup?: Pipeline["getDefaultSetup"], params?: Params) => Promise<{
    stream: MediaStream;
    stop: () => void;
    tryUpdate: (updatedPresetId: string, updatedSetup: Pipeline["getDefaultSetup"], updatedParams: Params) => Promise<boolean>;
}>;
declare const getUsablePresets: (filter: (pipeline: Pipeline, options: {
    allowSafari?: boolean;
}) => boolean, options: {
    allowSafari?: boolean;
}) => string[];
declare const getPresets: (options?: {
    allowSafari?: boolean;
}) => Array<{
    id: string;
    kind: "blur" | "image" | "video";
    supported: boolean;
}>;
declare const warmup: (presetId?: string, setup?: Pipeline["getDefaultSetup"], params?: Params) => Promise<void>;
declare const setDefaultSetup: (pipelineId: string, setup: Pipeline["getDefaultSetup"]) => void;
type SetupOptions = ReturnType<Pipeline["getDefaultSetup"]>;

export { createEffectStream, getPresets, getUsablePresets, setDefaultSetup, warmup };
export type { Params as EffectParams, Pipeline, Preset, SetupOptions };
