Symbian3/SDK/Source/GUID-36BD6059-6547-5754-8BE0-F8051A838C14.dita
changeset 8 ae94777fff8f
parent 0 89d6a7a84779
equal deleted inserted replaced
7:51a74ef9ed63 8:ae94777fff8f
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE task
    10 <!DOCTYPE task
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    12 <task xml:lang="en" id="GUID-36BD6059-6547-5754-8BE0-F8051A838C14"><title>Using Time-Nudge-Capture Drive Mode </title><shortdesc>This topic describes how to capture an image using Time-Nudge-Capture drive mode in the Ecam API. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody><prereq id="GUID-B36A21C3-041E-5DBE-A019-705F64A9DCFA"><p>Before you start you should understand the following topics: </p> <ul><li id="GUID-618221F4-A6E6-5F4E-97F7-8528F010887E"><p><xref href="GUID-DA26D246-D74A-529F-9F81-11B45669103F.dita">Capturing Image</xref>. </p> </li> <li id="GUID-C875638C-B10A-511A-B7DF-8BB6ED543B0E"><p><xref href="GUID-176913BA-3877-58E2-9E12-3606EE697813.dita">Advanced Camera Settings Overview</xref>. </p> </li> </ul> </prereq> <context><p>The <codeph>EDriveModeTimeNudgeCapture</codeph> mode allows you to specify the amount of images to be captured both before and after the capture button key press. The numbers of pre- or post-capture images to be captured are set by the <codeph>TDriveModeDependentAttributes</codeph> values, with the total number of images being calculated as follows: </p> <p> <codeph>Total number of captured images = iParam1 + 1 + iParam2 </codeph> where <codeph>iParam1</codeph> and <codeph>iParam2</codeph> represent pre and post capture images respectively, and 1 represents the present image. </p> </context> <steps id="GUID-C600E75D-1C96-5D04-8F72-9EC4DCD406C6"><step id="GUID-10359A66-1222-5C8A-87E6-7E7E1CAD8847"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-C5A323D2-322D-3784-9546-A066B50C4DE1"><apiname>CCamera::New2L(MCameraObserver2
    12 <task id="GUID-36BD6059-6547-5754-8BE0-F8051A838C14" xml:lang="en"><title>Using
    13                 &amp;,TInt,TInt)</apiname></xref> to create an instance of <codeph>CCamera</codeph>. </info> </step> <step id="GUID-7AAE2DB9-0A64-55E6-814F-B6204F19BCF1"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58"><apiname>CCamera::CCameraPreImageCaptureControl</apiname></xref> to create an image capture object. </info> </step> <step id="GUID-7686E078-40F5-56E2-B35F-09CC248994AD"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-6446E75C-134A-311D-8724-71F0C962BABB"><apiname>CCamera::PrepareImageCapture(const
    13 Time-Nudge-Capture Drive Mode </title><shortdesc>This topic describes how to capture an image using Time-Nudge-Capture
    14                 TPrepareImageParameter&amp;, MCaptureImageObserver&amp;)</apiname></xref> to prepare for capturing the image. <codeph>TPrepareImageParameter</codeph> uses <codeph>TDriveModeDependentAttributes</codeph> to set the number of images before and after the camera capture key press event. The <codeph>iDriveMode</codeph> value in <codeph>TPrepareImageParameter</codeph> should be replaced into the <codeph>EDriveModeTimeNudgeCapture</codeph> value, to support the time-nudge-capture drive mode. </info> <info>If an <codeph>aErrorCode</codeph> occurs while preparing an image, you have to call <xref href="GUID-5B7C6507-040F-3825-9037-7A23A25B26A8.dita#GUID-5B7C6507-040F-3825-9037-7A23A25B26A8/GUID-81907BC4-585A-3199-8210-1E57837CADBD"><apiname>CCamera::PrepareImageComplete(CCamera::CCameraImageCapture*,
    14 drive mode in the Ecam API. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
    15                 TInt)</apiname></xref>. </info> <info>Note: The <codeph>PrepareImageComplete()</codeph> callback is deferred until the implementation is ready with the pre-image data saved in the buffer so that you can press the capture key at any time. Meanwhile the implementation continues saving the latest pre-capture images until the <codeph>CaptureImage()</codeph> function is called. </info> </step> <step id="GUID-016FF403-E087-53CA-9EC7-223496A7AE60"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-2BE39D44-2E72-3756-B0DF-9EDEDCEF2FC2"><apiname>CCamera::CaptureImage(CCameraCapture*)</apiname></xref> to capture an image. </info> <info>Note: You can call the <codeph>CaptureImage()</codeph> function to capture the current image exposed to the sensor plus the required number of post-image capture images. </info> </step> <step id="GUID-912DC8A8-51F5-5912-9474-1CE28C51715D"><cmd/><info>Call the <xref href="GUID-FB8D88AD-5F05-363B-94EF-70E3E2E7F386.dita#GUID-FB8D88AD-5F05-363B-94EF-70E3E2E7F386/GUID-F8E63880-7E40-37B1-BDDD-A546FF9A1595"><apiname>MCaptureImageObserver::IndividualImageControlHandle(CCamera::CCameraImageCapture&amp;,
    15 <prereq id="GUID-B36A21C3-041E-5DBE-A019-705F64A9DCFA"><p>Before you start
    16                 TPostCaptureControlId)</apiname></xref> function for each captured image to pass the individual id of each image to the client. </info> </step> <step id="GUID-38DBA9EA-0267-5C31-8D82-E81111636198"><cmd/><info>Call <xref href="GUID-1F521E2D-420C-35AB-865F-29B85AABDABC.dita#GUID-1F521E2D-420C-35AB-865F-29B85AABDABC/GUID-C47D6991-D2BB-382D-B8E1-D4583F9761BB"><apiname>MCaptureImageObserver::ImageCaptureComplete(CCamera::CCameraImageCapture&amp;,
    16 you should understand the following topics: </p> <ul>
    17                 TInt) and
    17 <li><p><xref href="GUID-A1D2C673-3B91-403A-800B-5E1504FB19EE.dita">Capturing Still
    18                 [a11]CCamera::HandleEvent(KUidECamEventReadyForNextCapture)</apiname></xref> to notify the client that the current capture operation has finished. </info> <info>Note: This must only occur once the implementation has saved another set of pre-image capture images. This is so that the implementation is ready to receive further <codeph>CaptureImage()</codeph> calls. </info> </step> <step id="GUID-94BF1548-C4B1-5BBE-AB08-E0A7521BF0CF"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-3EC050AE-3512-3477-9B89-C98F66234D9F"><apiname>CCamera::CCameraPostImageCaptureControl(TUid,
    18 Images</xref></p></li>
    19                 TPostCaptureControlUid)</apiname></xref> to control the post image capture after capturing the desired image. </info> </step> <step id="GUID-CCD9A5F2-0447-5154-ACC5-950CC0EC2512"><cmd/><info>Call the <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-53D971FF-6ECE-3C7D-ABF7-E318D500C5D7"><apiname>CCamera::HandleEvent(KUidECamEventReadyForNextPrepare)</apiname></xref> function when you have deleted the current <codeph>CCameraImageCapture</codeph> object. </info> <info>Note: In this drive mode, only one instance of <codeph>CCameraImageCapture</codeph> can be created at any one time, i.e. <codeph>PrepareImageCapture()</codeph> can only be called once. In order to successfully call <codeph>PrepareImageCapture()</codeph> again and create a new <codeph>CCameraImageCapture</codeph> object, clients must first destroy the previous one. Therefore, the implementation should only issue this callback once the client has deleted the object. </info> </step> </steps> </taskbody><related-links><link href="GUID-6C8507F7-FE70-5654-91B5-53E356CFF67C.dita"><linktext> Controlling Pre-Image Capture</linktext> </link> <link href="GUID-BFDDCE4E-FE4F-5815-9D0B-A0967EA53B11.dita"><linktext> Controlling Still-Image
    19 <li id="GUID-C875638C-B10A-511A-B7DF-8BB6ED543B0E"><p><xref href="GUID-176913BA-3877-58E2-9E12-3606EE697813.dita">Advanced
    20                 Capture</linktext> </link> <link href="GUID-3C3BBE1F-D7A2-5021-830B-78084334C883.dita"><linktext> Controlling Captured Image</linktext> </link> </related-links></task>
    20 Camera Settings Overview</xref>. </p> </li>
       
    21 </ul> </prereq>
       
    22 <context id="GUID-C666890D-A6ED-4ABB-982A-CEC3E9881652"><p>The <xref href="GUID-E31AEB11-B7A0-3637-BB31-866306F78118.dita#GUID-E31AEB11-B7A0-3637-BB31-866306F78118/GUID-552E8197-2AD8-377D-A15A-7EB14C836C86"><apiname>CCamera::CCameraAdvancedSettings::EDriveModeTimeNudgeCapture</apiname></xref> mode
       
    23 allows you to specify the amount of images to be captured both before and
       
    24 after the capture button key press. The numbers of pre- or post-capture images
       
    25 to be captured are set by the <xref href="GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58.dita#GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58/GUID-AED9AF83-72F6-3A5A-8693-81690A58789E"><apiname>CCamera::CCameraPreImageCaptureControl::TDriveModeDependentAttributes</apiname></xref> values,
       
    26 with the total number of images being calculated as follows: </p> <p> <codeph>Total
       
    27 number of captured images = iParam1 + 1 + iParam2 </codeph> where <codeph>iParam1</codeph> and <codeph>iParam2</codeph> represent
       
    28 pre and post capture images respectively, and 1 represents the present image. </p> </context>
       
    29 <steps id="GUID-C600E75D-1C96-5D04-8F72-9EC4DCD406C6">
       
    30 <step id="GUID-10359A66-1222-5C8A-87E6-7E7E1CAD8847"><cmd/>
       
    31 <info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-C5A323D2-322D-3784-9546-A066B50C4DE1"><apiname>CCamera::New2L(MCameraObserver2 &amp;,TInt,TInt)</apiname></xref> to
       
    32 create an instance of <codeph>CCamera</codeph>. </info>
       
    33 </step>
       
    34 <step id="GUID-7AAE2DB9-0A64-55E6-814F-B6204F19BCF1"><cmd/>
       
    35 <info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58"><apiname>CCamera::CCameraPreImageCaptureControl</apiname></xref> to create
       
    36 an image capture object. </info>
       
    37 </step>
       
    38 <step id="GUID-7686E078-40F5-56E2-B35F-09CC248994AD"><cmd/>
       
    39 <info>Call <xref href="GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58.dita#GUID-7B13335C-10A9-38D2-AE12-A50ECCF7EA58/GUID-784D7379-183B-3A3E-81A4-CD78DE68F78A"><apiname>CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(const
       
    40 TPrepareImageParameters &amp;,MCaptureImageObserver &amp;)</apiname></xref> to prepare
       
    41 for capturing the image. <codeph>TPrepareImageParameter</codeph> uses <codeph>TDriveModeDependentAttributes</codeph> to
       
    42 set the number of images before and after the camera capture key press event.
       
    43 The <codeph>iDriveMode</codeph> value in <codeph>TPrepareImageParameter</codeph> should
       
    44 be replaced into the <codeph>EDriveModeTimeNudgeCapture</codeph> value, to
       
    45 support the time-nudge-capture drive mode. </info>
       
    46 <info>If an <codeph>aErrorCode</codeph> occurs while preparing an image, you
       
    47 have to call <codeph>CCamera::PrepareImageComplete(CCamera::CCameraImageCapture*,
       
    48 TInt)</codeph>. </info>
       
    49 <info>Note: The <codeph>PrepareImageComplete()</codeph> callback is deferred
       
    50 until the implementation is ready with the pre-image data saved in the buffer
       
    51 so that you can press the capture key at any time. Meanwhile the implementation
       
    52 continues saving the latest pre-capture images until the <codeph>CaptureImage()</codeph> function
       
    53 is called. </info>
       
    54 </step>
       
    55 <step id="GUID-016FF403-E087-53CA-9EC7-223496A7AE60"><cmd/>
       
    56 <info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-0536FECC-1BD8-3726-8BBE-B1231739F23E"><apiname>CCamera::CaptureImage()</apiname></xref> to capture an image. </info>
       
    57 <info>Note: You can call the <codeph>CaptureImage()</codeph> function to capture
       
    58 the current image exposed to the sensor plus the required number of post-image
       
    59 capture images. </info>
       
    60 </step>
       
    61 <step id="GUID-912DC8A8-51F5-5912-9474-1CE28C51715D"><cmd/>
       
    62 <info>Call the <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
       
    63 &amp;,TPostCaptureControlId)</apiname></xref> function for each captured image to
       
    64 pass the individual id of each image to the client. </info>
       
    65 </step>
       
    66 <step id="GUID-38DBA9EA-0267-5C31-8D82-E81111636198"><cmd/>
       
    67 <info>Call <xref href="GUID-6DA94579-7A7C-3790-B36A-1D76A84237B9.dita#GUID-6DA94579-7A7C-3790-B36A-1D76A84237B9/GUID-F5C9E1C6-FBA7-3278-8753-BF217CA7D788"><apiname>MCaptureImageObserver::ImageCaptureComplete(CCamera::CCameraImageCapture
       
    68 &amp;,TInt)</apiname></xref> and <xref href="GUID-09C6DDB6-A208-3C81-9F54-697D4865D99F.dita#GUID-09C6DDB6-A208-3C81-9F54-697D4865D99F/GUID-92A1BB39-F8AC-388D-93FC-32CEC1EB839F"><apiname>MCameraObserver2::HandleEvent(const TECAMEvent
       
    69 &amp;)</apiname></xref> to notify the client that the current capture operation has
       
    70 finished. </info>
       
    71 <info>Note: This must only occur once the implementation has saved another
       
    72 set of pre-image capture images. This is so that the implementation is ready
       
    73 to receive further <codeph>CaptureImage()</codeph> calls. </info>
       
    74 </step>
       
    75 <step id="GUID-94BF1548-C4B1-5BBE-AB08-E0A7521BF0CF"><cmd/>
       
    76 <info>Call <xref href="GUID-4B9D0D47-B1E4-3A0C-9AB0-C27E7BAFB99C.dita#GUID-4B9D0D47-B1E4-3A0C-9AB0-C27E7BAFB99C/GUID-1E0AAFB9-61BB-3629-B9B8-E5C1190093EB"><apiname>CCamera::CCameraPostImageCaptureControl::CCameraPostImageCaptureControl(CCamera::CCameraImageCapture
       
    77 *,TPostCaptureControlId)</apiname></xref> to control the post image capture after
       
    78 capturing the desired image. </info>
       
    79 </step>
       
    80 <step id="GUID-CCD9A5F2-0447-5154-ACC5-950CC0EC2512"><cmd/>
       
    81 <info>Call the <xref href="GUID-09C6DDB6-A208-3C81-9F54-697D4865D99F.dita#GUID-09C6DDB6-A208-3C81-9F54-697D4865D99F/GUID-92A1BB39-F8AC-388D-93FC-32CEC1EB839F"><apiname>MCameraObserver2::HandleEvent(const TECAMEvent &amp;)</apiname></xref> function
       
    82 when you have deleted the current <codeph>CCameraImageCapture</codeph> object. </info>
       
    83 <info>Note: In this drive mode, only one instance of <codeph>CCameraImageCapture</codeph> can
       
    84 be created at any one time, that is, <codeph>PrepareImageCapture()</codeph> can
       
    85 only be called once. In order to successfully call <codeph>PrepareImageCapture()</codeph> again
       
    86 and create a new <codeph>CCameraImageCapture</codeph> object, clients must
       
    87 first destroy the previous one. Therefore, the implementation should only
       
    88 issue this callback once the client has deleted the object. </info>
       
    89 </step>
       
    90 </steps>
       
    91 </taskbody><related-links>
       
    92 <link href="GUID-BDB622BF-1CFA-5F1C-81FB-5579C8599689.dita"><linktext>Camera Library</linktext>
       
    93 </link>
       
    94 </related-links></task>