Qt6 MediaDevices Class Does not Recognize Custom Camera Devices
-
Hello, we cross-compile a Qt app from a Ubuntu Desktop VM to a commercial embedded device running Ubuntu 22.04. The embedded device has some custom camera devices that use a custom V4L driver and enumerate as /dev/video*. When the app was running in Qt5, we used the Camera QML component to display live camera footage. We assigned the device node "/dev/video*" to deviceId of the Camera component and it recognized the device. Here's a snippet of the code.
VideoOutput { id: cameraVideo visible: false flushMode: VideoOutput.LastFrame source: Camera { id: camera } ... } ... camera.deviceId = "/dev/video3" camera.start()As we moved to Qt6, we're using the new MediaDevices component to enumerate camera devices. Our problem is that the MediaDevices component enumerates off-the-shelf web cams, but not our custom devices.
MediaDevices { id: mediaDevices } Camera { id: camera cameraDevice: mediaDevices.videoInputs[0] // this list is empty with our camera devices connected }Can you please let me know what it takes to be recognized by MediaDevices?
Here's some more property information about our device for your reference.
bsci@611f7feec5ff:~$ v4l2-ctl --get-fmt-video -d /dev/video4 Format Video Capture: Width/Height : 560/480 Pixel Format : 'RGB3' (24-bit RGB 8-8-8) Field : None Bytes per Line : 1680 Size Image : 806912 Colorspace : sRGB Transfer Function : Default (maps to sRGB) YCbCr/HSV Encoding: Default (maps to ITU-R 601) Quantization : Default (maps to Full Range) Flags :