QVideoWindowControl Class

The QVideoWindowControl class provides a media control for rendering video to a window. More...

Header: #include <QVideoWindowControl>
qmake: QT += multimedia
Inherits: QMediaControl

This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Macros

Detailed Description

The winId() property QVideoWindowControl allows a platform specific window ID to be set as the video render target of a QMediaService. The displayRect() property is used to set the region of the window the video should be rendered to, and the aspectRatioMode() property indicates how the video should be scaled to fit the displayRect().

 QVideoWindowControl *windowControl = mediaService->requestControl<QVideoWindowControl *>();
 windowControl->setWinId(widget->winId());
 windowControl->setDisplayRect(widget->rect());
 windowControl->setAspectRatioMode(Qt::KeepAspectRatio);

QVideoWindowControl is one of a number of possible video output controls.

The interface name of QVideoWindowControl is org.qt-project.qt.videowindowcontrol/5.0 as defined in QVideoWindowControl_iid.

See also QMediaService::requestControl() and QVideoWidget.

Macro Documentation

QVideoWindowControl_iid

org.qt-project.qt.videowindowcontrol/5.0

Defines the interface name of the QVideoWindowControl class.