内容表

上一话题

QVideoSurfaceFormat

下一话题

PySide2.QtMultimediaWidgets

QVideoWindowControl

QVideoWindowControl class provides a media control for rendering video to a window. 更多

Inheritance diagram of PySide2.QtMultimedia.QVideoWindowControl

详细描述

winId() 特性 QVideoWindowControl allows a platform specific window ID to be set as the video render target of a QMediaService 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 作为定义在 QVideoWindowControl_iid .

class QVideoWindowControl ( [ parent=None ] )
param parent

QObject

Constructs a new video window control with the given parent .

PySide2.QtMultimedia.QVideoWindowControl. aspectRatioMode ( )
返回类型

AspectRatioMode

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

PySide2.QtMultimedia.QVideoWindowControl. brightness ( )
返回类型

int

Returns the brightness adjustment applied to a video overlay.

有效亮度值的范围在 -100 到 100 之间,默认为 0。

另请参阅

setBrightness()

PySide2.QtMultimedia.QVideoWindowControl. brightnessChanged ( brightness )
参数

brightness int

PySide2.QtMultimedia.QVideoWindowControl. contrast ( )
返回类型

int

Returns the contrast adjustment applied to a video overlay.

有效对比度值的范围在 -100 到 100 之间,默认为 0。

另请参阅

setContrast()

PySide2.QtMultimedia.QVideoWindowControl. contrastChanged ( contrast )
参数

contrast int

PySide2.QtMultimedia.QVideoWindowControl. displayRect ( )
返回类型

QRect

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

另请参阅

setDisplayRect()

PySide2.QtMultimedia.QVideoWindowControl. fullScreenChanged ( fullScreen )
参数

fullScreen bool

PySide2.QtMultimedia.QVideoWindowControl. hue ( )
返回类型

int

Returns the hue adjustment applied to a video overlay.

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

另请参阅

setHue()

PySide2.QtMultimedia.QVideoWindowControl. hueChanged ( hue )
参数

hue int

PySide2.QtMultimedia.QVideoWindowControl. isFullScreen ( )
返回类型

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 ( )
返回类型

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 ( )
返回类型

int

Returns the saturation adjustment applied to a video overlay.

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

另请参阅

setSaturation()

PySide2.QtMultimedia.QVideoWindowControl. saturationChanged ( saturation )
参数

saturation int

PySide2.QtMultimedia.QVideoWindowControl. setAspectRatioMode ( mode )
参数

mode AspectRatioMode

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

另请参阅

aspectRatioMode()

PySide2.QtMultimedia.QVideoWindowControl. setBrightness ( brightness )
参数

brightness int

设置 brightness adjustment for a video overlay.

有效亮度值的范围在 -100 到 100 之间,默认为 0。

另请参阅

brightness()

PySide2.QtMultimedia.QVideoWindowControl. setContrast ( contrast )
参数

contrast int

设置 contrast adjustment for a video overlay.

有效对比度值的范围在 -100 到 100 之间,默认为 0。

另请参阅

contrast()

PySide2.QtMultimedia.QVideoWindowControl. setDisplayRect ( rect )
参数

rect QRect

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

另请参阅

displayRect()

PySide2.QtMultimedia.QVideoWindowControl. setFullScreen ( fullScreen )
参数

fullScreen bool

Sets whether a video overlay is a fullScreen overlay.

另请参阅

isFullScreen()

PySide2.QtMultimedia.QVideoWindowControl. setHue ( hue )
参数

hue int

设置 hue adjustment for a video overlay.

有效色相值的范围在 -100 到 100 之间,默认为 0。

另请参阅

hue()

PySide2.QtMultimedia.QVideoWindowControl. setSaturation ( saturation )
参数

saturation int

设置 saturation adjustment for a video overlay.

有效饱和度值的范围在 -100 至 100 之间,默认为 0。

另请参阅

saturation()

PySide2.QtMultimedia.QVideoWindowControl. setWinId ( id )
参数

id WId

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

另请参阅

winId()

PySide2.QtMultimedia.QVideoWindowControl. winId ( )
返回类型

WId

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

另请参阅

setWinId()