import { Byte, IError, IRange, ISubject, IValueSubject, Milliseconds } from '@vkontakte/videoplayer-shared';
import { CommonInit, Manifest, Representation, Segment } from '../../../../providers/utils/parsers/types';
import type { Fetcher } from '../../../../providers/DashProviderVirtual/lib/fetcher';
import { ITuningConfig } from '../../../../utils/tuningConfig';
export type TRepresentationSwitchMode = 'lazy' | 'force';
export interface Dependencies {
    fetcher: Fetcher;
    tuning: ITuningConfig;
    compatibilityMode?: boolean;
    manifest: Manifest | null;
    getCurrentPosition(): Milliseconds | undefined;
    getCurrentStallDuration(): Milliseconds;
    isActiveLowLatency(): boolean;
}
export interface IVirtualBufferManager {
    error$: ISubject<IError>;
    playingRepresentation$: IValueSubject<Representation['id'] | undefined>;
    playingRepresentationInit$: IValueSubject<CommonInit | undefined>;
    currentSegmentLength$: IValueSubject<number>;
    onLastSegment$: IValueSubject<boolean>;
    fullyBuffered$: IValueSubject<boolean>;
    startWith(representationId: Representation['id']): Promise<void | undefined>;
    seek(currentPosition: Milliseconds | undefined): Promise<void>;
    maintain(currentPosition: Milliseconds | undefined): Promise<void>;
    switchTo(newRepresentationId: Representation['id'], isAuto: boolean | undefined): Promise<void | undefined>;
    getForwardPlaybackBufferDuration(currentPosition?: Milliseconds): Milliseconds;
    getPlaybackBufferState(): IRange<Milliseconds> | null;
    setTarget(time: Milliseconds): void;
    setPreloadOnly(preloadOnly: boolean): void;
    findSegmentStartTime(position: Milliseconds): Milliseconds | undefined;
    calculateDurationFromSegments(representationId: Representation['id']): Milliseconds;
    destroy(): void;
    get lastDataObtainedTimestamp(): Milliseconds;
}
export interface IBufferPlaybackQueueItem<T extends Segment> {
    representationId: Representation['id'];
    segmentIndex: number;
    segment: T;
}
export interface ISomeDataLoadedCallbackParams<T extends Segment> {
    downloadingItems: IBufferPlaybackQueueItem<T>[];
    dataView: DataView;
    representationId: Representation['id'];
    globalFrom?: Byte;
    loaded: Byte;
    signal: AbortSignal;
}
