Details
-
Bug
-
Resolution: Done
-
P4: Low
-
6.2.0 Beta1
-
None
-
-
3ab77c90c4b199fdb09184ba8347872b38925657 (qt/qtmultimedia/dev) 0350374dcdf7e13478f6696c940b8b86fc67c2af (qt/qtmultimedia/6.2)
Description
in Qt5, one can, behind the scenes, create a temp QMediaPlayer and a QGraphicsVideoItem, get its surface, and hook in to surfaceFormatChanged() signal, start playback (secretly), and wait for the signal, then grab the dimensions.
this is not possible in Qt6.
i've tried hooking into all these signals:
QVideoSink::newVideoFrame()
QMediaPlayer::mediaStatusChanged(), hasVideoChanged(), metaDataChanged(), videoOutputChanged()
but either they don't get called within 5 seconds, OR they get called but the dimensions of the QVideoSink are still (0, 0).
Please provide a method to get the dimensions of a video without having to play it in a window.
more info:
https://forum.qt.io/topic/128381/qt6-porting-guidance-qmediaplayer
see the section "Question 2"