Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtQuick camera not working on 480x320 screen



  • 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



  • FINALLY!!!!!!!!!!!!!!

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



  • 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!



  • FINALLY!!!!!!!!!!!!!!

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


Log in to reply