guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.63k stars 728 forks source link

Overlay rendering too intensive #397

Closed lukeswitz closed 5 years ago

lukeswitz commented 5 years ago

Switching back to an overlay for motion detection has caused some problems. Memory leaks from cameraviewhandler and monitor activity combine to form a laggy, useless interface. Movement overlay appears once every ten second max until it crashes out.

Archie supplied more logs than could ever be needed to track this down, seems the library was added using the readme setup which assumes a good camera on a new device.

I’d vote to go back to the simple “xxxx detected” UX

lukeswitz commented 5 years ago

Seems the creation and rotation of the bitmap on frame processing causes this. The matrix rotation hangs the cameraView

lukeswitz commented 5 years ago

No use. Cart pushing horse.

n8fr8 commented 5 years ago

Here is my proposal for overhauling the camera moving forward:

1) use hardware video mp4 recording on a loop. Records 30 second loops.

2) use preview frame to detect motion as we do now, but dont worry about rotation, matrix etc

3) if motion is detected, save the current video loop.

Seems like this approach will pop many balloons with one stone.

On Mon, Apr 22, 2019, at 8:37 AM, Luke Switzer wrote:

No use. Cart pushing horse.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/guardianproject/haven/issues/397#issuecomment-485398420, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAHRAZL5XM7AYOVHBLTYITPRWPZLANCNFSM4HHLP2YQ.