The QVideoWindowControl class provides a media control for rendering video to a window. More...
Header: | #include <QVideoWindowControl> |
qmake: | QT += multimedia |
Inherits: | QMediaControl |
virtual | ~QVideoWindowControl() |
virtual Qt::AspectRatioMode | aspectRatioMode() const = 0 |
virtual int | brightness() const = 0 |
virtual int | contrast() const = 0 |
virtual QRect | displayRect() const = 0 |
virtual int | hue() const = 0 |
virtual bool | isFullScreen() const = 0 |
virtual QSize | nativeSize() const = 0 |
virtual void | repaint() = 0 |
virtual int | saturation() const = 0 |
virtual void | setAspectRatioMode(Qt::AspectRatioMode mode) = 0 |
virtual void | setBrightness(int brightness) = 0 |
virtual void | setContrast(int contrast) = 0 |
virtual void | setDisplayRect(const QRect &rect) = 0 |
virtual void | setFullScreen(bool fullScreen) = 0 |
virtual void | setHue(int hue) = 0 |
virtual void | setSaturation(int saturation) = 0 |
virtual void | setWinId(WId id) = 0 |
virtual WId | winId() const = 0 |
void | brightnessChanged(int brightness) |
void | contrastChanged(int contrast) |
void | fullScreenChanged(bool fullScreen) |
void | hueChanged(int hue) |
void | nativeSizeChanged() |
void | saturationChanged(int saturation) |
QVideoWindowControl(QObject *parent = nullptr) |
The QVideoWindowControl class provides a media control for rendering video to a window.
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.
[protected]
QVideoWindowControl::QVideoWindowControl(QObject *parent = nullptr)Constructs a new video window control with the given parent.
[virtual]
QVideoWindowControl::~QVideoWindowControl()Destroys a video window control.
[pure virtual]
Qt::AspectRatioMode QVideoWindowControl::aspectRatioMode()
constReturns how video is scaled to fit the display region with respect to its aspect ratio.
See also setAspectRatioMode().
[pure virtual]
int QVideoWindowControl::brightness() constReturns the brightness adjustment applied to a video overlay.
Valid brightness values range between -100 and 100, the default is 0.
See also setBrightness().
[signal]
void QVideoWindowControl::brightnessChanged(int brightness)Signals that a video overlay's brightness adjustment has changed.
[pure virtual]
int QVideoWindowControl::contrast() constReturns the contrast adjustment applied to a video overlay.
Valid contrast values range between -100 and 100, the default is 0.
See also setContrast().
[signal]
void QVideoWindowControl::contrastChanged(int contrast)Signals that a video overlay's contrast adjustment has changed.
[pure virtual]
QRect QVideoWindowControl::displayRect()
constReturns the sub-rect of a window where video is displayed.
See also setDisplayRect().
[signal]
void QVideoWindowControl::fullScreenChanged(bool fullScreen)Signals that the fullScreen state of a video overlay has changed.
[pure virtual]
int QVideoWindowControl::hue() constReturns the hue adjustment applied to a video overlay.
Value hue values range between -100 and 100, the default is 0.
See also setHue().
[signal]
void QVideoWindowControl::hueChanged(int
hue)Signals that a video overlay's hue adjustment has changed.
[pure virtual]
bool QVideoWindowControl::isFullScreen() constIdentifies if a video overlay is a fullScreen overlay.
Returns true if the video overlay is fullScreen, and false otherwise.
[pure virtual]
QSize QVideoWindowControl::nativeSize()
constReturns a suggested size for the video display based on the resolution and aspect ratio of the video.
[signal]
void QVideoWindowControl::nativeSizeChanged()Signals that the native dimensions of the video have changed.
[pure virtual]
void QVideoWindowControl::repaint()Repaints the last frame.
[pure virtual]
int QVideoWindowControl::saturation() constReturns the saturation adjustment applied to a video overlay.
Value saturation values range between -100 and 100, the default is 0.
See also setSaturation().
[signal]
void QVideoWindowControl::saturationChanged(int saturation)Signals that a video overlay's saturation adjustment has changed.
[pure virtual]
void QVideoWindowControl::setAspectRatioMode(Qt::AspectRatioMode mode)Sets the aspect ratio mode which determines how video is scaled to the fit the display region with respect to its aspect ratio.
See also aspectRatioMode().
[pure virtual]
void QVideoWindowControl::setBrightness(int brightness)Sets a brightness adjustment for a video overlay.
Valid brightness values range between -100 and 100, the default is 0.
See also brightness().
[pure virtual]
void QVideoWindowControl::setContrast(int
contrast)Sets the contrast adjustment for a video overlay.
Valid contrast values range between -100 and 100, the default is 0.
See also contrast().
[pure virtual]
void QVideoWindowControl::setDisplayRect(const QRect &rect)Sets the sub-rect of a window where video is displayed.
See also displayRect().
[pure virtual]
void QVideoWindowControl::setFullScreen(bool fullScreen)Sets whether a video overlay is a fullScreen overlay.
See also isFullScreen().
[pure virtual]
void QVideoWindowControl::setHue(int hue)Sets a hue adjustment for a video overlay.
Valid hue values range between -100 and 100, the default is 0.
See also hue().
[pure virtual]
void QVideoWindowControl::setSaturation(int saturation)Sets a saturation adjustment for a video overlay.
Valid saturation values range between -100 and 100, the default is 0.
See also saturation().
[pure virtual]
void QVideoWindowControl::setWinId(WId id)Sets the id of the window a video overlay end point renders to.
See also winId().
[pure virtual]
WId QVideoWindowControl::winId() constReturns the ID of the window a video overlay end point renders to.
See also setWinId().
org.qt-project.qt.videowindowcontrol/5.0
Defines the interface name of the QVideoWindowControl class.