QCameraControl Class▲
-
Header: QCameraControl
-
qmake: QT += multimedia
-
Inherits: QMediaControl
-
Inherited By:
-
Group: QCameraControl is part of multimedia_control
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.
See Also▲
See also QMediaService::requestControl(), QCamera
Member Type Documentation▲
enum QCameraControl::PropertyChangeType▲
Constant |
Value |
Description |
---|---|---|
QCameraControl::CaptureMode |
1 |
Indicates the capture mode is changed. |
QCameraControl::ImageEncodingSettings |
2 |
Image encoder settings are changed, including resolution. |
QCameraControl::VideoEncodingSettings |
3 |
Video encoder settings are changed, including audio, video and container settings. |
QCameraControl::Viewfinder |
4 |
Viewfinder is changed. |
QCameraControl::ViewfinderSettings |
5 |
Viewfinder settings are changed. |
Member Function Documentation▲
[explicit protected] QCameraControl::QCameraControl(QObject *parent = nullptr)▲
Constructs a camera control object with parent.
[virtual] QCameraControl::~QCameraControl()▲
Destruct the camera control object.
[pure virtual] bool QCameraControl::canChangeProperty(QCameraControl::PropertyChangeType changeType, QCamera::Status status) const▲
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.
[pure virtual] QCamera::CaptureModes QCameraControl::captureMode() const▲
void QCameraControl::captureModeChanged(QCamera::CaptureModes mode)▲
Signal emitted when the camera capture mode changes.
void QCameraControl::error(int error, const QString &errorString)▲
Signal emitted when an error occurs with error code error and a description of the error errorString.
[pure virtual] bool QCameraControl::isCaptureModeSupported(QCamera::CaptureModes mode) const▲
Returns true if the capture mode is suported.
[pure virtual] void QCameraControl::setCaptureMode(QCamera::CaptureModes mode)▲
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 QCamera::LoadedStatus and start activating the camera in the next event loop with the status changed to QCamera::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▲
See also captureMode()
[pure virtual] void QCameraControl::setState(QCamera::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 QCameraControl::statusChanged() signal.
See Also▲
See also state(), QCamera::State
[pure virtual] QCamera::State QCameraControl::state() const▲
void QCameraControl::stateChanged(QCamera::State state)▲
Signal emitted when the camera state changes.
In most cases the state chage is caused by QCameraControl::setState(), but if critical error has occurred the state changes to QCamera::UnloadedState.
[pure virtual] QCamera::Status QCameraControl::status() const▲
void QCameraControl::statusChanged(QCamera::Status status)▲
Signal emitted when the camera status changes.
Macro Documentation▲
QCameraControl_iid▲
org.qt-project.qt.cameracontrol/5.0
Defines the interface name of the QCameraControl class.