Symbian3/SDK/Source/GUID-82B8C95E-F7E7-59C2-A71A-4C882653D555.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     6
<!-- Initial Contributors:
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     7
    Nokia Corporation - initial contribution.
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     8
Contributors: 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     9
-->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    10
<!DOCTYPE task
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    12
<task xml:lang="en" id="GUID-82B8C95E-F7E7-59C2-A71A-4C882653D555"><title>Continuous Digital Zooming</title><shortdesc>This tutorial describes how to perform continuous digital zooming using the Ecam API. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> <prereq id="GUID-18F6B6F4-909B-58C3-A6B3-014E8B4D5919-GENID-1-10-1-19-1-1-5-1-5-1-6-1-4-1-5-1-3-1"><p>Before you start you should understand the following topics: </p> <ul><li id="GUID-47B2BCC4-347A-5188-9DA4-1AF59A5E0862"><p><xref href="GUID-176913BA-3877-58E2-9E12-3606EE697813.dita">Overview</xref> of the advanced Camera settings functionality. </p> </li> <li id="GUID-A34D2CE7-2C30-5349-85D2-A51023CFBB4B"><p><xref href="GUID-BDB622BF-1CFA-5F1C-81FB-5579C8599689.dita">Tutorial</xref> of the advanced Camera settings functionality. </p> </li> </ul> </prereq> <context id="GUID-D62D84CA-773A-5E47-90A4-2E0FDA70C818"><p>For advanced camera settings, the continuous digital zooming API provides a greater control over continuous zoom by allowing you to specify the speed and acceleration of each continuous zoom operation. The minimum speed for zooming is zero and the minimum acceleration is a negative value (which means deceleration). </p> <p>For continuous zooming, you need to provide a concrete implementation of <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>MCameraContinuousZoom</apiname></xref>. </p> </context> <steps id="GUID-C66E1385-9555-53A9-BD8B-AC2504F8725F"><step id="GUID-87E8226E-92D7-5C21-AB84-8B69B0E1D5AC"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::NewL(CCamera&amp;)</apiname></xref> to create a <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings</apiname></xref> object. </info> </step> <step id="GUID-390913F8-97B9-5306-8716-96D1A52E1584"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::GetSupportedContinuousZoomTypeL(TUint&amp;)</apiname></xref> to retrieve supported continuous zoom options for <codeph>CCameraAdvancedSettings</codeph>. </info> </step> <step id="GUID-3F3B7935-D89F-55F0-9AF4-1C38F481C856"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::CreateContinuousZoomL(MContinuousZoomObserver&amp;,
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    13
                TContinuousZoomType, CCameraContinuousZoom*&amp;)</apiname></xref> to create a continuous zoom object. </info> </step> <step id="GUID-787CE611-8527-5B9E-AEE7-5434775C40EF"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraContinuousZoom::GetContinuousZoomSupportInfoL(CCameraAdvancedSettings::TContinuousZoomSupportInfo&amp;)</apiname></xref> to retrieve information about the supported settings related to continuous zoom. </info> </step> <step id="GUID-8DC3F51B-0A0E-5445-AF3B-9F2BA2CC7D99"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::StartContinuousZoomL(CCameraAdvancedSettings::TContinuousZoomParameters)</apiname></xref> to start the continuous zoom operation. </info> </step> <step id="GUID-86FCBD0A-5208-5220-9620-EF6F8B59210E"><cmd/><info>Call the <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraContinuousZoom::ContinuousZoomProgress(CCameraContinuousZoom&amp;,
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    14
                TInt, TInt)</apiname></xref> function when a new zoom factor has achieved during the current continuous zoom operation. </info> </step> <step id="GUID-404644BF-2C4A-5051-9ABF-928A2800FE23"><cmd/><info>Call the <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::GetContinuousZoomId
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    15
                (TInt aZoomId)</apiname></xref> function when you use more than one continuous zoom operation. This function is used to retrieve a unique ID which you can use to determine the callback function (like <codeph>ContinuousZoomProgress()</codeph> or <codeph>ContinuousZoomCompleted()</codeph>) is associated with which continuous zoom object. </info> </step> <step id="GUID-4681BA8B-30A1-5ED6-85C4-3DCA1BE237E0"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraContinuousZoom::ContinuousZoomCompleted()</apiname></xref> to inform you that the continuous zoom function has either completed successfully or to report an error that has caused the operation to fail. </info> <info>Note: This callback function does not actually stop the continuous zoom. </info> </step> <step id="GUID-B8F65783-F7FB-527D-A053-3E1A5E3321AD"><cmd/><info>Call <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCameraAdvancedSettings::StopContinuousZoom()</apiname></xref> to stop continuous zooming, if the continuous zoom function has not already completed. </info> </step> </steps> <example><title>Example</title> <p>The following example shows you how to perform continuous digital zooming using the Ecam API: </p> <codeblock id="GUID-C91D9A77-001B-5649-9B30-B0F4964C8023" xml:space="preserve">
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    16
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    17
CCamera* camera;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    18
MCameraObserver2* observer2;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    19
Camera = CCamera::New2L(*observer2, 0);
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    20
CCamera::CCameraAdvancedSettings* settings = CCamera::CCameraAdvancedSettings::NewL(*camera);
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    21
 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    22
TUint supportedContinuousZoomType;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    23
settings-&gt;GetSupportedContinuousZoomTypeL(supportedContinuousZoomType);
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    24
               
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    25
CCamera::CCameraAdvancedSettings::TContinuousZoomType continuousZoomType =
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    26
                       CCamera::CCameraAdvancedSettings::EContinuousZoomMixed;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    27
 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    28
MContinuousZoomObserver* continuousZoomObserver;     
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    29
CCamera::CCameraContinuousZoom* continuousZoom = NULL;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    30
settings-&gt;CreateContinuousZoomL(*continuousZoomObserver, continuousZoomType, continuousZoom);
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    31
        
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    32
CCamera::CCameraAdvancedSettings::TContinuousZoomSupportInfo info;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    33
continuousZoom-&gt;GetContinuousZoomSupportInfoL(info);
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    34
        
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    35
CCamera::CCameraAdvancedSettings::TContinuousZoomParameters param;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    36
param.iContinuousZoomType = continuousZoomType;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    37
param.iContinuousZoomAcceleration = 0;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    38
param.iContinuousZoomSpeed = 1;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    39
param.iContinuousZoomLimit = 5;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    40
param.iZoomDirection = CCamera::CCameraAdvancedSettings::EZoomDirectionWide;
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    41
 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    42
continuousZoom-&gt;StartContinuousZoomL(param);
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    43
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    44
</codeblock> </example> </taskbody><related-links><link href="GUID-6A7F8298-F3E9-513C-8C1F-D057AC62E5E3.dita"><linktext> Advanced Settings for Focus, Drive Modes,
7
51a74ef9ed63 Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    45
                and Bracket Modes</linktext> </link> </related-links></task>