Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BackgroundBlurVideoFrameProcessorObserver

An observer for the background blur video frame processor.

Use {@link BackgroundBlurVideoFrameProcessor.addObserver} to register an observer with the processor.

Hierarchy

Index

Properties

Optional filterCPUUtilizationHigh

filterCPUUtilizationHigh: (event: FilterCPUUtilizationHighEvent) => void

This event occurs when the CPU utilization of background filtering exceeds the filterCPUUtilization defined in the BackgroundBlurOptions.

Type declaration

    • (event: FilterCPUUtilizationHighEvent): void
    • This event occurs when the CPU utilization of background filtering exceeds the filterCPUUtilization defined in the BackgroundBlurOptions.

      Parameters

      • event: FilterCPUUtilizationHighEvent

        cpuUtilization: The percentage of time that was spent processing background filter divided by the total reporting period time; filterMillis: Total time spent processing the background filter in milliseconds; periodMillis: Total time in the reporting period in milliseconds;

      Returns void

Optional filterFrameDurationHigh

filterFrameDurationHigh: (event: FilterFrameDurationHighEvent) => void

This event occurs when the amount of time it takes to apply the background filter is longer than expected. The measurement is taken from the time the process method starts to when it returns. For example, if the video is running at 15 frames per second and we are averaging more than 67 ms (1000 ms reporting period / 15 fps) to apply background filter, then a very large portion of each frame's maximum processing time is taken up by processing background filter.

The observer will be called a maximum of once per {@link periodMillis}. In the event that the {@link avgFilterDurationMillis} is larger than expected the builder can use this event as a trigger to disable the background filter.

Type declaration

    • (event: FilterFrameDurationHighEvent): void
    • This event occurs when the amount of time it takes to apply the background filter is longer than expected. The measurement is taken from the time the process method starts to when it returns. For example, if the video is running at 15 frames per second and we are averaging more than 67 ms (1000 ms reporting period / 15 fps) to apply background filter, then a very large portion of each frame's maximum processing time is taken up by processing background filter.

      The observer will be called a maximum of once per {@link periodMillis}. In the event that the {@link avgFilterDurationMillis} is larger than expected the builder can use this event as a trigger to disable the background filter.

      Parameters

      • event: FilterFrameDurationHighEvent

        framesDropped: The expected amount of frames based on frame rate minus the actual number of frames. avgFilterDurationMillis: The average amount of time that the processor took per frame in the reporting period. framerate: The video frame rate set by the SDK. periodMillis: The duration of the reporting period in milliseconds.

      Returns void

Generated using TypeDoc