Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
6.4.1
-
None
Description
QMediaPlayer playing video into a QVideoWidget fails to render properly on high-DPI displays. Used to have no issue in Qt 5.15.2.
QMediaPlayer *player = new QMediaPlayer(this); player->setSource(QUrl("rtsp://192.168.1.88/axis-media/media.amp")); player->setVideoOutput(ui_->videoView); player->play();
Produces the following output message:
qt.qpa.windows: setProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) failed: COM error 0x5 (Access is denied.)
And then renders the video into a small slightly off-window square in the corner of the main window (see attached screenshot).
Even with no QMediaPlayer, when a QVideoWidget is placed on a form and nothing is done with it, it draws a black square in the corner of the MainWindow.
The widget worked fine in Qt 5.15.2 and did not print any messages to the console. The equivalent QMediaPlayer playback also worked in 5.15.2.
The consequence is that QVideoWidget is unusable, and therefore QtMultimedia is not usable for video playback. I do not know of a workaround other than using a different media playback library or reverting to Qt5 (my ultimate solution for this application).