QCameraImageCaptureControl Class

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 )

静态公共成员

const QMetaObject staticMetaObject

保护函数

QCameraImageCaptureControl (QObject * parent = nullptr)

QCameraImageCaptureControl_iid

额外继承成员

详细描述

The QCameraImageCaptureControl class provides a control interface for image capture services.

接口名称对于 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

[虚拟] 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 ().

[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 .

[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.

[signal] void QCameraImageCaptureControl:: readyForCaptureChanged ( bool ready )

Signals that a capture control's ready state has changed.

[pure virtual] void QCameraImageCaptureControl:: setDriveMode ( QCameraImageCapture::DriveMode mode )

Sets the current camera drive mode .

另请参阅 driveMode ().

宏文档编制

QCameraImageCaptureControl_iid

org.qt-project.qt.cameraimagecapturecontrol/5.0

定义接口名为 QCameraImageCaptureControl 类。