内容表

上一话题

QCameraLocksControl

下一话题

QCameraViewfinderSettingsControl

QCameraViewfinderSettings

QCameraViewfinderSettings class provides a set of viewfinder settings. 更多

Inheritance diagram of PySide2.QtMultimedia.QCameraViewfinderSettings

概要

函数

详细描述

A viewfinder settings object is used to specify the viewfinder settings used by QCamera . Viewfinder settings are selected by constructing a QCameraViewfinderSettings object, setting the desired properties and then passing it to a QCamera instance using the setViewfinderSettings() 函数。

QCameraViewfinderSettings viewfinderSettings;
viewfinderSettings.setResolution(640, 480);
viewfinderSettings.setMinimumFrameRate(15.0);
viewfinderSettings.setMaximumFrameRate(30.0);
camera->setViewfinderSettings(viewfinderSettings);
											

Different cameras may have different capabilities. The application should query the camera capabilities before setting parameters. For example, the application should call supportedViewfinderResolutions() before calling setResolution() .

另请参阅

QCamera

class QCameraViewfinderSettings

QCameraViewfinderSettings(other)

param other

QCameraViewfinderSettings

Constructs a null viewfinder settings object.

Constructs a copy of the viewfinder settings object other .

PySide2.QtMultimedia.QCameraViewfinderSettings. isNull ( )
返回类型

bool

Identifies if a viewfinder settings object is uninitalized.

Returns true if the settings are null, and false if they are not.

PySide2.QtMultimedia.QCameraViewfinderSettings. maximumFrameRate ( )
返回类型

qreal

Returns the viewfinder maximum frame rate in frames per second.

PySide2.QtMultimedia.QCameraViewfinderSettings. minimumFrameRate ( )
返回类型

qreal

Returns the viewfinder minimum frame rate in frames per second.

PySide2.QtMultimedia.QCameraViewfinderSettings. __ne__ ( rhs )
参数

rhs QCameraViewfinderSettings

返回类型

bool

PySide2.QtMultimedia.QCameraViewfinderSettings. pixelAspectRatio ( )
返回类型

QSize

Returns the viewfinder pixel aspect ratio.

PySide2.QtMultimedia.QCameraViewfinderSettings. pixelFormat ( )
返回类型

PixelFormat

Returns the viewfinder pixel format.

另请参阅

setPixelFormat()

PySide2.QtMultimedia.QCameraViewfinderSettings. resolution ( )
返回类型

QSize

Returns the viewfinder resolution.

另请参阅

setResolution()

PySide2.QtMultimedia.QCameraViewfinderSettings. setMaximumFrameRate ( rate )
参数

rate qreal

Sets the viewfinder maximum frame rate in frames per second.

If the maximum frame rate is equal to the minimum frame rate, the frame rate is fixed. If not, the actual frame rate fluctuates between the minimum and the maximum.

若给定 rate equals to 0 , the backend makes an optimal choice based on the supported frame rates and the other viewfinder settings.

另请参阅

maximumFrameRate() setMinimumFrameRate() supportedViewfinderFrameRateRanges()

PySide2.QtMultimedia.QCameraViewfinderSettings. setMinimumFrameRate ( rate )
参数

rate qreal

Sets the viewfinder minimum frame rate in frames per second.

If the minimum frame rate is equal to the maximum frame rate, the frame rate is fixed. If not, the actual frame rate fluctuates between the minimum and the maximum.

若给定 rate equals to 0 , the backend makes an optimal choice based on the supported frame rates and the other viewfinder settings.

另请参阅

minimumFrameRate() setMaximumFrameRate() supportedViewfinderFrameRateRanges()

PySide2.QtMultimedia.QCameraViewfinderSettings. setPixelAspectRatio ( ratio )
参数

ratio QSize

Sets the viewfinder pixel aspect ratio .

PySide2.QtMultimedia.QCameraViewfinderSettings. setPixelAspectRatio ( horizontal , vertical )
参数
  • horizontal int

  • vertical int

这是重载函数。

设置 horizontal and vertical elements of the viewfinder’s pixel aspect ratio.

PySide2.QtMultimedia.QCameraViewfinderSettings. setPixelFormat ( format )
参数

format PixelFormat

Sets the viewfinder pixel format .

若给定 format 等于 Format_Invalid , the backend uses the default format.

另请参阅

pixelFormat() supportedViewfinderPixelFormats()

PySide2.QtMultimedia.QCameraViewfinderSettings. setResolution ( arg__1 )
参数

arg__1 QSize

Sets the viewfinder resolution .

若给定 resolution is empty, the backend makes an optimal choice based on the supported resolutions and the other viewfinder settings.

If the camera is used to capture videos or images, the viewfinder resolution might be ignored if it conflicts with the capture resolution.

另请参阅

resolution() setResolution() setResolution() supportedViewfinderResolutions()

PySide2.QtMultimedia.QCameraViewfinderSettings. setResolution ( width , height )
参数
  • width int

  • height int

这是重载函数。

设置 width and height of the viewfinder resolution.

PySide2.QtMultimedia.QCameraViewfinderSettings. swap ( other )
参数

other QCameraViewfinderSettings

Swaps this viewfinder settings object with other 。此函数非常快,且从不失败。