Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QtQuick camera not working on 480x320 screen
QtWS25 Last Chance

QtQuick camera not working on 480x320 screen

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 1 Posters 423 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.
  • A Offline
    A Offline
    andyDT
    wrote on last edited by andyDT
    #1

    Hi, I have a Qt Quick application using the Qt Camera on a pi. It works fine via HDMI running at higher display resolution. However, when I configure to use my 480x320 screen (also on HDMI) the Qt Camera does not work. There appears to be no errors either. I know the camera works OK on the pi with the 480x320 screen as Raspivid works perfectly, so hardware issue ruled out.
    I've event tried the declarative camera example, which again works fine on higher res monitor, but as soon as I go down to 480x320, it fails. The camera is not even being switch on (zero cam led not on).

    Any ideas?

    Help mostly appreciated.

    Thanks

    EDIT: Interestingly with the 480x320 display installed (Kedei), QList<QCameraInfo>cameraInfos = QCameraInfo::availableCameras()
    returns 0!!!

    But it's there and working using raspivid, vlc, etc

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andyDT
      wrote on last edited by
      #3

      FINALLY!!!!!!!!!!!!!!

      adding bcm2835-v4l2 to sudo nano /etc/modules solved the problem.

      1 Reply Last reply
      1
      • A Offline
        A Offline
        andyDT
        wrote on last edited by
        #2

        Ok, so after a lot of messing around I nailed the cause of problem to the Kedei kernel.img.
        If I revert to the original kernel.img file then the Qt Camera works with a 480x320 resolution. However the touch screen is no longer working correctly. Going back to the Kedei kernel image, the Qt Camera does not work as it reports that it can't find the camera device even though the camera functions in VLC, raspivid, etc.
        This is rather puzzling. No solution but the cause identified.

        My application is not using platform xcb, rather OpenGL. Is there any other way to display the camera in QtQuick? Can I run raspivid in a child window within my Qt App? I did think about streaming silently from raspivid into libvlc plugin for Qt Quick, but this appears to be a slow update when tested on normal desktop VLC on Pi. I'm using pi zero!

        Any ideas welcome!

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andyDT
          wrote on last edited by
          #3

          FINALLY!!!!!!!!!!!!!!

          adding bcm2835-v4l2 to sudo nano /etc/modules solved the problem.

          1 Reply Last reply
          1

          • Login

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