Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-121750

QCameraImageProcessing fails to set settings on linux v4l2 camera

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.15.17
    • 5.15.8
    • Multimedia
    • 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
    • Linux/Other display system
    • 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)

    Description

      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(...)

      Attachments

        1. CMakeLists.txt
          0.4 kB
        2. main.cpp
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            timblechmann tim blechmann
            rocketpoodle Austin Goddard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: