QVideoProbe Class
The QVideoProbe class allows you to monitor video frames being played or recorded. More...
| Header: | #include <QVideoProbe> |
| qmake: | QT += multimedia |
| Inherits: | QObject |
Detailed Description
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
This same approach works with the QCamera object as well, to receive viewfinder or video frames as they are captured.
See also QAudioProbe, QMediaPlayer, and QCamera.