PySide6.QtMultimedia.QVideoSink¶
- class QVideoSink¶
- The - QVideoSinkclass 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 - QVideoSinkclass can be used to retrieve video data on a frame by frame basis from Qt Multimedia.- QVideoSinkwill 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 - QVideoFramecan be drawing using the paint() method in- QVideoSink.- QVideoFrameobjects 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_propertyis 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 - QVideoSinkobject with- parent.- 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 - subtitletext.- 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 - framechanges.- Getter of property - videoSizeᅟ.- videoSizeChanged()¶
 - Notification signal of property - videoSizeᅟ.