Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix webcamd daemon loop & handling of non-usb v4l2 devices #741

Merged
merged 4 commits into from
Jun 29, 2021

Conversation

foosel
Copy link
Collaborator

@foosel foosel commented Jun 29, 2021

To fix #740 and restore the old behaviour of webcamd instead of having to rely on the startup to take care of regular polling, instead of existing after bringing up all devices in the background, we will now wait for all child processes to exit. Once that is the case, we'll reset the camera array, sleep 120s and restart the discovery process.

While debugging #740 I also noticed a bug when interacting with the RPi Camera v4l2 device files, which don't have a USB vid and pid and hence produced a syntax error when trying to convert those empty strings into hex for matching against the broken fps device list.

Finally, I found a bunch of typos or weird phrasing and also added some whitespace lines for easier readability.

Would be lovely if @usk-johnny-s could also take a look at the logic here, as I'm not familiar with their multi cam support code added in #597 and am not 100% sure I fully understood the meaning of the various arrays.

We wait for our child processes to complete, reset our "currently run
cameras" array, then wait 2min and loop.

Closes guysoft#740
They don't have a vid and pid, so don't try to format those as hex.
@guysoft
Copy link
Owner

guysoft commented Jun 29, 2021

Neat. Thanks for so fixing all the mini typos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

webcamd service keeps endlessly restarting every second if there's no compatible camera attached
2 participants