class 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#

Methods#

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.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property subtitleTextᅟ: str#

Returns the current subtitle text.

Access functions:
property videoSizeᅟ: 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:
__init__([parent=None])#
Parameters:

parentQObject

Constructs a new QVideoSink object with parent.

rhi()#
Return type:

QRhi

Returns the QRhi instance being used to create texture data in the video frames.

setRhi(rhi)#
Parameters:

rhiQRhi

setSubtitleText(subtitle)#
Parameters:

subtitle – str

Sets the current subtitle text.

See also

subtitleText()

Setter of property subtitleTextᅟ .

setVideoFrame(frame)#
Parameters:

frameQVideoFrame

Sets the current video frame.

See also

videoFrame()

subtitleText()#
Return type:

str

Getter of property subtitleTextᅟ .

subtitleTextChanged(subtitleText)#
Parameters:

subtitleText – str

Notification signal of property subtitleTextᅟ .

videoFrame()#
Return type:

QVideoFrame

Returns the current video frame.

See also

setVideoFrame()

videoFrameChanged(frame)#
Parameters:

frameQVideoFrame

Signals when the video frame changes.

videoSize()#
Return type:

QSize

Getter of property videoSizeᅟ .

videoSizeChanged()#

Notification signal of property videoSizeᅟ .