import Logger from '../logger/Logger'; /** * [[VideoFxSegmentationRateManager]] Mechanism that can be used to maximize * frequency of the segmentation operations while maintaining a target amount * of resource utilization. */ export declare class VideoFxSegmentationRateManager { private logger; private targetSegmentationCyclePercentage; private frameCountOverSamplingPeriod; private framesPerSegmentation; private frameSegmentationStartTime; private totalSegmentationDurationOverSamplingPeriod; private samplingPeriodStartTime; constructor(logger: Logger, targetSegmentationCycleTime: number); /** * Invoked on every frame to increment the running count of frames being processed */ submitFrame(): void; /** * Invoked on every frame to coordinate when the segmentation should be * executed so that we are maintaing a segmentation rate of once per every * framesPerSegmentation frames. * @returns boolean for whether or not we want to perform an action on the current * frame */ shouldApplySegmentation(): boolean; /** * Starts the timing of the current action */ startSegmentation(): void; /** * Invoked after the action to notify the compute manager. Afterwards the * manager will make adjustments to action rates to maintain a value below compute * ceiling */ completeSegmentation(): void; /** * Increase or decrease the frames per segmentation so that we remain as performant as possible, * but also below the targetSegmentationCycleTime * @param currentSegmentationCycleTime Current ratio of frame processing allocated to a specific action */ private adjustFramesPerSegmentation; }