Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

QVideoProbe not connecting to QMediaPlayer

$
0
0
Hello, I do everything as described in the documentation [qt-project.org], the video plays, but the probe is not connecting void MainWindow::initVideo() {     QWidget *videoPlaceholder = this->findChild<QWidget*>("videoPlaceholder");     QGridLayout *targetLayout = videoPlaceholder->findChild<QGridLayout*>("gridLayout");     this->videoSurface = new QVideoWidget(videoPlaceholder);     targetLayout->addWidget(this->videoSurface);     this->player = new QMediaPlayer(this);       QUrl videoURL = QUrl::fromLocalFile(this->inputVideo);     this->player->setMedia(videoURL);     this->player->setVideoOutput(this->videoSurface);     this->videoSurface->show();       this->probe = new QVideoProbe(this);     qDebug() << probe->setSource(this->player);     qDebug() << probe->isActive();     connect(probe,SIGNAL(videoFrameProbed(QVideoFrame)),this,SLOT(frameCaptured(QVideoFrame)));         this->player->play(); }   void MainWindow::frameCaptured(const QVideoFrame &frame) {     qDebug() << "get frame!"; //never called =( } What did I do wrong?

Viewing all articles
Browse latest Browse all 18427

Trending Articles