The QPlatformImageCapture class provides a control interface for image capture services. More...
|CMake:|| find_package(Qt6 REQUIRED COMPONENTS Multimedia) |
target_link_libraries(mytarget PRIVATE Qt6::Multimedia)
|qmake:||QT += multimedia|
This class is deprecated. We strongly advise against using it in new code.
|virtual int||capture(const QString &fileName) = 0|
|virtual QImageEncoderSettings||imageSettings() const = 0|
|virtual bool||isReadyForCapture() const = 0|
|virtual void||setImageSettings(const QImageEncoderSettings &settings) = 0|
|void||error(int id, int error, const QString &errorString)|
|void||imageAvailable(int requestId, const QVideoFrame &buffer)|
|void||imageCaptured(int requestId, const QImage &preview)|
|void||imageMetadataAvailable(int id, const QMediaMetaData &)|
|void||imageSaved(int requestId, const QString &fileName)|
|QPlatformImageCapture(QImageCapture *parent = nullptr)|
Member Function Documentation
[protected] QPlatformImageCapture::QPlatformImageCapture(QImageCapture *parent = nullptr)
Constructs a new image capture control object with the given parent
[signal] void QPlatformImageCapture::error(int id, int error, const QString &errorString)
Signals the capture request id failed with error code and message errorString.
See also QImageCapture::Error.
[signal] void QPlatformImageCapture::imageAvailable(int requestId, const QVideoFrame &buffer)
Signals that a captured buffer with a requestId is available.
[signal] void QPlatformImageCapture::imageCaptured(int requestId, const QImage &preview)
Signals that an image with it requestId has been captured and a preview is available.
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 QPlatformImageCapture::imageMetadataAvailable(int id, const QMediaMetaData &)
Signals that a metadata for an image with request id is available.
[signal] void QPlatformImageCapture::imageSaved(int requestId, const QString &fileName)
Signals that a captured image with a requestId has been saved to fileName.
Signals that a capture control's ready state has changed.
[pure virtual] int QPlatformImageCapture::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 currently used image encoder settings.
The returned value may be different than passed to setImageSettings() if the settings contains defaulted or undefined parameters.
See also setImageSettings().
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.
Sets the selected image encoder settings.
See also imageSettings().
© 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.