- 
    
Bug
 - 
    Resolution: Fixed
 - 
    
P3: Somewhat important
 - 
    5.15.8
 - 
    None
 - 
    IMX 6q running linux Buildroot 4.5.9 kernel 5.4-2.3.x-imx
GStreamer 1.20.1
Qt 5.15.8 with Qt Multimedia at commit bd29c87027637a013f2c5e3b549fcda84e4d7545 
- 
        
 - 
        f398aac61 (dev), 82397169f (6.7), 84156a1d7 (6.6), 64f8bf3eb (tqtc/lts-6.5), f84fe0247 (dev), 52ba122f6 (6.7), c23f11662 (6.6), 6a36057b8 (tqtc/lts-6.5), 6b950406b (tqtc/lts-5.15)
 
Target information:
Problem information:
When accessing a linux v4l2 camera via QCamera, and trying to access any of the parameters via the QCameraImageProcessing class, it does not work and produces the following warning:
Unable to open the camera "/dev/video0" for read to get the parameter value: "Device or resource busy"
Attached is a minimal reproducer, although this problem is platform (and possibly driver) specific
This is due to Qt trying to acquire the /dev/video0 device once gstreamer has acquired it. Modifications to the qt CameraBin gstreamer plugin were tested to resolve this which were successful. This was done by either using g_object_set(...) to change the parameters that the v4l camerabin GstElement provide or by requesting the open device file descriptor from gstreamer with g_object_get(...)
| For Gerrit Dashboard: QTBUG-121750 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 536672,4 | Fix device file contention when setting parameters on v4l cameras | dev | qt/qtmultimedia | Status: ABANDONED | +1 | 0 | 
| 540679,7 | gstreamer: camera - cleanups | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 | 
| 540685,4 | gstreamer: camera - use v4l2 file descriptor for v4l2 ioctl | dev | qt/qtmultimedia | Status: MERGED | +2 | 0 | 
| 542558,2 | gstreamer: camera - cleanups | 6.7 | qt/qtmultimedia | Status: MERGED | +2 | 0 | 
| 542745,2 | gstreamer: camera - cleanups | 6.6 | qt/qtmultimedia | Status: MERGED | +2 | 0 | 
| 542886,2 | gstreamer: camera - cleanups | tqtc/lts-6.5 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 | 
| 542973,2 | gstreamer: camera - use v4l2 file descriptor for v4l2 ioctl | 6.7 | qt/qtmultimedia | Status: MERGED | +2 | 0 | 
| 542975,2 | gstreamer: camera - use v4l2 file descriptor for v4l2 ioctl | 6.6 | qt/qtmultimedia | Status: MERGED | +2 | 0 | 
| 543031,2 | gstreamer: camera - use v4l2 file descriptor for v4l2 ioctl | tqtc/lts-6.5 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 | 
| 543852,2 | Fix device file contention when setting parameters on v4l cameras | tqtc/lts-5.15 | qt/tqtc-qtmultimedia | Status: MERGED | +2 | 0 |