QVideoSink#
The QVideoSink
class represents a generic sink for video data. More…
New in version 6.1.
Synopsis#
Properties#
Functions#
def
setSubtitleText
(subtitle)def
setVideoFrame
(frame)def
subtitleText
()def
videoFrame
()def
videoSize
()
Signals#
def
subtitleTextChanged
(subtitleText)def
videoFrameChanged
(frame)def
videoSizeChanged
()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description#
The QVideoSink
class can be used to retrieve video data on a frame by frame basis from Qt Multimedia.
QVideoSink
will provide individual video frames to the application developer through the videoFrameChanged()
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
.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtMultimedia.QVideoSink.subtitleText: str#
Returns the current subtitle text.
- Access functions:
subtitleText
()setSubtitleText
(subtitle)Signal
subtitleTextChanged
(subtitleText)
- property PᅟySide6.QtMultimedia.QVideoSink.videoSize: PySide6.QtCore.QSize#
Returns the size of the video currently being played back. If no video is being played, this method returns an invalid size.
- Access functions:
videoSize
()Signal
videoSizeChanged
()
- PySide6.QtMultimedia.QVideoSink.setSubtitleText(subtitle)#
- Parameters:
subtitle – str
Sets the current subtitle
text.
See also
Setter of property subtitleText
.
- PySide6.QtMultimedia.QVideoSink.setVideoFrame(frame)#
- Parameters:
frame –
PySide6.QtMultimedia.QVideoFrame
Sets the current video frame
.
See also
- PySide6.QtMultimedia.QVideoSink.subtitleText()#
- Return type:
str
See also
Getter of property subtitleText
.
- PySide6.QtMultimedia.QVideoSink.subtitleTextChanged(subtitleText)#
- Parameters:
subtitleText – str
Notification signal of property subtitleText
.
- PySide6.QtMultimedia.QVideoSink.videoFrame()#
- Return type:
Returns the current video frame.
See also
- PySide6.QtMultimedia.QVideoSink.videoFrameChanged(frame)#
- Parameters:
frame –
PySide6.QtMultimedia.QVideoFrame
Signals when the video frame
changes.
- PySide6.QtMultimedia.QVideoSink.videoSize()#
- Return type:
Getter of property videoSize
.
- PySide6.QtMultimedia.QVideoSink.videoSizeChanged()#
Notification signal of property videoSize
.