QCameraImageCaptureControl Class
The QCameraImageCaptureControl class provides a control interface for image capture services. More...
Header: | #include <QCameraImageCaptureControl> |
qmake: | QT += multimedia |
Inherits: | QMediaControl |
This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Public Functions
virtual | ~QCameraImageCaptureControl() |
virtual void | cancelCapture() = 0 |
virtual int | capture(const QString &fileName) = 0 |
virtual QCameraImageCapture::DriveMode | driveMode() const = 0 |
virtual bool | isReadyForCapture() const = 0 |
virtual void | setDriveMode(QCameraImageCapture::DriveMode mode) = 0 |
Signals
void | error(int id, int error, const QString &errorString) |
void | imageAvailable(int requestId, const QVideoFrame &buffer) |
void | imageCaptured(int requestId, const QImage &preview) |
void | imageExposed(int requestId) |
void | imageMetadataAvailable(int id, const QString &key, const QVariant &value) |
void | imageSaved(int requestId, const QString &fileName) |
void | readyForCaptureChanged(bool ready) |
Protected Functions
QCameraImageCaptureControl(QObject *parent = nullptr) |
Macros
Detailed Description
The interface name of QCameraImageCaptureControl is org.qt-project.qt.cameraimagecapturecontrol/5.0
as defined in QCameraImageCaptureControl_iid.
See also QMediaService::requestControl().
Member Function Documentation
[protected]
QCameraImageCaptureControl::QCameraImageCaptureControl(QObject *parent = nullptr)
Constructs a new image capture control object with the given parent
[signal]
void QCameraImageCaptureControl::error(int id, int error, const QString &errorString)
Signals the capture request id failed with error code and message errorString.
See also QCameraImageCapture::Error.
[signal]
void QCameraImageCaptureControl::imageAvailable(int requestId, const QVideoFrame &buffer)
Signals that a captured buffer with a requestId is available.
[signal]
void QCameraImageCaptureControl::imageCaptured(int requestId, const QImage &preview)
Signals that an image with it requestId has been captured and a preview is available.
[signal]
void QCameraImageCaptureControl::imageExposed(int requestId)
Signals that an image with it requestId has just been exposed. This signal can be used for the shutter sound or other indicaton.
[signal]
void QCameraImageCaptureControl::imageMetadataAvailable(int id, const QString &key, const QVariant &value)
Signals that a metadata for an image with request id is available. Signal also contains the key and value of the metadata.
This signal should be emitted between imageExposed and imageSaved signals.
[signal]
void QCameraImageCaptureControl::imageSaved(int requestId, const QString &fileName)
Signals that a captured image with a requestId has been saved to fileName.
[signal]
void QCameraImageCaptureControl::readyForCaptureChanged(bool ready)
Signals that a capture control's ready state has changed.
[virtual]
QCameraImageCaptureControl::~QCameraImageCaptureControl()
Destroys an image capture control.
[pure virtual]
void QCameraImageCaptureControl::cancelCapture()
Cancel pending capture requests.
[pure virtual]
int QCameraImageCaptureControl::capture(const QString &fileName)
Initiates the capture of an image to fileName. The fileName can be relative or empty, in this case the service should use the system specific place and file naming scheme.
The Camera service should save all the capture parameters like exposure settings or image processing parameters, so changes to camera parameters after capture() is called do not affect previous capture requests.
Returns the capture request id number, which is used later with imageExposed(), imageCaptured() and imageSaved() signals.
[pure virtual]
QCameraImageCapture::DriveMode QCameraImageCaptureControl::driveMode() const
Returns the current camera drive mode.
See also setDriveMode().
[pure virtual]
bool QCameraImageCaptureControl::isReadyForCapture() const
Identifies if a capture control is ready to perform a capture immediately (all the resources necessary for image capture are allocated, hardware initialized, flash is charged, etc).
Returns true if the camera is ready for capture; and false if it is not.
It's permissible to call capture() while the camera status is QCamera::ActiveStatus regardless of isReadyForCapture property value. If camera is not ready to capture image immediately, the capture request is queued with all the related camera settings to be executed as soon as possible.
[pure virtual]
void QCameraImageCaptureControl::setDriveMode(QCameraImageCapture::DriveMode mode)
Sets the current camera drive mode.
See also driveMode().
Macro Documentation
QCameraImageCaptureControl_iid
org.qt-project.qt.cameraimagecapturecontrol/5.0
Defines the interface name of the QCameraImageCaptureControl class.