QVideoWidget gst-pipeline
-
Hi to everybody,
I'm new user and I'm approched to Qt on embedded system based on iMX8.
I'm try to play a fullHD video with Qt and I have some problems.
If the video play from shell the video is displayed correctly:gst-launch-1.0 multifilesrc location=textmp4.mp4 loop=true ! decodebin ! autovideosink
If the video play from Qt with QUrl :: fromLocalFile the video is displayed slowly with poor performance. I think this is normal. If the video play from Qt with gst-pipeline the screen is played correctly. Follows the code:
*void MainWindow::on_video_clicked()
{
videoWidget = new QVideoWidget;
player = new QMediaPlayer;player->setVideoOutput(videoWidget); //player->setMedia(QUrl("gst-pipeline: multifilesrc location=textmp4.mp4 ! decodebin ! waylandsink name=\"qtvideosink\"")); player->setMedia(QUrl::fromLocalFile("/home/root/textmp4.mp4")); connect( player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), this, SLOT(video_ended())); player->play(); videoWidget->showFullScreen();}*
So when the video is stopped and the widget is closed or hidden, the video remain displayed on the screen. Why is it not hooked to the widget.
Thanks.
Best regards -
Hi and welcome to devnet,
What if you use:
gst-pipeline: multifilesrc location=textmp4.mp4 ! decodebin ! qtvideosink?
-
no video shown.
In log this warning:
Warning: "Delayed linking failed."If I use
gst-pipeline: multifilesrc location=textmp4.mp4 ! decodebin name="qtvideosink"
or
gst-pipeline: multifilesrc location=textmp4.mp4 ! decodebin ! autovideosink name="qtvideosink"In log this warning:
qt.qpa.wayland: Wayland does not support QWindow::requestActivate() -
Which version of Qt are you using ?
-
That looks like the information by the Qt Creator about box. Do you really use 5.15.0 ? If so, can you test a more recent version like 5.15.2 ?