How to catch frame in QT Multimedia application using QVideoFrame?
I developed application on Qt which can play video from local file location using QVideoWidget, QMediaPlayer, etc. Now I want to catch frame and show video on an application using QVideoFrame. Please help to sort out this problem, give some basic example for how to use QVideoFrame to catch frame and show video?
Do you mean QVideoProbe ?
@SGaist : I have no idea about QVideoProbe but using QVideoFrame we can show frame on player... so I want to one example which one use QVideoFrame.
Maybe you should check the link SGaist provided you?
It even has an example with a QVideoFrame in it:
QMediaPlayer *player = new QMediaPlayer(); QVideoProbe *probe = new QVideoProbe; connect(probe, SIGNAL(videoFrameProbed(QVideoFrame)), this, SLOT(processFrame(QVideoFrame))); probe->setSource(player); // Returns true, hopefully. player->setVideoOutput(myVideoSurface); player->setMedia(QUrl::fromLocalFile("observation.mp4")); player->play(); // Start receiving frames as they get presented to myVideoSurface