Symbian3/SDK/Source/GUID-E9E21C82-13F6-50D4-A271-F9E5F1BD982F.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 8 ae94777fff8f
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE task
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
<task id="GUID-E9E21C82-13F6-50D4-A271-F9E5F1BD982F" xml:lang="en"><title>Background
Processing for Ecam</title><shortdesc>This topic describes how to capture an image using standalone background
processing in Ecam. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
<prereq id="GUID-18F6B6F4-909B-58C3-A6B3-014E8B4D5919-GENID-1-10-1-21-1-1-6-1-5-1-5-1-4-1-7-1-3-1"><p>Before you start
you should understand the <xref href="GUID-80EC80E2-E197-50F7-B1FD-720A00AC3B4D.dita">Onboard
Camera Overview</xref> topic. </p> </prereq>
<context id="GUID-43393C5E-C050-5B00-99CF-4C467DBE1335"><p>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 <xref href="GUID-09C6DDB6-A208-3C81-9F54-697D4865D99F.dita"><apiname>MCameraObserver2</apiname></xref>, <xref href="GUID-901FB5EB-70A9-39AA-9052-436E8FC0C0EA.dita"><apiname>MPreImageCaptureControlObserver</apiname></xref>, <xref href="GUID-430C206E-24D7-30BE-98E9-ACD176DDA3A8.dita"><apiname>MCaptureImageObserver</apiname></xref> interfaces and use with the <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCamera</apiname></xref> API. </p> </context>
<steps id="GUID-48762C38-0A88-5EEE-85E2-49DF09ED23A7">
<step id="GUID-4F2E1FBC-5593-588D-A4E8-947E58EAADC0"><cmd/>
<info id="GUID-F6BB2B65-A4FD-53FA-BDD6-37A7D2AB3B54"> To prepare image capturing
using the <codeph>CCamera</codeph> API </info>
<substeps id="GUID-E491A3EC-80E1-502D-9A7E-F1EB1F69F0A6">
<substep id="GUID-A28A04E2-C154-5846-A934-AE175BD4FD91"><cmd>Call <xref href="GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58.dita#GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58/GUID-FEADDA78-14DF-38C9-9EEF-DF18955BB39B"><apiname>CCamera::CCameraPreImageCaptureControl::GetSupportedProcessingOptionsL(TUint&amp;
aECamProcessingOptionsSupported) const</apiname></xref> to get support for processing
specified by <codeph>TECamProcessingTypes</codeph>. </cmd>
</substep>
<substep id="GUID-BF3B1D7B-D79E-57A9-B5D5-F48938148CB7"><cmd/>
<info>Pass the <codeph>EECamBackgroundProcessing</codeph> option instead of
the <codeph>SetImageProcessingOptions</codeph> value within the <codeph>TPrepareImageParameters</codeph> values
to the required processing option specified in <codeph>TECamProcessingOptions</codeph> for
the background processing. </info>
</substep>
<substep id="GUID-3EFC3492-D190-5ADE-B293-41BC3775B3C6"><cmd/>
<info>Call <xref href="GUID-7906A608-8E79-3144-8595-AAF16BF08A31.dita#GUID-7906A608-8E79-3144-8595-AAF16BF08A31/GUID-EDA3C3EA-E007-36D1-8908-1F13872CA362"><apiname>CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(const
       CCameraPreImageCaptureControl::TPrepareImageParameters&amp;, MCaptureImageObserver&amp;)</apiname></xref> to
perform setup and allocation of memory for the image capture operation. This
implementation creates a new <codeph>CCameraImageCapture()</codeph> object
which internally implements the <codeph>MCameraImageCapture()</codeph> interface. </info>
<info>If an error occurs while preparing an image, call <xref href="GUID-1FAC4515-39EA-3C89-AE7F-EA6615F8906C.dita#GUID-1FAC4515-39EA-3C89-AE7F-EA6615F8906C/GUID-1BDF7E6E-0542-34CE-A351-252963C88CD9"><apiname>MPreImageCaptureControlObserver::PrepareImageComplete(CCamera::CCameraImageCapture
*,TInt)</apiname></xref> to pass the <codeph>aErrorCode</codeph> value to <codeph>CCamera</codeph>. </info>
</substep>
</substeps>
</step>
<step id="GUID-57389BBB-6434-583D-95F1-E235DACAEA92"><cmd/>
<info>Call <xref href="GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4.dita#GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4/GUID-478F4AF3-56F7-3155-B8BB-5AC6EC8F8673"><apiname>CCamera::CCameraImageCapture::CaptureImage()</apiname></xref> to
capture an image. This implements <xref href="GUID-BC75A950-7188-3A8B-BB25-49A119F23E06.dita"><apiname>MCameraImageCapture</apiname></xref>. </info>
</step>
<step id="GUID-DC1848F3-CEF1-58A5-AE9C-9DA6CF602F0D"><cmd/>
<info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCamera::CCameraPostImageCaptureControl::CreateL(CCameraImageCapture*,
                TPostCaptureControlId)</apiname></xref> if you wish to capture another
image. The <codeph>CCameraPostImageCaptureControl</codeph> object from the
previous capture is preserved. This callback function creates a <codeph>CCameraPostImageCaptureControl</codeph> object
for every individual image captured. </info>
</step>
<step id="GUID-27371599-2216-5C53-8730-69E8F9D9F988"><cmd/>
<info>Call <xref href="GUID-FB8D88AD-5F05-363B-94EF-70E3E2E7F386.dita#GUID-FB8D88AD-5F05-363B-94EF-70E3E2E7F386/GUID-8EF6EC5F-91F4-3E9C-BF63-B4849974AEB1"><apiname>MCaptureImageObserver::IndividualImageControlHandle(CCamera::CCameraImageCapture
&amp;,TPostCaptureControlId)</apiname></xref> to destroy the individual captured
image. </info>
</step>
<step id="GUID-27ADAF59-D386-5693-9106-AC87B6C8C3BA"><cmd/>
<info>Call <xref href="GUID-C607DA37-D386-3291-A9C5-AD0E302607D3.dita#GUID-C607DA37-D386-3291-A9C5-AD0E302607D3/GUID-36F6EC39-DF31-341E-87D3-D1DCAE192292"><apiname>CCamera::CCameraPostImageCaptureControl::~CCameraPostImageCaptureControl()</apiname></xref> to
destroy any captured image objects created by <codeph>CCameraPostImageCaptureControl::CreateL()</codeph>. </info>
</step>
<step id="GUID-5F31396D-9C68-52F8-8FC3-1C51FC7B74B5"><cmd/>
<info>Call <xref href="GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4.dita#GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4/GUID-5C7C7841-E840-3052-B753-4C4D1498AC0F"><apiname>CCamera::CCameraImageCapture::PauseProcessing(TUint)</apiname></xref> to
pause any processing options associated with the relevant image capture function. </info>
<info>Note: You can call <codeph>PauseProcessing()</codeph> for any processing
options used during image capture. </info>
</step>
<step id="GUID-41D15FB4-E0A8-54FE-90FC-2DF05CA955D0"><cmd/>
<info>Call <xref href="GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4.dita#GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4/GUID-D1DB9FF6-0465-3AE4-B3B8-EB5F0EB3F94F"><apiname>CCamera::CCameraImageCapture::ResumeProcessingL(TUint)</apiname></xref> to
resume any processing options associated with the relevant image capture function. </info>
<info>Note: You can call <codeph>ResumeProcessingL()</codeph> for any processing
options used during image capture. </info>
</step>
<step id="GUID-66119341-7FEE-5BCA-A7D8-3471E61B355A"><cmd/>
<info>Call <xref href="GUID-C607DA37-D386-3291-A9C5-AD0E302607D3.dita#GUID-C607DA37-D386-3291-A9C5-AD0E302607D3/GUID-C2C5CCFA-7537-36F9-8063-A8646FC8B6CB"><apiname>CCamera::CCameraPostImageCaptureControl::GetImageStateL(TImageState
&amp;)const</apiname></xref> to retrieve the image state of the individual
image given by the <codeph>CCameraPostImageCaptureControl</codeph> object. </info>
</step>
</steps>
</taskbody><related-links>
<link href="GUID-A1D2C673-3B91-403A-800B-5E1504FB19EE.dita"><linktext>Capturing
Still Images</linktext></link>
</related-links></task>