/** * Segment-level perf bus. * * The transcoder publishes one `SegmentPerfStat` per fully transcoded media * segment so that plugin-level features (e.g. compute-aware ABR in the Shaka * and dash.js plugins) can react to transcode throughput without reaching * into the transcoder internals or the worker postMessage protocol. * * Producers: `SegmentTranscoder.processMediaSegment` (main-thread path) and * `TranscodeWorkerClient` on receipt of the worker's `transcoded` message. * The worker itself does not publish — listeners always live on the main * thread so the bus stays a single-thread broadcast. */ export interface SegmentPerfStat { /** Wall-clock time spent in demux + decode + encode (ms). */ totalMs: number; /** Intrinsic duration of the source segment in media time (ms). */ segDurMs: number; /** segDurMs / totalMs — > 1 means transcode runs faster than real-time. */ speedX: number; /** Number of frames produced (display-order). */ frames: number; /** Decoded frame width in pixels. */ width: number; /** Decoded frame height in pixels. */ height: number; } type Listener = (stat: SegmentPerfStat) => void; export declare function publishSegmentStat(stat: SegmentPerfStat): void; export declare function subscribeSegmentStat(l: Listener): () => void; /** Test-only — drop all subscribers. */ export declare function _resetSegmentStatBus(): void; export {}; //# sourceMappingURL=perf-bus.d.ts.map