Playing a GStreamer Pipeline on QGraphicsView
Unsolved
General and Desktop
-
Hey, I'm trying to run a basic GStreamer pipeline on the QGraphicsView widget but when I execute the program I get the following error:
GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=%22qtvideosink%22" GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=%22qtvideosink%22" Error: "No URI handler implemented for \"gst-pipeline\"."
You can see my code down below:
header (.h) fileQMediaPlayer *player_1 = new QMediaPlayer(this, QMediaPlayer::VideoSurface); QGraphicsVideoItem *item_1 = new QGraphicsVideoItem; QGraphicsScene *scene_1 = new QGraphicsScene;
.cpp file
ui->graphicsView->setScene(scene_1); ui->graphicsView->scene()->addItem(item_1); player_1->setVideoOutput(item_1); item_1->setSize(QSizeF(width, height)); player_1->setMedia(QUrl("gst-pipeline: videotestsrc ! videoconvert ! ximagesink name=\"qtvideosink\"")); player_1->setMuted(true); player_1->play();
I want to use QGraphicsView because it is available in the UI Designer so I can manipulate it easily. I've tried different sinks but I either get this error or I get an empty screen.
Thanks. -
Hi,
What happens if you use the minimal example from the documentation:
player = new QMediaPlayer; videoWidget = new QVideoWidget; videoWidget->show(); player->setVideoOutput(videoWidget); player->setMedia(QUrl("gst-pipeline: videotestsrc ! xvimagesink name=\"qtvideosink\"")); player->play();
?
-
I get these two windows and the output below on the application output
GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! xvimagesink name=%22qtvideosink%22" GStreamer; Unable to pause - "gst-pipeline: videotestsrc ! xvimagesink name=%22qtvideosink%22" Error: "No URI handler implemented for \"gst-pipeline\"."