Closed ObsidianX closed 3 years ago
Okay I didn't quite get what you are saying, but here is my understanding:
Multithreading implementation used to cause stability issue (https://github.com/fangfufu/Linux-Fake-Background-Webcam/issues/116), but I suppose you are not passing numpy array around. So I am okay with this.
Something went wrong with the merge (https://github.com/fangfufu/Linux-Fake-Background-Webcam/issues/163). I am investigating. If I clone your repository and run it directly, it seems to work fine.
Actually your patch is broken from https://github.com/ObsidianX/Linux-Fake-Background-Webcam/commit/4619a7479e3f30e39ccc689a9e95afe536c31e42
I should have checked it properly. I cloned your repository - I couldn't be bothered to download the pull request and merge it locally. I didn't realise that you were contributing from a branch of your fork. I thought you were working on the master branch of your fork directly.
Actually your patch is broken from ObsidianX@4619a74
I should have checked it properly. I cloned your repository - I couldn't be bothered to download the pull request and merge it locally. I didn't realise that you were contributing from a branch of your fork. I thought you were working on the master branch of your fork directly.
Hmm, strange. I made my branch based on master, but might not have pulled recently enough. I'll rebase and retest. My apologies!
Querying the inotify watcher causes the camera to freeze momentarily every time it's queried since
load_images()
is called several times whenconsumers > 0
. This moves it to its own thread so it doesn't interrupt the stream.The primary fix is simply unindenting lines 299:306 pre-patch (101:108 post-patch) which will prevent the momentary freeze, but continuously querying inotify in the same loop as the camera stream noticeably reduces the framerate.