Background Processing for Ecam

This topic describes how to capture an image using standalone background processing in Ecam.

Before you start you should understand the Onboard Camera Overview topic.

The Ecam API has been extended for background processing by having it as a standalone process. In order to use standalone background processing you need to implement the MCameraObserver2 , MPreImageCaptureControlObserver , MCaptureImageObserver interfaces and use with the CCamera API.


  1. To prepare image capturing using the CCamera API
    1. Call CCamera::CCameraPreImageCaptureControl::GetSupportedProcessingOptionsL(TUint& aECamProcessingOptionsSupported) const to get support for processing specified by TECamProcessingTypes .

    2. Pass the EECamBackgroundProcessing option instead of the SetImageProcessingOptions value within the TPrepareImageParameters values to the required processing option specified in TECamProcessingOptions for the background processing.

    3. Call CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(const CCameraPreImageCaptureControl::TPrepareImageParameters&, MCaptureImageObserver&) to perform setup and allocation of memory for the image capture operation. This implementation creates a new CCameraImageCapture() object which internally implements the MCameraImageCapture() interface. If an error occurs while preparing an image, call MPreImageCaptureControlObserver::PrepareImageComplete(CCamera::CCameraImageCapture *,TInt) to pass the aErrorCode value to CCamera .

  2. Call CCamera::CCameraImageCapture::CaptureImage() to capture an image. This implements MCameraImageCapture .

  3. Call CCamera::CCameraPostImageCaptureControl::CreateL(CCameraImageCapture*, TPostCaptureControlId) if you wish to capture another image. The CCameraPostImageCaptureControl object from the previous capture is preserved. This callback function creates a CCameraPostImageCaptureControl object for every individual image captured.

  4. Call MCaptureImageObserver::IndividualImageControlHandle(CCamera::CCameraImageCapture &,TPostCaptureControlId) to destroy the individual captured image.

  5. Call CCamera::CCameraPostImageCaptureControl::~CCameraPostImageCaptureControl() to destroy any captured image objects created by CCameraPostImageCaptureControl::CreateL() .

  6. Call CCamera::CCameraImageCapture::PauseProcessing(TUint) to pause any processing options associated with the relevant image capture function. Note: You can call PauseProcessing() for any processing options used during image capture.

  7. Call CCamera::CCameraImageCapture::ResumeProcessingL(TUint) to resume any processing options associated with the relevant image capture function. Note: You can call ResumeProcessingL() for any processing options used during image capture.

  8. Call CCamera::CCameraPostImageCaptureControl::GetImageStateL(TImageState &)const to retrieve the image state of the individual image given by the CCameraPostImageCaptureControl object.
Related concepts
Capturing Still Images