QVideoSink#

The QVideoSink class represents a generic sink for video data. More

Inheritance diagram of PySide6.QtMultimedia.QVideoSink

New in version 6.1.

Synopsis#

Properties#

Functions#

Signals#

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.

class PySide6.QtMultimedia.QVideoSink([parent=None])#
Parameters:

parentPySide6.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:
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:
PySide6.QtMultimedia.QVideoSink.setSubtitleText(subtitle)#
Parameters:

subtitle – str

Sets the current subtitle text.

See also

subtitleText()

Setter of property subtitleText .

PySide6.QtMultimedia.QVideoSink.setVideoFrame(frame)#
Parameters:

framePySide6.QtMultimedia.QVideoFrame

Sets the current video frame.

See also

videoFrame()

PySide6.QtMultimedia.QVideoSink.subtitleText()#
Return type:

str

Getter of property subtitleText .

PySide6.QtMultimedia.QVideoSink.subtitleTextChanged(subtitleText)#
Parameters:

subtitleText – str

Notification signal of property subtitleText .

PySide6.QtMultimedia.QVideoSink.videoFrame()#
Return type:

PySide6.QtMultimedia.QVideoFrame

Returns the current video frame.

See also

setVideoFrame()

PySide6.QtMultimedia.QVideoSink.videoFrameChanged(frame)#
Parameters:

framePySide6.QtMultimedia.QVideoFrame

Signals when the video frame changes.

PySide6.QtMultimedia.QVideoSink.videoSize()#
Return type:

PySide6.QtCore.QSize

Getter of property videoSize .

PySide6.QtMultimedia.QVideoSink.videoSizeChanged()#

Notification signal of property videoSize .