QVideoWindowControl

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

Inheritance diagram of PySide2.QtMultimedia.QVideoWindowControl

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

requestControl() QVideoWidget

class PySide2.QtMultimedia.QVideoWindowControl([parent=None])
param parent

PySide2.QtCore.QObject

Constructs a new video window control with the given parent .

PySide2.QtMultimedia.QVideoWindowControl.aspectRatioMode()
Return type

AspectRatioMode

Returns how video is scaled to fit the display region with respect to its aspect ratio.

PySide2.QtMultimedia.QVideoWindowControl.brightness()
Return type

int

Returns the brightness adjustment applied to a video overlay.

Valid brightness values range between -100 and 100, the default is 0.

See also

setBrightness()

PySide2.QtMultimedia.QVideoWindowControl.brightnessChanged(brightness)
Parameters

brightness – int

PySide2.QtMultimedia.QVideoWindowControl.contrast()
Return type

int

Returns the contrast adjustment applied to a video overlay.

Valid contrast values range between -100 and 100, the default is 0.

See also

setContrast()

PySide2.QtMultimedia.QVideoWindowControl.contrastChanged(contrast)
Parameters

contrast – int

PySide2.QtMultimedia.QVideoWindowControl.displayRect()
Return type

PySide2.QtCore.QRect

Returns the sub-rect of a window where video is displayed.

See also

setDisplayRect()

PySide2.QtMultimedia.QVideoWindowControl.fullScreenChanged(fullScreen)
Parameters

fullScreen – bool

PySide2.QtMultimedia.QVideoWindowControl.hue()
Return type

int

Returns the hue adjustment applied to a video overlay.

Value hue values range between -100 and 100, the default is 0.

See also

setHue()

PySide2.QtMultimedia.QVideoWindowControl.hueChanged(hue)
Parameters

hue – int

PySide2.QtMultimedia.QVideoWindowControl.isFullScreen()
Return type

bool

Identifies if a video overlay is a fullScreen overlay.

Returns true if the video overlay is fullScreen , and false otherwise.

PySide2.QtMultimedia.QVideoWindowControl.nativeSize()
Return type

PySide2.QtCore.QSize

Returns a suggested size for the video display based on the resolution and aspect ratio of the video.

PySide2.QtMultimedia.QVideoWindowControl.nativeSizeChanged()
PySide2.QtMultimedia.QVideoWindowControl.repaint()

Repaints the last frame.

PySide2.QtMultimedia.QVideoWindowControl.saturation()
Return type

int

Returns the saturation adjustment applied to a video overlay.

Value saturation values range between -100 and 100, the default is 0.

See also

setSaturation()

PySide2.QtMultimedia.QVideoWindowControl.saturationChanged(saturation)
Parameters

saturation – int

PySide2.QtMultimedia.QVideoWindowControl.setAspectRatioMode(mode)
Parameters

modeAspectRatioMode

Sets the aspect ratio mode which determines how video is scaled to the fit the display region with respect to its aspect ratio.

PySide2.QtMultimedia.QVideoWindowControl.setBrightness(brightness)
Parameters

brightness – int

Sets a brightness adjustment for a video overlay.

Valid brightness values range between -100 and 100, the default is 0.

See also

brightness()

PySide2.QtMultimedia.QVideoWindowControl.setContrast(contrast)
Parameters

contrast – int

Sets the contrast adjustment for a video overlay.

Valid contrast values range between -100 and 100, the default is 0.

See also

contrast()

PySide2.QtMultimedia.QVideoWindowControl.setDisplayRect(rect)
Parameters

rectPySide2.QtCore.QRect

Sets the sub-rect of a window where video is displayed.

See also

displayRect()

PySide2.QtMultimedia.QVideoWindowControl.setFullScreen(fullScreen)
Parameters

fullScreen – bool

Sets whether a video overlay is a fullScreen overlay.

See also

isFullScreen()

PySide2.QtMultimedia.QVideoWindowControl.setHue(hue)
Parameters

hue – int

Sets a hue adjustment for a video overlay.

Valid hue values range between -100 and 100, the default is 0.

See also

hue()

PySide2.QtMultimedia.QVideoWindowControl.setSaturation(saturation)
Parameters

saturation – int

Sets a saturation adjustment for a video overlay.

Valid saturation values range between -100 and 100, the default is 0.

See also

saturation()

PySide2.QtMultimedia.QVideoWindowControl.setWinId(id)
Parameters

idWId

Sets the id of the window a video overlay end point renders to.

See also

winId()

PySide2.QtMultimedia.QVideoWindowControl.winId()
Return type

WId

Returns the ID of the window a video overlay end point renders to.

See also

setWinId()