QVideoWindowControlclass provides a media control for rendering video to a window. 更多 …
winId()特性QVideoWindowControlallows a platform specific window ID to be set as the video render target of aQMediaService。displayRect()property is used to set the region of the window the video should be rendered to, and theaspectRatioMode()property indicates how the video should be scaled to fit thedisplayRect().QVideoWindowControl *windowControl = mediaService->requestControl<QVideoWindowControl *>(); windowControl->setWinId(widget->winId()); windowControl->setDisplayRect(widget->rect()); windowControl->setAspectRatioMode(Qt::KeepAspectRatio);
QVideoWindowControlis one of a number of possible video output controls.The interface name of
QVideoWindowControlisorg.qt-project.qt.videowindowcontrol/5.0作为定义在QVideoWindowControl_iid.
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。
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
brightnessChanged
(
brightness
)
¶
brightness
–
int
PySide2.QtMultimedia.QVideoWindowControl.
contrast
(
)
¶
int
Returns the contrast adjustment applied to a video overlay.
有效对比度值的范围在 -100 到 100 之间,默认为 0。
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
contrastChanged
(
contrast
)
¶
contrast
–
int
PySide2.QtMultimedia.QVideoWindowControl.
displayRect
(
)
¶
QRect
Returns the sub-rect of a window where video is displayed.
另请参阅
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.
另请参阅
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.
另请参阅
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.
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
setBrightness
(
brightness
)
¶
brightness
–
int
设置
brightness
adjustment for a video overlay.
有效亮度值的范围在 -100 到 100 之间,默认为 0。
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
setContrast
(
contrast
)
¶
contrast
–
int
设置
contrast
adjustment for a video overlay.
有效对比度值的范围在 -100 到 100 之间,默认为 0。
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
setDisplayRect
(
rect
)
¶
rect
–
QRect
Sets the sub-
rect
of a window where video is displayed.
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
setFullScreen
(
fullScreen
)
¶
fullScreen
–
bool
Sets whether a video overlay is a
fullScreen
overlay.
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
setHue
(
hue
)
¶
hue
–
int
设置
hue
adjustment for a video overlay.
有效色相值的范围在 -100 到 100 之间,默认为 0。
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
setSaturation
(
saturation
)
¶
saturation
–
int
设置
saturation
adjustment for a video overlay.
有效饱和度值的范围在 -100 至 100 之间,默认为 0。
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
setWinId
(
id
)
¶
id
–
WId
设置
id
of the window a video overlay end point renders to.
另请参阅
PySide2.QtMultimedia.QVideoWindowControl.
winId
(
)
¶
WId
Returns the ID of the window a video overlay end point renders to.
另请参阅