Unsolved How to get gstreamer inside of GUI
-
Hi I currently have this setup (see picture) for my GUI. But instead of the viewer popping up as its own window I wanted it to be in the "Video Widget Example" window. How would I be able to do this?
Here is one of my functions to help:
VideoPlayer::VideoPlayer(QWidget *parent) : QWidget(parent) { m_mediaPlayer = new QMediaPlayer(this, QMediaPlayer::VideoSurface); QVideoWidget *videoWidget = new QVideoWidget; m_playButton = new QPushButton; m_playButton->setEnabled(true); m_playButton->setIcon(style()->standardIcon(QStyle::SP_MediaPlay)); QAbstractButton *openButton = new QPushButton(tr("Open...")); connect(m_playButton, &QAbstractButton::clicked, this, &VideoPlayer::openFile); connect(m_playButton, &QAbstractButton::clicked, this, &VideoPlayer::play); m_errorLabel = new QLabel; m_errorLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); QBoxLayout *controlLayout = new QHBoxLayout; controlLayout->setMargin(0); controlLayout->addWidget(openButton); controlLayout->addWidget(m_playButton); //controlLayout->addWidget(m_positionSlider); QBoxLayout *layout = new QVBoxLayout; layout->addWidget(videoWidget); layout->addLayout(controlLayout); layout->addWidget(m_errorLabel); setLayout(layout); m_mediaPlayer->setVideoOutput(videoWidget); connect(m_mediaPlayer, &QMediaPlayer::stateChanged, this, &VideoPlayer::mediaStateChanged);
-
Hi,
Which version of Qt ?
Is it the one provided with your distribution ? -
QT Creator 4.12.4
Based on Qt 5.14.2 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit) -
That's the information from Qt Creator.
I asked for the Qt version you are using to build your project. -
It is 5.15.0
-
Can you test the version provided by your distribution ?