- class QVideoSink¶
The
QVideoSink
class represents a generic sink for video data. More…Added in version 6.1.
Synopsis¶
Properties¶
Methods¶
def
__init__()
def
rhi()
def
setRhi()
def
setVideoFrame()
def
subtitleText()
def
videoFrame()
def
videoSize()
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 thevideoFrameChanged()
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 inQVideoSink
.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
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:
Returns the size of the video currently being played back. If no video is being played, this method returns an invalid size.
- Access functions:
Signal
videoSizeChanged()
Constructs a new
QVideoSink
object withparent
.- rhi()¶
- Return type:
QRhi
Returns the QRhi instance being used to create texture data in the video frames.
- setRhi(rhi)¶
- Parameters:
rhi –
QRhi
- setSubtitleText(subtitle)¶
- Parameters:
subtitle – str
Sets the current
subtitle
text.See also
Setter of property
subtitleTextᅟ
.- setVideoFrame(frame)¶
- Parameters:
frame –
QVideoFrame
Sets the current video
frame
.See also
- subtitleText()¶
- Return type:
str
See also
Getter of property
subtitleTextᅟ
.- subtitleTextChanged(subtitleText)¶
- Parameters:
subtitleText – str
Notification signal of property
subtitleTextᅟ
.- videoFrame()¶
- Return type:
Returns the current video frame.
See also
- videoFrameChanged(frame)¶
- Parameters:
frame –
QVideoFrame
Signals when the video
frame
changes.Getter of property
videoSizeᅟ
.- videoSizeChanged()¶
Notification signal of property
videoSizeᅟ
.