QCameraViewfinderSettings¶
The
QCameraViewfinderSettings
class provides a set of viewfinder settings. More…
Synopsis¶
Functions¶
def
__ne__
(, rhs)def
isNull
()def
maximumFrameRate
()def
minimumFrameRate
()def
pixelAspectRatio
()def
pixelFormat
()def
resolution
()def
setMaximumFrameRate
(rate)def
setMinimumFrameRate
(rate)def
setPixelAspectRatio
(horizontal, vertical)def
setPixelAspectRatio
(ratio)def
setPixelFormat
(format)def
setResolution
(arg__1)def
setResolution
(width, height)def
swap
(other)
Detailed Description¶
A viewfinder settings object is used to specify the viewfinder settings used by
QCamera
. Viewfinder settings are selected by constructing aQCameraViewfinderSettings
object, setting the desired properties and then passing it to aQCamera
instance using thesetViewfinderSettings()
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 callingsetResolution()
.See also
- class PySide2.QtMultimedia.QCameraViewfinderSettings¶
PySide2.QtMultimedia.QCameraViewfinderSettings(other)
- param other:
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.
See also
- PySide2.QtMultimedia.QCameraViewfinderSettings.minimumFrameRate()¶
- Return type:
float
Returns the viewfinder minimum frame rate in frames per second.
See also
- PySide2.QtMultimedia.QCameraViewfinderSettings.__ne__(rhs)¶
- Parameters:
- Return type:
bool
- PySide2.QtMultimedia.QCameraViewfinderSettings.pixelAspectRatio()¶
- Return type:
Returns the viewfinder pixel aspect ratio.
See also
- PySide2.QtMultimedia.QCameraViewfinderSettings.pixelFormat()¶
- Return type:
Returns the viewfinder pixel format.
See also
- PySide2.QtMultimedia.QCameraViewfinderSettings.resolution()¶
- Return type:
Returns the viewfinder resolution.
See also
- 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 to0
, 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 to0
, 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:
ratio –
PySide2.QtCore.QSize
Sets the viewfinder pixel aspect
ratio
.See also
- PySide2.QtMultimedia.QCameraViewfinderSettings.setPixelAspectRatio(horizontal, vertical)
- Parameters:
horizontal – int
vertical – int
This is an overloaded function.
Sets the
horizontal
andvertical
elements of the viewfinder’s pixel aspect ratio.
- PySide2.QtMultimedia.QCameraViewfinderSettings.setPixelFormat(format)¶
- Parameters:
format –
PixelFormat
Sets the viewfinder pixel
format
.If the given
format
is equal toFormat_Invalid
, the backend uses the default format.See also
pixelFormat()
supportedViewfinderPixelFormats()
- PySide2.QtMultimedia.QCameraViewfinderSettings.setResolution(arg__1)¶
- Parameters:
arg__1 –
PySide2.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
andheight
of the viewfinder resolution.
- PySide2.QtMultimedia.QCameraViewfinderSettings.swap(other)¶
- Parameters:
Swaps this viewfinder settings object with
other
. This function is very fast and never fails.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.