Symbian3/SDK/Source/GUID-BFDDCE4E-FE4F-5815-9D0B-A0967EA53B11.dita
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 9 59758314f811
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept xml:lang="en" id="GUID-BFDDCE4E-FE4F-5815-9D0B-A0967EA53B11"><title> Controlling Still-image Capture</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This document explains how to control the still-image capture process. </p> <section><title>Purpose</title> <p>This document explains how to control the overall image capture process and to capture a still image based on given image parameters. </p> <p><b>Introduction</b> </p> <p>The Image Capture API allows the client to capture the still image and control the capture operation. This class lets you issue still image capture calls even if the previous capture calls are pending. To do this, you need to create another instance of this class. If you use the same instance, the handle to retrieve the previously captured still image will be lost. </p> </section> <section><title>Using Image Capture </title> <p>The following tasks are covered during image capture implementation: </p> <ol id="GUID-A6F12244-55D3-54AD-B6BD-0889AA4C8C43"><li id="GUID-A7F18293-C1D3-57C4-B17A-447624D853FA"><p>Provide implementation of <xref href="GUID-146FDB43-52C2-3951-8231-57B40F06A355.dita#GUID-146FDB43-52C2-3951-8231-57B40F06A355/GUID-419D6154-D265-39E7-8EEB-DB547CF05C16"><apiname>McameraPreImageCaptureControl::PrepareImageCapture</apiname></xref>. </p> </li> <li id="GUID-674D1725-EA0B-596C-BE58-86ABAF8A8A9C"><p>Use <xref href="GUID-CC3E371F-3037-3F7C-ACFF-DCC24972F0B7.dita#GUID-CC3E371F-3037-3F7C-ACFF-DCC24972F0B7/GUID-63F08B87-84BB-31DB-8215-6ECB6F2792DE"><apiname>MpreImageCaptureControlObserver::PrepareImageComplete</apiname></xref> call-back to pass this to the client to create <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4"><apiname>CCamera::CCameraImageCapture</apiname></xref> class. </p> </li> <li id="GUID-96AADAA2-5499-5DCC-92A1-C8D8EC5E56E3"><p>Create <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4"><apiname>CCamera::CCameraImageCapture</apiname></xref> object and pass it to the client, when it calls <xref href="GUID-90E10EF6-5B7E-3A0B-B1FA-293D19A2B346.dita#GUID-90E10EF6-5B7E-3A0B-B1FA-293D19A2B346/GUID-0DF29ACB-C828-3FF2-A32D-6B67203E6190"><apiname>CCameraPreImageCaptureControl::PrepareImageCapture</apiname></xref>. </p> <p>See also <xref href="GUID-6C8507F7-FE70-5654-91B5-53E356CFF67C.dita#GUID-6C8507F7-FE70-5654-91B5-53E356CFF67C/GUID-3905D703-E2DD-50B4-A48C-DE84E504B5FB">Implementation of MCameraPreImageCaptureControl</xref> class. </p> </li> <li id="GUID-4AE7CE9B-ACED-5CA5-942F-15BA608FFDC4"><p>Request still image capture using <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4"><apiname>CCamera::CCameraImageCapture</apiname></xref> object. </p> </li> <li id="GUID-F50FFDD3-E38D-5A9D-9CA6-87C7C1FE0F6F"><p>Perform image capture using <xref href="GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4.dita#GUID-4F2BB371-3FE1-3FC5-800B-67B6472FE0E4/GUID-83958C31-770B-3293-80D5-5215A0E6CFC7"><apiname>CCamera::CCameraImageCapture::CaptureImage</apiname></xref> method. This delays the background processing involved with current image captured, so as to capture next images. </p> </li> <li id="GUID-9CC20C23-2DE7-588F-A651-71C9549E4BDA"><p>Use <xref href="GUID-430C206E-24D7-30BE-98E9-ACD176DDA3A8.dita#GUID-430C206E-24D7-30BE-98E9-ACD176DDA3A8/GUID-33204396-4AC5-39E0-A3E5-7BE6F7A75413"><apiname>MCaptureImageObserver::IndividualImageControlHandle</apiname></xref> callback to provide client with the handle to control captured individual still images. This callback may be send to the client after the image is exposed to the sensor. For example, client may need to destroy the image even before the completion for some reasons. </p> </li> <li id="GUID-86CD113A-0F87-51BA-8E69-AFDCFD3046BE"><p>Use <xref href="GUID-430C206E-24D7-30BE-98E9-ACD176DDA3A8.dita#GUID-430C206E-24D7-30BE-98E9-ACD176DDA3A8/GUID-150CF08A-F0A8-3D73-B406-269425A403A0"><apiname>MCaptureImageObserver::ImageCaptureComplete</apiname></xref> callback to inform the client that the image capture operation has been completed. This lets to use <xref href="GUID-992BCFCD-9F06-35A5-B166-3058F650E360.dita"><apiname>CCameraImageCapture</apiname></xref> for next still image capture. </p> </li> </ol> <p>Note: </p> <p>Licensees need to provide concrete implementation of <xref href="GUID-65D8585F-4841-3AF4-9A9D-5EAB188C6754.dita"><apiname>McameraImageCapture</apiname></xref> interface class. </p> <p>The following example code snippets illustrate the use of the <b>PreImageCaptureControl</b> classes. </p> <codeblock id="GUID-8E714EFD-1430-5E3F-A954-0F34FAF7BF66" xml:space="preserve">static_cast&lt;MCameraPreImageCaptureControl*&gt;(CCamPreImageCaptureControl::NewL(static_cast&lt;CCamUnitTestPlugin&amp;&gt;(*this)));
       
    13 
       
    14 CCamera::CCameraImageCapture* cameraImageCapture;
       
    15 
       
    16 MPreImageCaptureControlObserver* PreImageCaptureControlObserver() {return iPreImageCaptureControlObserver;}
       
    17 PreImageCaptureControlObserver()-&gt;PrepareImageComplete(cameraImageCapture, err);
       
    18 
       
    19 CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters&amp; aPrepareImageParameters;
       
    20 MCaptureImageObserver&amp; aCaptureImageObserver;                                
       
    21 
       
    22 CreateCaptureImageL(cameraImageCapture, aPrepareImageParameters, aCaptureImageObserver));
       
    23 
       
    24 CaptureImageObserver()-&gt;IndividualImageControlHandle(*cameraImageCapture, 1);</codeblock> </section> <section><title>See also</title> <p><xref href="GUID-6C8507F7-FE70-5654-91B5-53E356CFF67C.dita"> Controlling Pre-Image Capture </xref>  </p> <p><xref href="GUID-3C3BBE1F-D7A2-5021-830B-78084334C883.dita">Controlling Captured Image</xref>  </p> </section> </conbody></concept>