import type { Playlist } from '../../core/playlist'; import type { TimelineClock } from '../../core/timeline'; import type { TrackSamples } from '../../core/types'; import { type Normalizer } from '../../core/normalize'; export type { TrackSamples } from '../../core/types'; export type { Normalizer } from '../../core/normalize'; export interface MergedTrackState { /** Interpolatable data per track name. */ tracks: Map; /** Set of loaded segment indices. */ loadedSegments: Set; /** Contiguous range that was merged [startIdx, endIdx] inclusive. */ mergedRange: [number, number] | null; loading: boolean; } export interface MergedTrackOptions { /** * Convert a decoded segment into columnar track samples. * Default: `samplesNormalizer` — expects JSONL lines shaped `{ts, data}`. * Pass a custom normalizer to emit multiple tracks from one stream * (e.g. split `[x,y,z, qx,qy,qz,qw]` into `position` + `orientation`) * or to support non-JSONL formats (Parquet, Arrow, msgpack, ...). */ normalize?: Normalizer; } /** * Load continuous time-series data from an m3u8 playlist and merge the * current segment plus its contiguous neighbors into `Float32Array`s suitable * for `findBracket` + interpolation. * * Built on `useSegment` — that hook handles segment-boundary detection; this * one adds neighbor prefetch, per-segment normalization, and contiguous merge. * * **Gap safety**: only the longest contiguous chain of loaded segments around * the current playback position is merged. This prevents interpolation across * a missing chunk. * * The decoded segment shape is governed by the decoder (`jsonlDecoder` by * default) and normalized by `options.normalize`. Returns a `Map` keyed by * track name so a single normalizer can emit multiple named channels from * one stream (see `PoseView`). Multiple `useMergedTrack` hooks with different * playlists on the same clock work independently. */ export declare function useMergedTrack(engine: Playlist | null, clock?: TimelineClock | null, options?: MergedTrackOptions): MergedTrackState; //# sourceMappingURL=use-merged-track.d.ts.map