QCameraImageCapture Class ReferenceThe QCameraImageCapture class is used for the recording of media content. More... #include <QCameraImageCapture> Inherits QObject and QMediaBindableInterface. Public Types
Properties
Public Functions
Reimplemented Public Functions
Public Slots
Signals
Reimplemented Protected Functions
Additional Inherited Members
Detailed DescriptionThe QCameraImageCapture class is used for the recording of media content. 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); recorder = new QMediaRecorder(camera); 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
|
Constant | Value | Description |
---|---|---|
QCameraImageCapture::SingleImageCapture | 0 | Drive mode is capturing a single picture. |
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::NotSupportedFeatureError | 4 | Device does not support stillimages capture. |
QCameraImageCapture::FormatError | 5 | Current format is not supported. |
QCameraImageCapture::OutOfSpaceError | 3 | No space left on device. |
Indicates the service is ready to capture a an image immediately.
Access functions:
bool | isReadyForCapture () const |
Notifier signal:
void | readyForCaptureChanged ( bool ready ) |
Constructs a media recorder which records the media produced by mediaObject.
The parent is passed to QMediaObject.
Destroys images capture object.
Returns the availability error code.
Cancel incomplete capture requests. Already captured and queused for proicessing images may be discarded.
Capture the image and save it to file. This operation is asynchronous in majority of cases, followed by signals QCameraImageCapture::imageCaptured(), QCameraImageCapture::imageSaved() or QCameraImageCapture::error().
If an empty file is passed, the camera backend choses the default location and naming scheme for photos on the system, if only file name without full path is specified, the image will be saved to the default directory, with a full path reported with imageCaptured() and imageSaved() signals.
QCameraImageCapture::capture returns the capture Id parameter, used with imageExposed(), imageCaptured() and imageSaved() signals.
Returns the image encoder settings being used.
See also setEncodingSettings().
Returns the current error state.
See also errorString().
Signals that the capture request id has failed with an error and errorString description.
Returns a string describing the current error state.
See also error().
Signal emitted when the frame with request id was captured, but not processed and saved yet. Frame preview can be displayed to user.
Returns a description of an image codec.
Signal emitted when the frame with request id was exposed.
Signal emitted when the frame with request id was saved to fileName.
Returns true if the images capture service ready to use.
Reimplemented from QMediaBindableInterface::mediaObject().
See also setMediaObject().
Signals that a camera's ready for capture state has changed.
Sets the image encodeing settings.
If some parameters are not specified, or null settings are passed, the encoder choose the default encoding parameters.
See also encodingSettings().
Reimplemented from QMediaBindableInterface::setMediaObject().
See also mediaObject().
Returns a list of supported image codecs.
Returns a list of resolutions images can be encoded at.
If non null image settings parameter is passed, the returned list is reduced to resolution supported with partial settings like image codec or quality applied.
If the encoder supports arbitrary resolutions within the supported range, *continuous is set to true, otherwise *continuous is set to false.
See also QImageEncoderSettings::resolution().