QT中VideoProbe的简介和实现
#include <QVideoProbe>
qmake: QT += multimedia
Inherits: QObject
Public Functions
QVideoProbe(QObject *parent = Q_NULLPTR)
~QVideoProbe()
bool isActive() const
bool setSource(QMediaObject *source)
bool setSource(QMediaRecorder *mediaRecorder)
void flush()
void videoFrameProbed(const QVideoFrame &frame)
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
_camera = qvariant_cast<QCamera*>(_qmlCamera->property("mediaObject"));
目前方向:图像拼接融合、图像识别 联系方式:jsxyhelu@foxmail.com