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

Switching the source webcam on the fly. #126

Open
fangfufu opened this issue Jun 28, 2021 · 1 comment
Open

Switching the source webcam on the fly. #126

fangfufu opened this issue Jun 28, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@fangfufu
Copy link
Owner

Guus said

"Also, being able to switch webcams on the fly would be great. I normally have my laptop docked and using a nice Logitech C920, but if I'm undocked I'm using the laptop's integrated webcam. Even better if it did this switching automatically 🙂"

It would be nice if Guus's feature request gets implemented.

@fangfufu fangfufu added enhancement New feature or request help wanted Extra attention is needed labels Jun 28, 2021
@mithrandir42
Copy link
Contributor

This might probably be implemented simalary to the ondemand processing:

  1. Fill a stack with all dev/video* devices that can be found on startup. If the --webcam-path parameter has been supplied, make sure this one gets pushed last. This would probably change the default device. We might want to keep the default behaviour and ensure just ensure webcam_path gets added last. We could also start with a single stack element, the content of the (supplied or default) webcam_path. Start processing with the last evice added. If opening fails, just try the next one.

  2. Monitor for /dev/video* files being added/removed to /dev using inotify. (Filter out the v4l2loopback-path). If a device gets added push it to the stack. If a device gets removed, remove it from the stack

  3. On device change use the last device on the stack for processing. If it fails to open, just use the next one.

Imho this should not be default behaviour, at least there should be a flag to decativate, since we can imagine the use case of wanting a stable device connection. I.e. while attending to a conference one might want to attach another cam for different purposes.

@fangfufu fangfufu mentioned this issue Aug 31, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants