The QCameraImageCaptureControl class provides a control interface for image capture services. 更多...
头: | #include <QCameraImageCaptureControl> |
qmake: | QT += multimedia |
继承: | QMediaControl |
该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。
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 |
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 ) |
QCameraImageCaptureControl (QObject * parent = nullptr) |
QCameraImageCaptureControl_iid |
The interface name of QCameraImageCaptureControl is
org.qt-project.qt.cameraimagecapturecontrol/5.0
作为定义在
QCameraImageCaptureControl_iid
.
另请参阅 QMediaService::requestControl ().
[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 .
另请参阅 QCameraImageCapture::Error .
[signal]
void
QCameraImageCaptureControl::
imageAvailable
(
int
requestId
, const
QVideoFrame
&
buffer
)
Signals that a captured buffer 采用 requestId 可用。
[signal]
void
QCameraImageCaptureControl::
imageCaptured
(
int
requestId
, const
QImage
&
preview
)
Signals that an image with it requestId has been captured and a preview 可用。
[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.
[虚拟]
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 。 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 () 和 imageSaved () 信号。
[pure virtual]
QCameraImageCapture::DriveMode
QCameraImageCaptureControl::
driveMode
() const
Returns the current camera drive mode.
另请参阅 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 .
另请参阅 driveMode ().
org.qt-project.qt.cameraimagecapturecontrol/5.0
定义接口名为 QCameraImageCaptureControl 类。