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

IOCTL call on VIDIOC_ENUM_FRAMEINTERVALS fails to enumarate frame interval/rate for FFmpeg V4L2 cameras

    XMLWordPrintable

Details

    • Linux/Yocto, Linux/Other display system
    • 98b97d08c (dev), b6cd5a453 (6.8), 70e6b1c89 (6.7), 3a95b02fa (tqtc/lts-6.5)
    • Multimedia Next Next

    Description

      When using a camera module ( tested with a Pi Camera Module v3) on a Raspberry Pi 4, the method doCheckCameras from the QV4L2CameraDevices object fails to add the camera to the camera list.

      This mainly happens because the IOCTL system call xioctl(fd, VIDIOC_ENUM_FRAMEINTERVALS, &frameInterval) always return an EINVAL, therefore min and max frame rates are not configured and subsequently the camera videoFormats/photoResolution remains empty .
      In attachment is a minimal code to reproduce this issue (ioctl_frame_interval.cpp)

      Although previous bug fix https://bugreports.qt.io/browse/QTBUG-123526 added support for stepwise frame sizes by adding the minimum and maximum supported frame size to a resolution list. This does not seem to solve the problem because of the failing ioctl call.

      According to a suggestion from a RPi foundation Engineer on a similar issue,  configuring frame interval/rate can be achieved by considering V4L2_CID_HBLANK/V4L2_CID_VBLANK.
      https://forums.raspberrypi.com/viewtopic.php?t=363974

      I also tried supporting  frame sizes between the max and min by incrementing step sizes for resp. width and height (see attachment ioctl_stepwise_frame_size_nested_for.c). However this can take forever specially if the step is set to 1.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              timblechmann tim blechmann
              memakhlo Mehdi Ben Makhlouf
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes