QVideoSink

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

Inheritance diagram of PySide6.QtMultimedia.QVideoSink

New in version 6.1.

Synopsis

Functions

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.

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

parentPySide6.QtCore.QObject

Constructs a new QVideoSink object with parent.

PySide6.QtMultimedia.QVideoSink.setSubtitleText(subtitle)
Parameters

subtitle – str

Sets the current subtitle text to subtitle.

See also

subtitleText()

PySide6.QtMultimedia.QVideoSink.setVideoFrame(frame)
Parameters

framePySide6.QtMultimedia.QVideoFrame

Sets the current video frame to frame.

See also

videoFrame()

PySide6.QtMultimedia.QVideoSink.subtitleText()
Return type

str

Returns the current subtitle text.

PySide6.QtMultimedia.QVideoSink.subtitleTextChanged(subtitleText)
Parameters

subtitleText – str

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

PySide6.QtMultimedia.QVideoSink.videoSize()
Return type

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.

PySide6.QtMultimedia.QVideoSink.videoSizeChanged()