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

QVideoFrame does not report correct startTime() and endTime()

    XMLWordPrintable

Details

    • Windows
    • 94852a47c130c3dc265d900390bf0d7b53cbab3e (qt/qtmultimedia/5.12)

    Description

      When a QAbstractVideoSurface is connected to a QMediaPlayer via QMediaPlayer::setVideoOutput() the QAbstractVideoSurface::present(QVideoFrame) function is used to grab frames.
      Once QMediaPlayer::setPosition(int) was called, the QVideoFrames which arrive in the present() function do not contain correct startTime() and endTime() (They seem to be their position respective to the keyframe and not the whole video).
      Also QVideoFrame does not contain any meta data at all. Tested with multiple files from different sources.

       

      EDIT: This is reproducible by using the standard "media player example" and adding this code to histogramwidget.cpp:

       

      void HistogramWidget::processFrame(QVideoFrame frame)
      {
       qInfo() <<" START:" <<frame.startTime() << " END: "<< frame.endTime(); // this is new
       if (m_isBusy && frame.isValid())
       return; //drop frame
      m_isBusy = true;
       QMetaObject::invokeMethod(&m_processor, "processFrame",
       Qt::QueuedConnection, Q_ARG(QVideoFrame, frame), Q_ARG(int, m_levels));
      }
      

      It will always print out -1 for frame.startTime()  and frame.endTime()

      I use "K-Lite Codec Pack"

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            valentyn.doroshchuk Valentyn Doroshchuk
            ebbler ebbler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes