QVideoSink Class
QVideoSink 클래스는 비디오 데이터에 대한 일반 싱크를 나타냅니다. 더 보기...
헤더: | #include <QVideoSink> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Multimedia) target_link_libraries(mytarget PRIVATE Qt6::Multimedia) |
qmake: | QT += multimedia |
상속합니다: | QObject |
속성
- subtitleText : QString
- videoSize : const QSize
공공 기능
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는 videoFrameChanged() 신호를 통해 애플리케이션 개발자에게 개별 비디오 프레임을 제공합니다.
그러면 비디오 프레임은 해당 프레임의 데이터를 읽고 추가 처리를 위해 사용될 수 있습니다. QPainter 를 사용할 때 QVideoFrame 는 QVideoSink의 paint() 메서드를 사용하여 그릴 수 있습니다.
QVideoFrame 객체는 상당한 양의 메모리 또는 시스템 리소스를 소비할 수 있으므로 애플리케이션에서 요구하는 것보다 오래 보유해서는 안 됩니다.
QMediaPlayer 및 QMediaCaptureSession 을참조하십시오 .
속성 문서
subtitleText : QString
현재 자막 텍스트를 반환합니다.
함수에 액세스합니다:
QString | subtitleText() const |
void | setSubtitleText(const QString &subtitle) |
알림 신호:
void | subtitleTextChanged(const QString &subtitleText) const |
[read-only]
videoSize : const QSize
현재 재생 중인 동영상의 크기를 반환합니다. 재생 중인 동영상이 없는 경우 이 메서드는 잘못된 크기를 반환합니다.
함수 액세스:
QSize | videoSize() const |
알림 신호:
void | videoSizeChanged() |
멤버 함수 문서
QVideoSink::QVideoSink(QObject *parent = nullptr)
parent 를 사용하여 새 QVideoSink 객체를 생성합니다.
[override virtual noexcept]
QVideoSink::~QVideoSink()
개체를 파괴합니다.
QRhi *QVideoSink::rhi() const
비디오 프레임에서 텍스처 데이터를 생성하는 데 사용되는 QRhi 인스턴스를 반환합니다.
void QVideoSink::setSubtitleText(const QString &subtitle)
현재 subtitle 텍스트를 설정합니다.
참고: 속성에 대한 세터 함수 subtitleText.
subtitleText()도 참조하세요 .
void QVideoSink::setVideoFrame(const QVideoFrame &frame)
현재 동영상을 설정합니다 frame.
videoFrame()도 참조하세요 .
QVideoFrame QVideoSink::videoFrame() const
현재 비디오 프레임을 반환합니다.
setVideoFrame()도 참조하세요 .
[signal]
void QVideoSink::videoFrameChanged(const QVideoFrame &frame) const
동영상 frame 이 변경되면 신호를 보냅니다.
© 2025 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.