[Interest] Adding/Tweaking camera support

Jason H jhihn at gmx.com
Mon Mar 4 17:00:00 CET 2019


I have a USB camera that does not work with Qt. I'm not sure I should file a bug just yet, as it's not really a standard camera. Below is the code and the output. How can I go about diagnosing the issue? It's detected and it uses gstreamer/v4l.  The error messages aren't that informative. 


import QtQuick 2.12
import QtQuick.Window 2.12
import QtMultimedia 5.12

Window {
    visible: true
    width: 640
    height: 480
    title: qsTr("Hello World")
    Camera {
        id: camera
    }
    VideoOutput {
        source: camera
        anchors.fill: parent
    }
    Component.onCompleted: console.log(JSON.stringify(QtMultimedia.availableCameras))
}

Which produces the following output:

QML debugging is enabled. Only use this in a safe environment.
qml: [{"deviceId":"/dev/video0","displayName":"DFK 27AUJ003","position":0,"orientation":0}]
Unable to query the parameter info: "Invalid argument"
Unable to query the parameter info: "Invalid argument"
Unable to query the parameter info: "Invalid argument"
Unable to query the parameter info: "Invalid argument"
Unable to query the parameter info: "Invalid argument"
libv4l2: error set_fmt gave us a different result then try_fmt!
CameraBin error: "Device '/dev/video0' cannot capture in the specified format"




More information about the Interest mailing list