UFOID / UFO-Detector

UFO Detector
http://ufoid.net/
GNU General Public License v3.0
54 stars 8 forks source link

Mostly improved Camera-related unit testing #38

Closed hekkup closed 8 years ago

hekkup commented 8 years ago

I'm quite happy about the blocking mock Camera::getWebcamFrame() even if I don't know whether it will serve well in real life testing. Anyway now it's possible to start developing detection algorithm tests so that video frames are fed one by one to the detector and the results are checked after each frame.

There are other small stuff in this pull request, too. Video frame access sync fix most probably fixes some crashing (9af9cc3). Accessing non-synced stuff across threads is the quickest way to problems. :) Also it's a nightmare to track down like all thread-related testing.

UFOID commented 8 years ago

I was a bit hesitant with the mutex in the recording process thinking it could introduce lag in to the video but as far as I can see it performs the same. Let's hope it fixes those random video recording crashes. And thank you for the much needed unit tests!