QVideoProbe¶
The
QVideoProbe
class allows you to monitor video frames being played or recorded. More…
Synopsis¶
Functions¶
Signals¶
def
flush
()def
videoFrameProbed
(frame)
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 myVideoSurfaceThis same approach works with the
QCamera
object as well, to receive viewfinder or video frames as they are captured.See also
- class PySide2.QtMultimedia.QVideoProbe([parent=None])¶
- param parent:
Creates a new
QVideoProbe
class withparent
. After setting the source to monitor withsetSource()
, thevideoFrameProbed()
signal will be emitted when video frames are flowing in the source media object.
- PySide2.QtMultimedia.QVideoProbe.flush()¶
- PySide2.QtMultimedia.QVideoProbe.isActive()¶
- Return type:
bool
Returns true if this probe is monitoring something, or false otherwise.
The source being monitored does not need to be active.
- PySide2.QtMultimedia.QVideoProbe.setSource(source)¶
- Parameters:
source –
PySide2.QtMultimedia.QMediaObject
- Return type:
bool
Sets the media object to monitor to
source
.If
source
is zero, this probe will be deactivated and this function wil return true.If the media object does not support monitoring video, this function will return false.
Any previously monitored objects will no longer be monitored. Passing in the same object will be ignored, but monitoring will continue.
- PySide2.QtMultimedia.QVideoProbe.setSource(source)
- Parameters:
source –
PySide2.QtMultimedia.QMediaRecorder
- Return type:
bool
Starts monitoring the given
mediaRecorder
.If there is no mediaObject associated with
mediaRecorder
, or if it is zero, this probe will be deactivated and this function wil return true.If the media recorder instance does not support monitoring video, this function will return false.
Any previously monitored objects will no longer be monitored. Passing in the same object will be ignored, but monitoring will continue.
- PySide2.QtMultimedia.QVideoProbe.videoFrameProbed(frame)¶
- Parameters:
frame –
PySide2.QtMultimedia.QVideoFrame
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.