Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99969

QVideoSink and QCamera very slow

    XMLWordPrintable

Details

    • Android, Windows
    • 2022wk38FOQtforAndroid, 2022wk40FOQtforAndroid

    Description

      Hi,

      Found very slow QCamera and QVideoSink working. Not possible to use it.   Subscription to QVideoSink::videoFrameChanged catastrofically slowdowns application.
      On Android : I have two sources on the screen: avi video (megamind.avi from OpenCV as example) and QT camera. While first source played - all ok, but if I run camera - avi goes slow because application slowdowns.
      On windows: Qt camera very slow (6x times) against builtin OpenCV camera. This is checked in windows task manager.
      We have QVideoSink again unworkable. If on Win this behavior not so dramatically affects speed (1% cpu with OpenCV Camera  vs  6% with QCamera), but on Android application speed reduced to x10 times.

      connect(this, &QVideoSink::videoFrameChanged, this, &QTCam::hvideoFrameChanged);// <- catastrofically slowdowns (may be x10) application
      // without this subscription line - application works fast as expected
      m_captureSession.setVideoSink(this);

      void hvideoFrameChanged(const QVideoFrame &frame)
      {// no code here, only this empty :
      videoframeReady=true;
      #ifdef Q_OS_ANDROID
      static_cast<QVideoFrame>(frame).map(QVideoFrame::ReadOnly); // <- problem here ? or inside QT camera engine ? or inside subscription engine ?
      #endif
      }

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-99969
          # Subject Branch Project Status CR V

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              svar Va Ar
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes