The QVideoSink class represents a generic sink for video data. More...
|CMake:|| find_package(Qt6 REQUIRED COMPONENTS Multimedia) |
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
|qmake:||QT += multimedia|
|QVideoSink(QObject *parent = nullptr)|
|void||setSubtitleText(const QString &subtitle)|
|void||setVideoFrame(const QVideoFrame &frame)|
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.
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.
Member Function Documentation
QVideoSink::QVideoSink(QObject *parent = nullptr)
Constructs a new QVideoSink object with parent.
Destroys the object.
void QVideoSink::setSubtitleText(const QString &subtitle)
Sets the current subtitle text.
See also subtitleText().
void QVideoSink::setVideoFrame(const QVideoFrame &frame)
Sets the current video frame.
See also videoFrame().
QString QVideoSink::subtitleText() const
Returns the current subtitle text.
See also setSubtitleText().
QVideoFrame QVideoSink::videoFrame() const
Returns the current video frame.
See also setVideoFrame().
QSize QVideoSink::videoSize() const
Returns the size of the video currently being played back. If no video is being played, this method returns an invalid size.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.