Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.13.0
-
None
-
-
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
For Gerrit Dashboard: QTBUG-77849 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
272141,4 | DirectShow: Add startTime and endTime to QVideoFrame | 5.12 | qt/qtmultimedia | Status: MERGED | +2 | 0 |