QCameraImageCapture Class
The QCameraImageCapture class is used for the recording of media content. More...
| Header: | #include <QCameraImageCapture> |
| qmake: | QT += multimedia |
| Inherits: | QObject and QMediaBindableInterface |
Public Types
| enum | CaptureDestination { CaptureToFile, CaptureToBuffer } |
| enum | DriveMode { SingleImageCapture } |
| enum | Error { NoError, NotReadyError, ResourceError, OutOfSpaceError, NotSupportedFeatureError, FormatError } |
Properties
- readyForCapture : const bool
Public Functions
| bool | isReadyForCapture() const |
Signals
| void | readyForCaptureChanged(bool ready) |
Detailed Description
The QCameraImageCapture class is a high level images recording class. It's not intended to be used alone but for accessing the media recording functions of other media objects, like QCamera.
camera = new QCamera; viewfinder = new QCameraViewfinder(); viewfinder->show(); camera->setViewfinder(viewfinder); imageCapture = new QCameraImageCapture(camera); camera->setCaptureMode(QCamera::CaptureStillImage); camera->start(); //on half pressed shutter button camera->searchAndLock(); //on shutter button pressed imageCapture->capture(); //on shutter button released camera->unlock();
See also QCamera.
Member Type Documentation
enum QCameraImageCapture::CaptureDestination
| Constant | Value | Description |
|---|---|---|
QCameraImageCapture::CaptureToFile | 0x01 | Capture the image to a file. |
QCameraImageCapture::CaptureToBuffer | 0x02 | Capture the image to a buffer for further processing. |
enum QCameraImageCapture::DriveMode
| Constant | Value | Description |
|---|---|---|
QCameraImageCapture::SingleImageCapture | 0 | Drive mode is capturing a single picture. |
enum QCameraImageCapture::Error
| Constant | Value | Description |
|---|---|---|
QCameraImageCapture::NoError | 0 | No Errors. |
QCameraImageCapture::NotReadyError | 1 | The service is not ready for capture yet. |
QCameraImageCapture::ResourceError | 2 | Device is not ready or not available. |
QCameraImageCapture::OutOfSpaceError | 3 | No space left on device. |
QCameraImageCapture::NotSupportedFeatureError | 4 | Device does not support stillimages capture. |
QCameraImageCapture::FormatError | 5 | Current format is not supported. |
Property Documentation
readyForCapture : const bool
This property holds whether the service is ready to capture a an image immediately.
Calling capture() while readyForCapture is false is not permitted and results in an error.
Access functions:
| bool | isReadyForCapture() const |
Notifier signal:
| void | readyForCaptureChanged(bool ready) |