import { IssueRegistry } from "../utils/IssueRegistry"; import { AVDesyncPlayoutDetector, AVDesyncPlayoutIssuePayload } from "../detectors/AVDesyncPlayoutDetector"; import { Detectors } from "../detectors/Detectors"; import { VideoRecoveryFailedDetector, VideoRecoveryFailedIssuePayload } from "../detectors/VideoRecoveryFailedDetector"; import { DryInboundTrackDetector, DryInboundTrackIssuePayload } from "../detectors/DryInboundTrackDetector"; import { CalculatedScore, VideoMotionType } from "../scores/CalculatedScore"; import { InboundRtpMonitor } from "./InboundRtpMonitor"; import { InboundTrackSample } from "../schema/ClientSample"; import { PlayoutDiscrepancyDetector, PlayoutDiscrepancyIssuePayload } from "../detectors/PlayoutDiscrepancyDetector"; import { InventedSpeechDetector, InventedSpeechIssuePayload } from "../detectors/InventedSpeechDetector"; import { JitterBufferStressDetector, JitterBufferStressIssuePayload } from "../detectors/JitterBufferStressDetector"; import { DecoderPerformanceDetector, DecoderPerformanceIssuePayload } from "../detectors/DecoderPerformanceDetector"; import { DecoderBottleneckDetector, DecoderBottleneckIssuePayload } from "../detectors/DecoderBottleneckDetector"; import { StuckDecoderDetector, StuckDecoderIssuePayload } from "../detectors/StuckDecoderDetector"; import { FrameAssemblyStalledDetector, FrameAssemblyStalledIssuePayload } from "../detectors/FrameAssemblyStalledDetector"; import { PixelatedVideoDetector, PixelatedVideoIssuePayload } from "../detectors/PixelatedVideoDetector"; import { InboundVideoFlowStateDetector, VideoFlowIssuePayload } from "../detectors/InboundVideoFlowStateDetector"; import { AudioPlayoutSynthesisDetector, AudioPlayoutSynthesisIssuePayload } from "../detectors/AudioPlayoutSynthesisDetector"; import type { TrackContentType } from "./TrackMonitor"; import { SliceConfig, SlicedWindow } from "../utils/SlicedWindow"; export type InboundVideoFlowState = 'continuous' | 'choppy' | 'frozen'; export type InboundTrackContext = { contentType?: TrackContentType; linkedVideoTrackId?: string; motionType?: VideoMotionType; presentedResolution?: { width: number; height: number; }; videoTag?: HTMLVideoElement; paused?: boolean; remoteOutboundTrackPaused?: boolean; }; export type InboundTrackWindowValues = { totalFramesReceived: number | null; totalFramesDecoded: number | null; totalFramesDropped: number | null; totalFramesRendered: number | null; totalKeyFramesDecoded: number | null; totalPacketsReceived: number | null; totalBytesReceived: number | null; totalPliCount: number | null; totalFreezeCount: number | null; totalFreezesDurationInMs: number | null; totalPlayoutSynthesizedDurationInMs: number | null; totalPlayoutSamplesDurationInMs: number | null; totalPlayoutSynthesisEvents: number | null; totalPlayoutDelayInMs: number | null; totalPlayoutSamplesCount: number | null; }; export type InboundTrackWindowConfig = { maxAllowedGapInMs: number; numberOfSamples: Record<'detection' | 'recovery' | 'flowDetection' | 'flowRecovery', number>; }; export type InboundTrackIssues = { [AudioPlayoutSynthesisDetector.ISSUE_TYPE]: AudioPlayoutSynthesisIssuePayload; [AVDesyncPlayoutDetector.ISSUE_TYPE]: AVDesyncPlayoutIssuePayload; [DecoderBottleneckDetector.ISSUE_TYPE]: DecoderBottleneckIssuePayload; [DecoderPerformanceDetector.ISSUE_TYPE]: DecoderPerformanceIssuePayload; [DryInboundTrackDetector.ISSUE_TYPE]: DryInboundTrackIssuePayload; [FrameAssemblyStalledDetector.ISSUE_TYPE]: FrameAssemblyStalledIssuePayload; [InboundVideoFlowStateDetector.ISSUE_TYPE]: VideoFlowIssuePayload; [InventedSpeechDetector.ISSUE_TYPE]: InventedSpeechIssuePayload; [JitterBufferStressDetector.ISSUE_TYPE]: JitterBufferStressIssuePayload; [PixelatedVideoDetector.ISSUE_TYPE]: PixelatedVideoIssuePayload; [PlayoutDiscrepancyDetector.ISSUE_TYPE]: PlayoutDiscrepancyIssuePayload; [StuckDecoderDetector.ISSUE_TYPE]: StuckDecoderIssuePayload; [VideoRecoveryFailedDetector.ISSUE_TYPE]: VideoRecoveryFailedIssuePayload; }; export declare class InboundTrackMonitor { readonly track: MediaStreamTrack; private readonly _inboundRtp; static CLEAN_QP_RATIO: number; static COARSE_QP_RATIO: number; readonly direction = "inbound"; readonly detectors: Detectors; readonly issues: IssueRegistry; readonly slicedWindow: SlicedWindow>; dtxMode: boolean; private _context; get paused(): boolean; set paused(value: boolean); get remoteOutboundTrackPaused(): boolean; set remoteOutboundTrackPaused(value: boolean); get contentType(): TrackContentType | undefined; get linkedVideoTrackId(): string | undefined; get motionType(): VideoMotionType | undefined; get presentedResolution(): { width: number; height: number; } | undefined; get videoTag(): HTMLVideoElement | undefined; linkedVideoPlayoutDiffInMs?: number; displayMagnification?: number; frameFlowState?: InboundVideoFlowState; degradedFrameSupply?: boolean; decodingDegradation?: number; quantizationDegradation?: number; synthesizedAudioRatio?: number; jitterBufferStressSeverity?: number; videoPlayoutSkew?: number; decodeBudgetUtilization?: number; inventedSpeechSeverity?: number; overloadedDecoder?: boolean; dry?: boolean; stalledFrameAssembly?: boolean; playoutDiscrepancy?: boolean; stuckedDecoder?: boolean; failedVideoRecovery?: boolean; calculatedScore: CalculatedScore; get score(): number | undefined; get scoreReasons(): Record | undefined; attachments?: Record | undefined; appData?: Record | undefined; constructor(track: MediaStreamTrack, _inboundRtp: InboundRtpMonitor, attachments?: Record); getInboundRtp(): InboundRtpMonitor; getLinkedVideoTrack(): InboundTrackMonitor | undefined; get isScreenShare(): boolean; setContext(context: InboundTrackContext): void; get readyState(): MediaStreamTrack['readyState']; getPeerConnection(): import("./PeerConnectionMonitor").PeerConnectionMonitor; get kind(): import("../schema/W3cStatsIdentifiers").MediaKind; get bitrate(): number | undefined; get jitter(): number | undefined; get fractionLost(): number | undefined; update(): void; private _refreshQuantizationDegradation; private _feedSlicedWindow; private _refreshDisplayMagnification; private _refreshLinkedVideoPlayoutDiff; private _refreshPresentedResolution; createSample(): InboundTrackSample; }