Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt6 MediaDevices Class Does not Recognize Custom Camera Devices

Qt6 MediaDevices Class Does not Recognize Custom Camera Devices

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 287 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jellyfish
    wrote on last edited by
    #1

    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             :
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved