QVideoSink 類錶示視頻數據的一般匯點。 更多...
| 頭: |
#include <QVideoSink>
|
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS Multimedia)
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
|
| qmake: |
QT += multimedia
|
| 繼承: | QObject |
| QVideoSink (QObject * parent = nullptr) | |
| virtual | ~QVideoSink () override |
| QRhi * | rhi () const |
| void | setSubtitleText (const QString & subtitle ) |
| void | setVideoFrame (const QVideoFrame & frame ) |
| QString | subtitleText () const |
| QVideoFrame | videoFrame () const |
| QSize | videoSize () const |
| void | subtitleTextChanged (const QString & subtitleText ) const |
| void | videoFrameChanged (const QVideoFrame & frame ) const |
| void | videoSizeChanged () |
QVideoSink 類可以用於從 Qt Multimedia 逐幀檢索視頻數據。
QVideoSink will provide individual video frames to the application developer through the videoFrameChanged () 信號。
The video frame can then be used to read out the data of those frames and handle them further. When using QPainter , QVideoFrame can be drawing using the paint () 方法。
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.
另請參閱 QMediaPlayer and QMediaCaptureSession .
返迴當前字幕文本。
訪問函數:
| QString | subtitleText () const |
| void | setSubtitleText (const QString & subtitle ) |
通知程序信號:
| void | subtitleTextChanged (const QString & subtitleText ) const |
[read-only]
videoSize
: const
QSize
Returns the size of the video currently being played back. If no video is being played, this method returns an invalid size.
訪問函數:
| QSize | videoSize () const |
通知程序信號:
| void | videoSizeChanged () |
構造新的 QVideoSink 對象采用 parent .
[override virtual noexcept]
QVideoSink::
~QVideoSink
()
銷毀對象。
返迴 QRhi instance being used to create texture data in the video frames.
設置當前 subtitle 文本。
注意: setter 函數對於特性 subtitleText .
另請參閱 subtitleText ().
設置當前視頻 frame .
另請參閱 videoFrame ().
返迴當前視頻幀。
另請參閱 setVideoFrame ().
[signal]
void
QVideoSink::
videoFrameChanged
(const
QVideoFrame
&
frame
) const
Signals when the video frame 改變。