Dynamically allocate video device#32
Conversation
Register /dev/video device dynamically (instead of hardcoding /dev/video0), and unregister it when no longer in use (instead of unloading the whole module). This allows using webcam and screen share simultaneously. This requires a simple ioctl to /dev/v4l2loopback device, do it from python to avoid pulling in extra dependencies (v4l2-utils). The structure is a bit messy: qubes-video-companion bash script calls setup.py (now written in python), and then qrexec-client-vm (in C) that calls back receiver.py (which then execs gst-launch). And finally qubes-video-companion calls destroy.py to clean things up. This could be improved by rewriting qubes-video-companion in python, and including setup.py/destroy.py as functions, but on the other hand, bash script (running during the whole connection). Fixes QubesOS/qubes-issues#9625
9dde6ed to
4355c16
Compare
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025111414-4.3&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025081011-4.3&flavor=update
Failed tests15 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/149225#dependencies 82 fixed
Unstable testsDetailsPerformance TestsPerformance degradation:11 performance degradations
Remaining performance tests:168 tests
|
Set /dev/v4l2loopback permission so users in `qubes` group have access. And also prevent creating initial /dev/video0 now that it's created dynamically. Note that /dev/video* don't need any manual treatment, as default udev rules already give local user access to it. One still needs sudo to load the module. QubesOS/qubes-issues#10163
Make it work also without password-less root enabled.
88e8cb8 to
0f32a4b
Compare
Allow seeing what is different.
Register /dev/video device dynamically (instead of hardcoding
/dev/video0), and unregister it when no longer in use (instead of unloading
the whole module). This allows using webcam and screen share
simultaneously.
This requires a simple ioctl to /dev/v4l2loopback device, do it from python
to avoid pulling in extra dependencies (v4l2-utils).
The structure is a bit messy: qubes-video-companion bash script calls
setup.py (now written in python), and then qrexec-client-vm (in C) that
calls back receiver.py (which then execs gst-launch). And finally
qubes-video-companion calls destroy.py to clean things up. This could be
improved by rewriting qubes-video-companion in python, and including
setup.py/destroy.py as functions, but on the other hand, bash script
(running during the whole connection).
Fixes QubesOS/qubes-issues#9625