QCameraViewfinderSettings

The QCameraViewfinderSettings class provides a set of viewfinder settings. More

Inheritance diagram of PySide2.QtMultimedia.QCameraViewfinderSettings

Synopsis

Functions

Detailed Description

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() function.

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

See also

QCamera

class PySide2.QtMultimedia.QCameraViewfinderSettings

PySide2.QtMultimedia.QCameraViewfinderSettings(other)

param other:

PySide2.QtMultimedia.QCameraViewfinderSettings

Constructs a null viewfinder settings object.

Constructs a copy of the viewfinder settings object other .

PySide2.QtMultimedia.QCameraViewfinderSettings.isNull()
Return type:

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()
Return type:

float

Returns the viewfinder maximum frame rate in frames per second.

PySide2.QtMultimedia.QCameraViewfinderSettings.minimumFrameRate()
Return type:

float

Returns the viewfinder minimum frame rate in frames per second.

PySide2.QtMultimedia.QCameraViewfinderSettings.__ne__(rhs)
Parameters:

rhsPySide2.QtMultimedia.QCameraViewfinderSettings

Return type:

bool

PySide2.QtMultimedia.QCameraViewfinderSettings.pixelAspectRatio()
Return type:

PySide2.QtCore.QSize

Returns the viewfinder pixel aspect ratio.

PySide2.QtMultimedia.QCameraViewfinderSettings.pixelFormat()
Return type:

PixelFormat

Returns the viewfinder pixel format.

See also

setPixelFormat()

PySide2.QtMultimedia.QCameraViewfinderSettings.resolution()
Return type:

PySide2.QtCore.QSize

Returns the viewfinder resolution.

See also

setResolution()

PySide2.QtMultimedia.QCameraViewfinderSettings.setMaximumFrameRate(rate)
Parameters:

rate – float

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.

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

See also

maximumFrameRate() setMinimumFrameRate() supportedViewfinderFrameRateRanges()

PySide2.QtMultimedia.QCameraViewfinderSettings.setMinimumFrameRate(rate)
Parameters:

rate – float

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.

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

See also

minimumFrameRate() setMaximumFrameRate() supportedViewfinderFrameRateRanges()

PySide2.QtMultimedia.QCameraViewfinderSettings.setPixelAspectRatio(ratio)
Parameters:

ratioPySide2.QtCore.QSize

Sets the viewfinder pixel aspect ratio .

PySide2.QtMultimedia.QCameraViewfinderSettings.setPixelAspectRatio(horizontal, vertical)
Parameters:
  • horizontal – int

  • vertical – int

This is an overloaded function.

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

PySide2.QtMultimedia.QCameraViewfinderSettings.setPixelFormat(format)
Parameters:

formatPixelFormat

Sets the viewfinder pixel format .

If the given format is equal to Format_Invalid , the backend uses the default format.

See also

pixelFormat() supportedViewfinderPixelFormats()

PySide2.QtMultimedia.QCameraViewfinderSettings.setResolution(arg__1)
Parameters:

arg__1PySide2.QtCore.QSize

Sets the viewfinder resolution .

If the given 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.

See also

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

PySide2.QtMultimedia.QCameraViewfinderSettings.setResolution(width, height)
Parameters:
  • width – int

  • height – int

This is an overloaded function.

Sets the width and height of the viewfinder resolution.

PySide2.QtMultimedia.QCameraViewfinderSettings.swap(other)
Parameters:

otherPySide2.QtMultimedia.QCameraViewfinderSettings

Swaps this viewfinder settings object with other . This function is very fast and never fails.