Camera flame rate drop after plugin Background Overlay

Dear all,

We have create a overlay plugin base on Background Overlay sample with attached coding in backgroundOverlayplugin.cs

We found that there have flame drop problem when user using 4x4 live view and all the camera flame have been drop 7-10 flame.

Please advise, thx.

KennethT

Milestone development will start an investigation. Let me get back to you when I receive a news from them.

Which version and edition of XProtect are you using? Are you using the latest SDK?

Dear Rie,

We have using 2020R2 Corp ver. with 2020R2 SDK, thx

KennethT

It is not expected that the rendering of shapes overlays have a significant impact on the video performance in the Smart Client.

However everything that runs on the UI thread will potentially impact the video performance. In the code in BackgroundWaterMarkPlugin it appears that the generation of the shapes is also performed in the UI thread. This should ideally be moved to a background thread.

Dear Andersen,

We have only follow and enhance the demo sample in Plugin Integration - Analytics Overlay. And how could we use another background thread to show the watermark on the video stream in smart client?

Please advance, thx.

KennethT

If you look at the AnalyticsOverlay plugin sample code in the BackgroundOverlayPlugin class in the DrawOverlay method you will notice the following method used: ClientControl.Instance.CallOnUiThread(() =>

This method switches to the UI thread for writing the overlay for display. If there are time consuming calculations or similar involved in creating the shapes these calculations could have been performed in another thread before then switching to UI thread and using ShapesOverlayAdd / ShapesOverlayUpdate.