Freigeben über


VideoPerformanceMonitor class

This class is used to monitor the performance of video processing, and report performance events.

Constructors

VideoPerformanceMonitor((apiVersionTag: string, actionName: string, args: unknown[]) => void)

Methods

reportApplyingVideoEffect(string, string)

Call this function when the app starts to switch to the new video effect

reportFrameProcessed()

Call this function when the app finishes successfully processing a video frame

reportGettingTextureStream(string)

Call this function when the app starts to get the texture stream

reportStartFrameProcessing(number, number)

Call this function when the app starts to process a video frame

reportTextureStreamAcquired()

Call this function when the app finishes successfully getting the texture stream

reportVideoEffectChanged(string, string)

Call this function when the new video effect is ready

setFrameProcessTimeLimit(number)

Define the time limit of frame processing. When the average frame processing time is longer than the time limit, a "video.performance.frameProcessingSlow" event will be reported.

startMonitorSlowFrameProcessing()

Start to check frame processing time intervally and report performance event if the average frame processing time is too long.

Constructor Details

VideoPerformanceMonitor((apiVersionTag: string, actionName: string, args: unknown[]) => void)

new VideoPerformanceMonitor(reportPerformanceEvent: (apiVersionTag: string, actionName: string, args: unknown[]) => void)

Parameters

reportPerformanceEvent

(apiVersionTag: string, actionName: string, args: unknown[]) => void

Method Details

reportApplyingVideoEffect(string, string)

Call this function when the app starts to switch to the new video effect

function reportApplyingVideoEffect(effectId: string, effectParam?: string)

Parameters

effectId

string

effectParam

string

reportFrameProcessed()

Call this function when the app finishes successfully processing a video frame

function reportFrameProcessed()

reportGettingTextureStream(string)

Call this function when the app starts to get the texture stream

function reportGettingTextureStream(streamId: string)

Parameters

streamId

string

reportStartFrameProcessing(number, number)

Call this function when the app starts to process a video frame

function reportStartFrameProcessing(frameWidth: number, frameHeight: number)

Parameters

frameWidth

number

frameHeight

number

reportTextureStreamAcquired()

Call this function when the app finishes successfully getting the texture stream

function reportTextureStreamAcquired()

reportVideoEffectChanged(string, string)

Call this function when the new video effect is ready

function reportVideoEffectChanged(effectId: string, effectParam?: string)

Parameters

effectId

string

effectParam

string

setFrameProcessTimeLimit(number)

Define the time limit of frame processing. When the average frame processing time is longer than the time limit, a "video.performance.frameProcessingSlow" event will be reported.

function setFrameProcessTimeLimit(timeLimit: number)

Parameters

timeLimit

number

startMonitorSlowFrameProcessing()

Start to check frame processing time intervally and report performance event if the average frame processing time is too long.

function startMonitorSlowFrameProcessing()