QMediaPlayer, saving frame
I want to save image of the frame. After reading of manuals, I have been understood, that I should to use QVideoProbe. I use the following code from manual
QMediaPlayer *player = new QMediaPlayer(); QVideoProbe *probe = new QVideoProbe; connect(probe, SIGNAL(videoFrameProbed(QVideoFrame)), this, SLOT(processFrame(QVideoFrame))); qDebug()<<probe->setSource(player); // Returns true, hopefully. player->setVideoOutput(myVideoSurface); player->setMedia(QUrl::fromLocalFile("observation.mp4")); player->play(); // Start receving frames as they get presented to myVideoSurface
But I always have FALSE on probe->setSource(player);
so my slot processFrame is not triggered.
What I do wrong ?
Can any body point me to working example
Depending on your platform, the probe might not be available.