-
Notifications
You must be signed in to change notification settings - Fork 161
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
ondemand does not work for WebEx #186
Comments
Do you have suggestion of using anything other than inotify? |
yes, as I said, we could use lsof/fuser capabilities to check the open files by processes. That way we can count the PIDs that have our V4L2LOOPBACK device open. We can directly use this as the count of consumers in the existing code. |
We could also look into what WebEx does differently to Google Meet in regards to inotify, but I'm unsure how I would debug that |
So I was able to capture the inotify messages for WebEx and Google Meet WebEx:
Google Meet:
In the end this might be a timing issue with the inotify messages coming in too quickly, thus we do not catch all of them? Command to capture the messages is inotifywait --inotify -m /dev/video2 | grep -v MODIFY |
If you provide a patch, I am happy to review it and merge it in. :) |
Just FYI - I did rewrite the code so that the inotify part is in a separate thread, but for some reason, it still doesn't reliably detect webcam usage (that's why you didn't get a PR yet) |
What's fuser? |
It's a linux cli tool to list processes using a certain file: |
Just two cents from a random user: making a command you can't CTRL+C, and have to close the entire terminal just to terminate, is very frustrating. |
@machineghost , you can use CTRL + \ to terminate. That sends SIGKILL. |
I've run Linux for over a decade and never had to kill a command that way. I think it's fair to assume a decent percentage of other users won't magically know to do |
Well if you have better suggestions on which signal I should intercept to support changing background while the webcam is open, do let me know. :) |
|
Great project here! I tried to use it for WebEx, but the ondemand feature doesn't work for the in-browser tool. It always registers just one consumer and thus pauses the webcam.
When I unpause it using Ctrl+C, it immediately re-pauses again.
Checking out the same thing with Google Meet, it works fine (same browser, same everything)
I checked the code and maybe listenting to inodes isn't the best approach? Maybe using something like
fuser $V4L2LOOPBACK_PATH
(which lists the processes accessing the device) might work better?This might also help with #167
Environment:
Browser Chrome
OS Fedora 36
v4l2loopback
The text was updated successfully, but these errors were encountered: