I've been playing around with the camera preview function via CamerEx e.g to transmit camera video via a LAN (like CCTV client example). However I find that my app crashes after some hours. It seemed that the app RAM usage just kept increasing (as monitored via native Process Stats function), reaching around 200Mb on this particular tablet (running Android 4.4.2) before it crashed.
As a check I compiled and ran Erel's CCTV client app:
https://www.b4x.com/android/forum/threads/android-based-closed-circuit-tv-cctv-example.23601/
This exhibited similar behaviour. I.e. After a few hours crashed and I could see RAM usage gradually creeping up in process stats until the ~200Mb crash point.
Trying the same code on a somewhat more powerful tablet (running Android 4.4.4) exhibited much less of a problem. This has been running for days and although I can still see a small memory creep it is nowhere near as much.
I am definitely not an expert so purely conjecture - could it be that on the slower tablet the preview event is internallly firing more often than it can be serviced by the call back and somehow the lost frames are accumulating somewhere? Or any other suggestions?
As a check I compiled and ran Erel's CCTV client app:
https://www.b4x.com/android/forum/threads/android-based-closed-circuit-tv-cctv-example.23601/
This exhibited similar behaviour. I.e. After a few hours crashed and I could see RAM usage gradually creeping up in process stats until the ~200Mb crash point.
Trying the same code on a somewhat more powerful tablet (running Android 4.4.4) exhibited much less of a problem. This has been running for days and although I can still see a small memory creep it is nowhere near as much.
I am definitely not an expert so purely conjecture - could it be that on the slower tablet the preview event is internallly firing more often than it can be serviced by the call back and somehow the lost frames are accumulating somewhere? Or any other suggestions?