Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.2, 6.7.0 Beta3
-
None
-
"windows" multimedia backend
-
-
b59bf3fd5 (dev), 961961da7 (6.7), f9e44002c (6.6), d19eb45bf (tqtc/lts-6.5)
Description
QMediaPlayer failed to set topology on custom QVideoSink on Windows with 'windows' multimedia backend. Regression for Qt 6.6.2, no such problem with Qt 6.6.1 and earlier. Note: reproduced not for every video sample.
There is a sample project VideoPreview.zip , which generates image from the first video frame in C++ code and displays it in QML via custom image provider.
C++ code (simplified):
class VideoPreviewProvider : public QQuickImageProvider { public: VideoPreviewProvider() : QQuickImageProvider(QQuickImageProvider::Image) {} QImage requestImage(const QString &imageId, QSize *, const QSize &) override { QImage preview; QEventLoop loop; QVideoSink sink; QObject::connect(&sink, &QVideoSink::videoFrameChanged, [&] (const QVideoFrame& frame) { preview = frame.toImage(); loop.quit(); }); QMediaPlayer player; player.setVideoOutput(&sink); player.setSource(imageId); player.play(); loop.exec(); return preview; } };
Steps to reproduce:
1. Build and run attached project VideoPreview.zip
2. Open attached video video_1280.mp4
3, Observe debug output
Actual result: no video preview is displayed. Error in the debug output.
Error QMediaPlayer::ResourceError : "Failed to set topology."
Expected result: video preview is displayed, no errors
Attachments
Issue Links
- relates to
-
QTBUG-122817 [REG 6.6.1-6.6.2] [windows] QML MediaPlayer unable to play a video when 'audioOutput' is not specified
- Closed
-
QTBUG-122889 [REG: 6.5.4 -> 6.5.5] videowidget- fails to play video
- Closed