Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Access denied finding property "vendor.camera.aux.packagelist"
Forum Updated to NodeBB v4.3 + New Features

Access denied finding property "vendor.camera.aux.packagelist"

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
16 Posts 3 Posters 4.8k 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.
  • jsulmJ jsulm

    @Ivelin Connect a slot to https://doc.qt.io/qt-6/qimagecapture.html#readyForCaptureChanged - is it called?
    You can also check https://doc.qt.io/qt-5/qcamera.html#captureMode-prop

    I Offline
    I Offline
    Ivelin
    wrote on last edited by Ivelin
    #7

    @jsulm, no it is not being called. Seems like a bug?

        QMediaCaptureSession m_captureSession;
        QImageCapture *m_imageCapture = new QImageCapture;
    
        camera = new QCamera(QCameraDevice::FrontFace);
        m_captureSession.setCamera(camera);
    
        m_captureSession.setImageCapture(m_imageCapture);
    
        camera->start();
    
        if (!m_imageCapture->isReadyForCapture())
        {
            qDebug() << "Camera is not ready for capture";
        }
    
        QObject::connect(&btn, &QPushButton::clicked, [m_imageCapture, camera]()
                         {
                             qDebug() << camera->isActive() << " " << m_imageCapture->isReadyForCapture();
                             int id = m_imageCapture->captureToFile("/storage/emulated/0/Download/f.jpeg"); });
    
        QObject::connect(m_imageCapture, &QImageCapture::readyForCaptureChanged, []()
                         { qDebug() << "READYYYYYYYYYYYYYYYYYY"; });
    
    

    There is no "READYYYYYYYYYYYYYYYYYY" in my logs. I have tried both on Xiaomi and Samsung.

    jsulmJ 1 Reply Last reply
    0
    • I Ivelin

      @jsulm, no it is not being called. Seems like a bug?

          QMediaCaptureSession m_captureSession;
          QImageCapture *m_imageCapture = new QImageCapture;
      
          camera = new QCamera(QCameraDevice::FrontFace);
          m_captureSession.setCamera(camera);
      
          m_captureSession.setImageCapture(m_imageCapture);
      
          camera->start();
      
          if (!m_imageCapture->isReadyForCapture())
          {
              qDebug() << "Camera is not ready for capture";
          }
      
          QObject::connect(&btn, &QPushButton::clicked, [m_imageCapture, camera]()
                           {
                               qDebug() << camera->isActive() << " " << m_imageCapture->isReadyForCapture();
                               int id = m_imageCapture->captureToFile("/storage/emulated/0/Download/f.jpeg"); });
      
          QObject::connect(m_imageCapture, &QImageCapture::readyForCaptureChanged, []()
                           { qDebug() << "READYYYYYYYYYYYYYYYYYY"; });
      
      

      There is no "READYYYYYYYYYYYYYYYYYY" in my logs. I have tried both on Xiaomi and Samsung.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #8

      @Ivelin What Qt version do you use? Try with the latest one.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      I 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Ivelin What Qt version do you use? Try with the latest one.

        I Offline
        I Offline
        Ivelin
        wrote on last edited by
        #9

        @jsulm, I am using Qt 6.2.4.

        I try to stick to something older, so there is lower chance for bugs, unfortunately this doesn't seem to be the case, so I will try the latest one.

        jsulmJ JoeCFDJ 2 Replies Last reply
        0
        • I Ivelin

          @jsulm, I am using Qt 6.2.4.

          I try to stick to something older, so there is lower chance for bugs, unfortunately this doesn't seem to be the case, so I will try the latest one.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #10

          @Ivelin said in Access denied finding property "vendor.camera.aux.packagelist":

          I try to stick to something older, so there is lower chance for bugs

          Bugs get fixed in newer versions (of course new bugs are also introduced :-)).

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          I 1 Reply Last reply
          0
          • jsulmJ jsulm

            @Ivelin said in Access denied finding property "vendor.camera.aux.packagelist":

            I try to stick to something older, so there is lower chance for bugs

            Bugs get fixed in newer versions (of course new bugs are also introduced :-)).

            I Offline
            I Offline
            Ivelin
            wrote on last edited by
            #11

            @jsulm, hello

            Late update. It is not the version I am pretty sure.

            The Qt 6.2 example for camera works just fine, so it must be something from my code.

            Yes, I am still banging my head, so I can fix that problem. it is been a week now I am getting pretty desperate

            The problem must be in the code.

            Could someone please help me ? Any Ideas ?

            1 Reply Last reply
            0
            • I Offline
              I Offline
              Ivelin
              wrote on last edited by
              #12

              I also went over the whole documentation, but still can't see where is the problem in this simple code..

              1 Reply Last reply
              0
              • I Ivelin

                @jsulm, I am using Qt 6.2.4.

                I try to stick to something older, so there is lower chance for bugs, unfortunately this doesn't seem to be the case, so I will try the latest one.

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by
                #13

                @Ivelin QMultimedia module was reworked in Qt6. Better to use the latest version of Qt6.

                I 1 Reply Last reply
                0
                • JoeCFDJ JoeCFD

                  @Ivelin QMultimedia module was reworked in Qt6. Better to use the latest version of Qt6.

                  I Offline
                  I Offline
                  Ivelin
                  wrote on last edited by
                  #14

                  @JoeCFD, I am going to try With Qt 6.6 ( latest current ), but again the qt camera example for qt 6.2 worked just fine, so I suppose it should be a problem in the code.

                  JoeCFDJ 1 Reply Last reply
                  0
                  • I Ivelin

                    @JoeCFD, I am going to try With Qt 6.6 ( latest current ), but again the qt camera example for qt 6.2 worked just fine, so I suppose it should be a problem in the code.

                    JoeCFDJ Offline
                    JoeCFDJ Offline
                    JoeCFD
                    wrote on last edited by
                    #15

                    @Ivelin put or zip your whole test code somewhere for other people to be able to access for testing.

                    I 1 Reply Last reply
                    0
                    • JoeCFDJ JoeCFD

                      @Ivelin put or zip your whole test code somewhere for other people to be able to access for testing.

                      I Offline
                      I Offline
                      Ivelin
                      wrote on last edited by
                      #16

                      @JoeCFD, I will, but I just think that I have found something !

                      This is my current code:

                      int main(int argc, char *argv[])
                      {
                          QApplication a(argc, argv);
                      
                          checkPermission();
                          checkPermission1();
                      
                          QWidget widget;
                          QPushButton btn;
                          btn.setMinimumSize(QSize(200, 200));
                          btn.setText("Take a picutre");
                      
                          QVBoxLayout layout;
                          layout.addWidget(&btn);
                          widget.setLayout(&layout);
                      
                          QCamera *camera = new QCamera;
                          QMediaCaptureSession m_captureSession;
                          QImageCapture *m_imageCapture;
                      
                          camera = new QCamera(QCameraDevice::FrontFace);
                          m_captureSession.setCamera(camera);
                      
                          m_imageCapture = new QImageCapture;
                          m_captureSession.setImageCapture(m_imageCapture);
                          QObject::connect(camera, &QCamera::errorOccurred, [&camera]()
                                           {
                              if (camera->error() != QCamera::NoError)
                                  qDebug() << "ERROR: " << camera->errorString(); });
                      
                          QObject::connect(m_imageCapture, &QImageCapture::errorOccurred, [](int id, const QImageCapture::Error error, const QString &errorString)
                                           { qDebug() << "ERROR: " << errorString; });
                      
                          camera->start();
                      
                          QObject::connect(&btn, &QPushButton::clicked, [m_imageCapture, camera]()
                                           {
                                               qDebug() << camera->isActive() << " " << m_imageCapture->isReadyForCapture();
                                               int id = m_imageCapture->captureToFile("/storage/emulated/0/Download/f.jpeg"); });
                      
                          widget.show();
                          return a.exec();
                      }
                      

                      After having those QObject:connect for rrorOccured when clicking the button, so I can take a picture I get:

                      ERROR:  "Could not capture in stopped state"
                      

                      Maybe this is a valid lead ?

                      Could someone take a look?

                      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