How to show live camera feed into SKXamlCanvas? #2800
Unanswered
hvansiaThor
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The following code mimics the camera live feed. If somebody wants to regenerate the error on their computer please use the following code. I am seeing same error as above.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As the title mentions, I am trying to show live feed from the camera, connected via USB to my PC, into SKXamlCanvas. I am using C#, net8.0, WinUI and the library that I am using is SkiaSharp.Views.WinUI(2.88.6)
The following are two functions:
If I comment out the line
if(startRendering) { DispatcherQueue.TryEnqueue(() => skiaCanvas_PaintSurface(skiaCanvas, null));}
I do not get any error. But left uncommented, I get error at the line "canvas.LocalClipBounds.Width". The error is "System.AccessViolationException: 'Attempted to read or write protected memory. This is often an indication that other memory is corrupt'". Can somebody help me understand why I am getting this error? How can I correct it? Also, if there is better implementation than what I have done above?Beta Was this translation helpful? Give feedback.
All reactions