QCameraControl¶
The
QCameraControl
class is an abstract base class for classes that control still cameras or video cameras. More…
Detailed Description¶
This service is provided by a
QMediaService
object via QMediaService::control(). It is used byQCamera
.The interface name of
QCameraControl
isorg.qt-project.qt.cameracontrol/5.0
as defined inQCameraControl_iid
.See also
- class PySide2.QtMultimedia.QCameraControl([parent=None])¶
- param parent:
Constructs a camera control object with
parent
.
- PySide2.QtMultimedia.QCameraControl.PropertyChangeType¶
Constant
Description
QCameraControl.CaptureMode
Indicates the capture mode is changed.
QCameraControl.ImageEncodingSettings
Image encoder settings are changed, including resolution.
QCameraControl.VideoEncodingSettings
Video encoder settings are changed, including audio, video and container settings.
QCameraControl.Viewfinder
Viewfinder is changed.
QCameraControl.ViewfinderSettings
Viewfinder settings are changed.
- PySide2.QtMultimedia.QCameraControl.canChangeProperty(changeType, status)¶
- Parameters:
changeType –
PropertyChangeType
status –
Status
- Return type:
bool
Returns true if backend can effectively apply changing camera properties of
changeType
type while the camera state is QCamera::Active and camera status matchesstatus
parameter.If backend doesn’t support applying this change in the active state, it will be stopped before the settings are changed and restarted after. Otherwise the backend should apply the change in the current state, with the camera status indicating the progress, if necessary.
- PySide2.QtMultimedia.QCameraControl.captureMode()¶
- Return type:
CaptureModes
Returns the current capture mode.
See also
- PySide2.QtMultimedia.QCameraControl.captureModeChanged(mode)¶
- Parameters:
mode –
CaptureModes
- PySide2.QtMultimedia.QCameraControl.error(error, errorString)¶
- Parameters:
error – int
errorString – str
- PySide2.QtMultimedia.QCameraControl.isCaptureModeSupported(mode)¶
- Parameters:
mode –
CaptureModes
- Return type:
bool
Returns true if the capture
mode
is suported.
- PySide2.QtMultimedia.QCameraControl.setCaptureMode(arg__1)¶
- Parameters:
arg__1 –
CaptureModes
Sets the current capture
mode
.The capture mode changes are synchronous and allowed in any camera state.
If the capture mode is changed while camera is active, it’s recommended to change status to
LoadedStatus
and start activating the camera in the next event loop with the status changed toStartingStatus
. This allows the capture settings to be applied before camera is started. Than change the status to QCamera::StartedStatus when the capture mode change is done.See also
- PySide2.QtMultimedia.QCameraControl.setState(state)¶
- Parameters:
state – State
Sets the camera
state
.State changes are synchronous and indicate user intention, while camera status is used as a feedback mechanism to inform application about backend status. Status changes are reported asynchronously with
statusChanged()
signal.See also
state()
State
- PySide2.QtMultimedia.QCameraControl.state()¶
- Return type:
Returns the state of the camera service.
See also
setState()
state
- PySide2.QtMultimedia.QCameraControl.status()¶
- Return type:
Returns the status of the camera service.
See also
state
© 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.