Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. “QtMultimedia.availableCameras” does not return list of all available cameras

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 1.6k Views 1 Watching
  • 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.
  • N Offline
    N Offline
    neda
    wrote on last edited by neda
    #1

    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".

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

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

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

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

        N Offline
        N Offline
        neda
        wrote on last edited by neda
        #3

        @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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          N 1 Reply Last reply
          0
          • SGaistS SGaist

            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.

            N Offline
            N Offline
            neda
            wrote on last edited by neda
            #5

            @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"
            
            SGaistS 1 Reply Last reply
            0
            • N neda

              @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"
              
              SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @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 ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

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