MCaptureImageObserver Class Reference

class MCaptureImageObserver

A mixin class to be implemented by the client in order to use the Capture Image API. The derived class methods are called by the implementation when the image capture operations are ready to be notified accordingly. Implementation shall keep track of CCameraImageCapture object deletion. It has to ensure that a callback is not send should the client destroy the CCameraImageCapture class object when the callback is queued to be send across. Ownership of CCameraImageCapture is retained by the client.

CCamera::CCameraImageCapture CCamera::CCameraPostImageCaptureControl

Member Functions Documentation

ClientHistogramForImageReady(CCamera::CCameraImageCapture &, TPostCaptureControlId, MHistogramV2Buffer *, TInt)

void ClientHistogramForImageReady ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId,
MHistogramV2Buffer * aClientHistogramBuffer,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback in order to notify the client about availability of the histogram data for the individual image. If a call to CCameraV2Histogram::StartHistogram() (on the CCameraImageCapture instance) is made without a previous successful call to CCameraV2Histogram::PrepareClientHistogramL() (on the CCameraImageCapture instance) then the callback returns KErrBadHandle.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object. This provides the individual image for which the client histogram data is available.
MHistogramV2Buffer * aClientHistogramBuffer Pointer to MHistogramV2Buffer which retrieves a single histogram for the individual image alongwith relevant information about it. The ownership will be retained by the implementation. Client needs to call Release in order to indicate the implementation that the buffer can be re-used. Client shall never try to delete the pointer. NULL, if error.
TInt aErrorCode Appropriate error code.

ClientHistogramForSnapshotReady(CCamera::CCameraImageCapture &, TPostCaptureControlId, MHistogramV2Buffer *, TInt)

void ClientHistogramForSnapshotReady ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId,
MHistogramV2Buffer * aClientHistogramBuffer,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback in order to notify the client about availability of the histogram data for the snapshot of the individual image. If a call to CCameraV2Histogram::StartHistogram() (on the snapshot) is made without a previous successful call to CCameraV2Histogram::PrepareClientHistogramL() (on the snapshot) then the callback returns KErrBadHandle.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation. This provides handle to the snapshot(CCameraImageCapture::GetSnapshotHandleL()) for which the histogram data is available.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object. This provides a mapping between the individual image and the snapshot for which the client histogram data is available.
MHistogramV2Buffer * aClientHistogramBuffer Pointer to MHistogramV2Buffer which retrieves a single histogram for the snapshot of the individual image alongwith relevant information about it. The ownership will be retained by the implementation. Client needs to call Release in order to indicate the implementation that the buffer can be re-used. Client shall never try to delete the pointer. NULL, if error.
TInt aErrorCode Appropriate error code.

ClientSnapshotForImageReady(CCamera::CCameraImageCapture &, TPostCaptureControlId, MCameraBuffer2 *, TInt)

void ClientSnapshotForImageReady ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId,
MCameraBuffer2 * aSnapshotBuffer,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback when a particular client snapshot data is available. The snapshot data represents the individual image which may be in any drive mode.

If a call to CCameraSnapshot::EnableSnapshotL() (on the CCameraImageCapture instance) is made without a successful call to CCameraSnapshot::PrepareSnapshotL(const TSnapshotParameters& aSnapshotParameters) (on the CCameraImageCapture instance), then the callback returns KErrBadHandle.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object. This is needed to identify the image which is represented by this snapshot.
MCameraBuffer2 * aSnapshotBuffer Pointer to MCameraBuffer2 which retrieves the snapshot data for the individual image. The ownership will be retained by the implementation. Client needs to call Release in order to indicate the implementation that the buffer can be re-used. Client shall never try to delete the pointer. NULL, if error.
TInt aErrorCode Appropriate error code.

CustomInterface(TUid, TAny *&)

TInt CustomInterface ( TUid aInterface,
TAny *& aPtrInterface
) [pure virtual]

Gets a custom interface for future callbacks. This method will be called by the implementation to get a new interface which would support future callbacks.

Parameters

TUid aInterface The Uid of the particular interface function required for callbacks.
TAny *& aPtrInterface The implementation has to type-cast the retrieved custom interface pointer to the appropriate type.

CutDownImageDirectSavingCompleted(CCamera::CCameraImageCapture &, TPostCaptureControlId, TInt)

void CutDownImageDirectSavingCompleted ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback when the cut down version(lower resolution) of the individual image has been directly saved to the file. Client may use the cut down version of the actual image to view the image beforehand and may cancel the actual individual image.

Note:

If direct saving option is being used, this callback may be received by the client.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object. This may be used to cancel the actual image which might be currently undergoing any processing options or even pause/resume ongoing processing options.
TInt aErrorCode Appropriate error code.

ImageBufferReady(CCamera::CCameraImageCapture &, TPostCaptureControlId, TInt)

void ImageBufferReady ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback when the individual image is ready and direct saving option is not used.

Note:

If direct saving option is not used, this callback will be received by the client.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation. CCameraPostImageCaptureControl instances will be owned by CCameraImageCapture and would be available until new capture command is issued using the owning CCameraImageCapture instance. If client wishes to initiate new capture but preserve the CCameraPostImageCaptureControl instances from previous capture, it would have to create a new CCameraImageCapture instance and use that for the new capture.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object. This will be used to retrieve the individual image buffer.
TInt aErrorCode Appropriate error code.

ImageCaptureComplete(CCamera::CCameraImageCapture &, TInt)

void ImageCaptureComplete ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback when the Capture Image operation has been completed. This will be send to mark the completion of the image capture even if direct saving option is being used.

Note:

This callback marks the completion of image capture operation. So, whether direct saving option is used or buffers are used for images, this callback will be received in both the cases.

If drive mode is EDriveModeTimeNudgeCapture this callback will only be received once the total required amount of images are captured (ie. pre-capture images + 1 + post-capture images) and the implementation is ready with another set of pre-capture images (so implementation is prepared for next CaptureImage() call).

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation. CCameraPostImageCaptureControl instances will be owned by CCameraImageCapture and would be available until new capture command is issued using the owning CCameraImageCapture instance. If client wishes to initiate new capture but preserve the CCameraPostImageCaptureControl instances from previous capture, it would have to create a new CCameraImageCapture instance and use that for the new capture.
TInt aErrorCode Appropriate error code.

ImageDirectSavingCompleted(CCamera::CCameraImageCapture &, TPostCaptureControlId, TInt)

void ImageDirectSavingCompleted ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback when the individual image has been directly saved to the file. This implies that the processing options associated with the image has been finally completed.

Note:

If direct saving option is being used, this callback will be received by the client.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation. CCameraPostImageCaptureControl instances will be owned by CCameraImageCapture and would be available until new capture command is issued using the owning CCameraImageCapture instance. If client wishes to initiate new capture but preserve the CCameraPostImageCaptureControl instances from previous capture, it would have to create a new CCameraImageCapture instance and use that for the new capture.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object.
TInt aErrorCode Appropriate error code.

IndividualImageControlHandle(CCamera::CCameraImageCapture &, TPostCaptureControlId)

void IndividualImageControlHandle ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId
) [pure virtual]

Implementation sends this callback to provide client the handle to control individual images to be captured. For example, client may want to destroy the image even before the completion for some reasons. This callback may be send to the client after the image is exposed to the sensor.

Note:

If, in case, there is some problem at implementation level while the image capture operation, for example, not enough memory to create the class object CCameraPostImageCaptureControl, this callback may not be send. In such cases, ImageCaptureComplete callback can be send with appropriate error code.

Whether direct saving option is used or buffers are used for images, this callback will be received in both the cases.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation. CCameraPostImageCaptureControl instances will be owned by CCameraImageCapture and would be available until new capture command is issued using the owning CCameraImageCapture instance. If client wishes to initiate new capture but preserve the CCameraPostImageCaptureControl instances from previous capture, it would have to create a new CCameraImageCapture instance and use that for the new capture.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object. This will be used to control the individual image.

ProcessingFailed(CCamera::CCameraImageCapture &, TPostCaptureControlId, TUint, TInt)

void ProcessingFailed ( CCamera::CCameraImageCapture & aCaptureImageHandle,
TPostCaptureControlId aPostCaptureControlId,
TUint aProcessingTypes,
TInt aErrorCode
) [pure virtual]

Implementation sends this callback in order to notify the client about the failure of processing options for the individual image.

Parameters

CCamera::CCameraImageCapture & aCaptureImageHandle Reference to CCameraImageCapture class object which was used to issue the capture image operation.
TPostCaptureControlId aPostCaptureControlId Id used to identify a particular CCameraPostImageCaptureControl object associated with the given CCameraImageCapture class object. This provides the individual image for which the processing options has failed.
TUint aProcessingTypes Bitfield of TEcamProcessingOptions associated with the image that have failed.
TInt aErrorCode Appropriate error code.