I have made an air desktop app, where I use a webcam to let the user grab an image, to be used in the app.
I use the
Texture.fromCamera(), to apply the texture to an Image object.
The app is running 12 hours pr. day on an museum, and is working fine, except sometimes the camera feed will freeze. If I use the
camera.drawToBitmapData() to grab the contents of the webcam, this will show the real feed and not the frozen feed.
To optimize memory usage etc. while the camera feed is not displaying, I will down the resolution of the webcam (
camera.setmode()) and turn it back up before the feed is to be shown.
Could this freezing be some sort of memory issue? I have tried to check memory usage and I cant seem to find any memory leeks or growing memory.
Is there any way I can turn the camera off or the
texture.fromCamera() off, and quickly turn it on again when needed? to maybe work arround this issue?
Thank you for any input/help
Best regards, Per