VideoPerformanceMonitor class
This class is used to monitor the performance of video processing, and report performance events.
Constructors
Video |
Methods
report |
Call this function when the app starts to switch to the new video effect |
report |
Call this function when the app finishes successfully processing a video frame |
report |
Call this function when the app starts to get the texture stream |
report |
Call this function when the app starts to process a video frame |
report |
Call this function when the app finishes successfully getting the texture stream |
report |
Call this function when the new video effect is ready |
set |
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. |
start |
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()
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour