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

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

ConstantValueDescription
QCameraImageCapture::CaptureToFile0x01Capture the image to a file.
QCameraImageCapture::CaptureToBuffer0x02Capture the image to a buffer for further processing.

enum QCameraImageCapture::DriveMode

ConstantValueDescription
QCameraImageCapture::SingleImageCapture0Drive mode is capturing a single picture.

enum QCameraImageCapture::Error

ConstantValueDescription
QCameraImageCapture::NoError0No Errors.
QCameraImageCapture::NotReadyError1The service is not ready for capture yet.
QCameraImageCapture::ResourceError2Device is not ready or not available.
QCameraImageCapture::OutOfSpaceError3No space left on device.
QCameraImageCapture::NotSupportedFeatureError4Device does not support stillimages capture.
QCameraImageCapture::FormatError5Current 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)