QVideoWindowControl Class

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

頭: #include <QVideoWindowControl>
qmake: QT += multimedia
繼承: 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 )

靜態公共成員

const QMetaObject staticMetaObject

保護函數

QVideoWindowControl (QObject * parent = nullptr)

QVideoWindowControl_iid

額外繼承成員

詳細描述

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 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.

接口名稱對於 QVideoWindowControl is org.qt-project.qt.videowindowcontrol/5.0 作為定義在 QVideoWindowControl_iid .

另請參閱 QMediaService::requestControl () 和 QVideoWidget .

成員函數文檔編製

[protected] QVideoWindowControl:: QVideoWindowControl ( QObject * parent = nullptr)

Constructs a new video window control with the given parent .

[虛擬] QVideoWindowControl:: ~QVideoWindowControl ()

Destroys a video window control.

[pure virtual] Qt::AspectRatioMode QVideoWindowControl:: aspectRatioMode () const

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

另請參閱 setAspectRatioMode ().

[pure virtual] int QVideoWindowControl:: brightness () const

Returns the brightness adjustment applied to a video overlay.

有效亮度值的範圍在 -100 到 100 之間,默認為 0。

另請參閱 setBrightness ().

[signal] void QVideoWindowControl:: brightnessChanged ( int brightness )

Signals that a video overlay's brightness 調節已改變。

[pure virtual] int QVideoWindowControl:: contrast () const

Returns the contrast adjustment applied to a video overlay.

有效對比度值的範圍在 -100 到 100 之間,默認為 0。

另請參閱 setContrast ().

[signal] void QVideoWindowControl:: contrastChanged ( int contrast )

Signals that a video overlay's contrast 調節已改變。

[pure virtual] QRect QVideoWindowControl:: displayRect () const

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

另請參閱 setDisplayRect ().

[signal] void QVideoWindowControl:: fullScreenChanged ( bool fullScreen )

發射信號,當 fullScreen state of a video overlay has changed.

[pure virtual] int QVideoWindowControl:: hue () const

Returns the hue adjustment applied to a video overlay.

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

另請參閱 setHue ().

[signal] void QVideoWindowControl:: hueChanged ( int hue )

Signals that a video overlay's hue 調節已改變。

[pure virtual] bool QVideoWindowControl:: isFullScreen () const

Identifies if a video overlay is a fullScreen overlay.

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

[pure virtual] QSize QVideoWindowControl:: nativeSize () const

Returns 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 () const

Returns the saturation adjustment applied to a video overlay.

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

另請參閱 setSaturation ().

[signal] void QVideoWindowControl:: saturationChanged ( int saturation )

Signals that a video overlay's saturation 調節已改變。

[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.

另請參閱 aspectRatioMode ().

[pure virtual] void QVideoWindowControl:: setBrightness ( int brightness )

設置 brightness adjustment for a video overlay.

有效亮度值的範圍在 -100 到 100 之間,默認為 0。

另請參閱 brightness ().

[pure virtual] void QVideoWindowControl:: setContrast ( int contrast )

設置 contrast adjustment for a video overlay.

有效對比度值的範圍在 -100 到 100 之間,默認為 0。

另請參閱 contrast ().

[pure virtual] void QVideoWindowControl:: setDisplayRect (const QRect & rect )

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

另請參閱 displayRect ().

[pure virtual] void QVideoWindowControl:: setFullScreen ( bool fullScreen )

Sets whether a video overlay is a fullScreen overlay.

另請參閱 isFullScreen ().

[pure virtual] void QVideoWindowControl:: setHue ( int hue )

設置 hue adjustment for a video overlay.

有效色相值的範圍在 -100 到 100 之間,默認為 0。

另請參閱 hue ().

[pure virtual] void QVideoWindowControl:: setSaturation ( int saturation )

設置 saturation adjustment for a video overlay.

有效飽和度值的範圍在 -100 至 100 之間,默認為 0。

另請參閱 saturation ().

[pure virtual] void QVideoWindowControl:: setWinId ( WId id )

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

另請參閱 winId ().

[pure virtual] WId QVideoWindowControl:: winId () const

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

另請參閱 setWinId ().

宏文檔編製

QVideoWindowControl_iid

org.qt-project.qt.videowindowcontrol/5.0

定義接口名為 QVideoWindowControl 類。