/** * SegmentStreamSource - a SourceAdapter that presents an ordered list of HLS * segments (optionally an fMP4 init segment first) as ONE contiguous, seekable * byte stream for the FFmpeg-WASM demuxer. * * Concatenating the segments byte-for-byte yields a valid continuous MPEG-TS * (or fragmented MP4, init + fragments) that FFmpeg demuxes linearly. To make * it seekable through FFmpeg's byte-based I/O we build a byte-offset map: each * segment's length comes from its #EXT-X-BYTERANGE when present, else a HEAD * (or a 0-0 ranged GET's Content-Range) measured once up front. read() then * maps any byte range to the covering segment(s), fetches them (LRU-cached), * and stitches the result. */ import { SourceAdapter } from "./SourceAdapter"; import { HlsSegment } from "./HlsFallback"; export declare class SegmentStreamSource implements SourceAdapter { private segments; private initSegment; private headers?; private entries; private totalSize; private position; private built; private buildPromise; private cache; private cacheOrder; private readonly maxCached; private _throughputBps; private abortController; private readonly key; constructor(segments: HlsSegment[], initSegment: string | undefined, keyUrl: string, headers?: Record | undefined); /** Resolve one segment's byte length (and how to fetch it). */ private measure; private buildOnce; getSize(): Promise; private fetchEntry; read(offset: number, length: number): Promise; seek(offset: number): number; getPosition(): number; close(): void; getKey(): string; /** Download-speed estimate (bytes/s) for the ABR controller. Shape mirrors * HttpSource.getNetworkStats() so the caller can duck-type either source. */ getNetworkStats(): { currentSpeed: number; lastSpeed: number; }; } //# sourceMappingURL=SegmentStreamSource.d.ts.map