import { SegmentWithStream, Stream, StreamConfig, StreamWithSegments } from "../types.js";
import { Playback } from "../internal-types.js";
import { P2PLoader } from "../p2p/loader.js";
export type SegmentPlaybackStatuses = {
    isHighDemand: boolean;
    isHttpDownloadable: boolean;
    isP2PDownloadable: boolean;
};
export type PlaybackTimeWindowsConfig = Pick<StreamConfig, "highDemandTimeWindow" | "httpDownloadTimeWindow" | "p2pDownloadTimeWindow">;
export type GenerateStreamShortIdProps = {
    bitrate?: number | null;
    codecs?: string | null;
    width?: number | null;
    height?: number | null;
    language?: string | null;
    channels?: string | number | null;
    name?: string | null;
    frameRate?: number | string | null;
    videoRange?: string | null;
};
/**
 * Generates a stable, unique string ID for a stream based on its properties.
 * Uses a SHA-1 hash to avoid collisions and encodes the result to standard Base64.
 */
export declare function generateStreamShortId({ bitrate, codecs, width, height, language, channels, name, frameRate, videoRange, }: GenerateStreamShortIdProps): string;
export declare function getStreamSwarmId(swarmId: string, stream: Readonly<Stream>): string;
export declare function getSegmentFromStreamsMap(streams: Map<string, StreamWithSegments>, segmentRuntimeId: string): SegmentWithStream | undefined;
export declare function getSegmentFromStreamByExternalId(stream: StreamWithSegments, segmentExternalId: number): SegmentWithStream | undefined;
export declare function getStreamId(stream: Stream): string;
export declare function getSegmentAvgDuration(stream: StreamWithSegments): number;
export declare function getSegmentPlaybackStatuses(segment: SegmentWithStream, playback: Playback, timeWindowsConfig: PlaybackTimeWindowsConfig, currentP2PLoader: P2PLoader, availableMemoryPercent: number): SegmentPlaybackStatuses;
