QVideoSink¶
The QVideoSink
class represents a generic sink for video data. More…
New in version 6.1.
Synopsis¶
Functions¶
def
setSubtitleText
(subtitle)def
setVideoFrame
(frame)def
subtitleText
()def
videoFrame
()def
videoSize
()
Signals¶
def
subtitleTextChanged
(subtitleText)def
videoFrameChanged
(frame)def
videoSizeChanged
()
Detailed Description¶
The QVideoSink
class can be used to retrieve video data on a frame by frame basis from Qt Multimedia.
QVideoSink
can operate in two modes. In the first mode, it can render the video stream to a native window of the underlying windowing system. In the other mode, it will provide individual video frames to the application developer through the signal.
The video frame can then be used to read out the data of those frames and handle them further. When using QPainter
, the QVideoFrame
can be drawing using the paint() method in QVideoSink
.
QVideoFrame
objects can consume a significant amount of memory or system resources and should thus not be held for longer than required by the application.
See also
- class PySide6.QtMultimedia.QVideoSink([parent=None])¶
- Parameters
parent –
PySide6.QtCore.QObject
Constructs a new QVideoSink
object with parent
.
- PySide6.QtMultimedia.QVideoSink.setSubtitleText(subtitle)¶
- Parameters
subtitle – str
Sets the current subtitle
text.
See also
- PySide6.QtMultimedia.QVideoSink.setVideoFrame(frame)¶
- Parameters
frame –
PySide6.QtMultimedia.QVideoFrame
Sets the current video frame
.
See also
- PySide6.QtMultimedia.QVideoSink.subtitleText()¶
- Return type
str
Returns the current subtitle text.
See also
- PySide6.QtMultimedia.QVideoSink.subtitleTextChanged(subtitleText)¶
- Parameters
subtitleText – str
- PySide6.QtMultimedia.QVideoSink.videoFrame()¶
- Return type
Returns the current video frame.
See also
- PySide6.QtMultimedia.QVideoSink.videoFrameChanged(frame)¶
- Parameters
frame –
PySide6.QtMultimedia.QVideoFrame
- PySide6.QtMultimedia.QVideoSink.videoSize()¶
- Return type
Returns the size of the video currently being played back. If no video is being played, this method returns an invalid size.
- PySide6.QtMultimedia.QVideoSink.videoSizeChanged()¶
© 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.