이 페이지에서

QVideoSink Class

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는 videoFrameChanged() 신호를 통해 애플리케이션 개발자에게 개별 비디오 프레임을 제공합니다.

그런 다음 비디오 프레임을 사용하여 해당 프레임의 데이터를 읽어내고 추가 처리를 진행할 수 있습니다. QPainter 를 사용할 때, QVideoFrame 는 paint() 메서드를 사용하여 그리기를 수행할 수 있습니다.

QVideoFrame 객체는 상당한 양의 메모리나 시스템 리소스를 소모할 수 있으므로, 애플리케이션에서 필요한 기간 이상으로 유지해서는 안 됩니다.

QMediaPlayer 및 QMediaCaptureSession도 참조하십시오 .

속성 문서

subtitleText : QString

현재 자막 텍스트를 반환합니다.

액세스 함수:

QString subtitleText() const
void setSubtitleText(const QString &subtitle)

알림 신호:

void subtitleTextChanged(const QString &subtitleText) const

[read-only] videoSize : 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 의 영상이 변경될 때 신호를 보냅니다.

© 2026 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.