import type { EncoderChannelMap } from "./config.js"; /** * Initializes the persistent assignment layer from the contents of encoder-channels.json. Called * once at startup by initializeEncoderModule(). Runtime assignments start empty. * @param initial - The channel-to-encoder-index map loaded from encoder-channels.json. */ export declare function initializeAssignments(initial: EncoderChannelMap): void; /** * Assigns a channel key to an encoder index at runtime. Overrides any persistent assignment for * this key. Called when the user tunes an encoder via the WebUI or API. * @param channelKey - The PrismCast channel key (e.g., "cnn"). * @param encoderIndex - The encoder index (0-based). */ export declare function assignChannel(channelKey: string, encoderIndex: number): void; /** * Removes a runtime assignment for a channel key. After this call, the channel falls back to its * persistent assignment (if any), or flows through the normal HLS pipeline. Called when the user * releases an encoder via the WebUI or API. * @param channelKey - The PrismCast channel key to unassign. */ export declare function unassignChannel(channelKey: string): void; /** * Removes all runtime assignments for a given encoder index. Used when an encoder is released * wholesale (rather than per-channel). Persistent assignments for those channels are also cleared. * @param encoderIndex - The encoder index to clear. */ export declare function clearEncoderAssignments(encoderIndex: number): void; /** * Returns the encoder index assigned to the given channel key, or undefined if the channel is * not assigned to any encoder. Runtime assignments take precedence over persistent assignments. * @param channelKey - The PrismCast channel key to look up. */ export declare function getAssignmentForChannel(channelKey: string): number | undefined; /** * Returns all channel keys currently assigned to the given encoder index, from both runtime and * persistent layers (deduplicated, runtime takes precedence). * @param encoderIndex - The encoder index to query. */ export declare function getChannelsForEncoder(encoderIndex: number): string[]; /** * Returns a merged view of all current assignments (both persistent and runtime) as a plain * object. Runtime assignments override persistent ones for the same key. This is used by the * route middleware's getEncoderChannels() getter. */ export declare function getAllAssignments(): EncoderChannelMap; /** * Returns true if any assignments exist (persistent or runtime). */ export declare function hasAnyAssignments(): boolean;