QCameraControl

The QCameraControl class is an abstract base class for classes that control still cameras or video cameras. More

Inheritance diagram of PySide2.QtMultimedia.QCameraControl

Detailed Description

This service is provided by a QMediaService object via QMediaService::control(). It is used by QCamera .

The interface name of QCameraControl is org.qt-project.qt.cameracontrol/5.0 as defined in QCameraControl_iid .

class QCameraControl([parent=None])
param parent

QObject

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
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 matches status 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

setCaptureMode()

PySide2.QtMultimedia.QCameraControl.captureModeChanged(mode)
Parameters

modeCaptureModes

PySide2.QtMultimedia.QCameraControl.error(error, errorString)
Parameters
  • errorint

  • errorString – unicode

PySide2.QtMultimedia.QCameraControl.isCaptureModeSupported(mode)
Parameters

modeCaptureModes

Return type

bool

Returns true if the capture mode is suported.

PySide2.QtMultimedia.QCameraControl.setCaptureMode(arg__1)
Parameters

arg__1CaptureModes

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

captureMode()

PySide2.QtMultimedia.QCameraControl.setState(state)
Parameters

stateState

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

State

Returns the state of the camera service.

See also

setState() state

PySide2.QtMultimedia.QCameraControl.stateChanged(arg__1)
Parameters

arg__1State

PySide2.QtMultimedia.QCameraControl.status()
Return type

Status

Returns the status of the camera service.

See also

state

PySide2.QtMultimedia.QCameraControl.statusChanged(arg__1)
Parameters

arg__1Status