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

“QtMultimedia.availableCameras” does not return list of all available cameras



  • Hi,
    I use "QCameraInfo::availableCameras" for show list of available cameras. It works for a lot of cameras. But I have a new camera and it does not exist in list. This camera have a application and it works by self application. Also I can see that in node imaging devices in Device Manager.
    0_1559545499880_1.JPG
    0_1559545505762_camara-31mp-microscopio-amscope-mu300-con-lente-05x-fma050-D_NQ_NP_866334-MCO29131113551_012019-O.jpg
    The OS I'm using right now is Windows 10x64. I use Qt 5.11.2 (MSVC 2015, 32 bit).

    I use this codes in QML and C++:

    QtMultimedia.availableCameras.
    qDebug()<<QCameraInfo::availableCameras().count();
    

    My codes return list of all camera except "FMA050".


  • Lifetime Qt Champion

    Hi,

    What kind of camera is that ?
    How is it connected ?



  • @SGaist said in “QtMultimedia.availableCameras” does not return list of all available cameras:

    Thanks

    What kind of camera is that ?

    Standard C-Mount camera with Aptina CMOS sensor.
    http://touptek.com/product/showproduct.php?lang=en&id=274

    How is it connected ?

    USB


  • Lifetime Qt Champion

    So it's a camera with custom SDK provided. Since DirectShow is mentioned did you already tried to access the camera through it ?

    Qt has a DirectShow backend, check whether your application loads it using the QT_DEBUG_PLUGINS environment variable set to 1.



  • @SGaist

    So it's a camera with custom SDK provided. Since DirectShow is mentioned did you already tried to access the camera through it ?

    No

    check whether your application loads it using the QT_DEBUG_PLUGINS environment variable set to 1.

    I start my application with the QT_DEBUG_PLUGINS set to 1 but to no avail.

    main.cpp

    qputenv("QT_DEBUG_PLUGINS", QByteArray("1"));
    

    Application output:

    QMediaPluginLoader: loading metadata for iid  "org.qt-project.qt.mediaserviceproviderfactory/5.0"  at location  "/mediaservice"
    QMediaPluginLoader: Inserted index  0  into metadata:  QJsonObject({"Keys":["directshow"],"Services":["org.qt-project.qt.camera","org.qt-project.qt.mediaplayer"],"index":0})
    QMediaPluginLoader: Inserting new list for key:  "org.qt-project.qt.camera"
    QMediaPluginLoader: Inserting new list for key:  "org.qt-project.qt.mediaplayer"
    QMediaPluginLoader: Inserted index  1  into metadata:  QJsonObject({"Keys":["audiocapture"],"Services":["org.qt-project.qt.audiosource"],"index":1})
    QMediaPluginLoader: Inserting new list for key:  "org.qt-project.qt.audiosource"
    QMediaPluginLoader: Inserted index  2  into metadata:  QJsonObject({"Keys":["windowsmediafoundation"],"Services":["org.qt-project.qt.audiodecode"],"index":2})
    QMediaPluginLoader: Inserting new list for key:  "org.qt-project.qt.audiodecode"
    

  • Lifetime Qt Champion

    @neda said in “QtMultimedia.availableCameras” does not return list of all available cameras:

    So it's a camera with custom SDK provided. Since DirectShow is mentioned did you already tried to access the camera through it ?

    No

    Can you test that ? Is there anything mentioning registering the DirectShow filter for that camera ?


Log in to reply