Symbian3/SDK/Source/GUID-0B24B36D-F4C5-508A-A65B-18E4E4C45C37.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 11 Mar 2010 15:24:26 +0000
changeset 2 ebc84c812384
parent 0 89d6a7a84779
child 8 ae94777fff8f
permissions -rw-r--r--
week 10 bug fix submission: Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     6
<!-- Initial Contributors:
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     7
    Nokia Corporation - initial contribution.
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     8
Contributors: 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
     9
-->
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    10
<!DOCTYPE concept
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    12
<concept xml:lang="en" id="GUID-0B24B36D-F4C5-508A-A65B-18E4E4C45C37"><title>Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This document introduces you to the Snapshot API. </p> <section><title>Purpose</title> <p>This API allows the client to request snapshot data in a specified image format for both still images and video. The client can specify the properties of the snapshot, such as size, background colour and position to be used. For example, details about whether the snapshot has been scaled. </p> <p><b>Snapshot API Library Details</b> </p> <p>The DLL that provides the functionality and the library to which your code must link is identified below. </p> <table id="GUID-2842BA4C-19BB-5641-9D92-C76DCA01AF00"><tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/><thead><row><entry>DLL</entry> <entry>LIB</entry> <entry>Short Description</entry> </row> </thead> <tbody><row><entry><p> <xref href="GUID-74692ABF-B1FF-3ED6-BAED-BFBA2E89CFD1.dita"><apiname>ecamsnapshot.dll</apiname></xref>  </p> </entry> <entry><p> <xref href="GUID-645E6782-2610-3E79-A6A8-66A65C325E5F.dita"><apiname>euser.lib </apiname></xref>  </p> <p> <xref href="GUID-EA31C23F-8081-3A82-ABAA-168F970B5381.dita"><apiname>ecampluginsupport.lib </apiname></xref>  </p> <p> <xref href="GUID-AE2B970C-BCE8-3A17-AB2B-D5D51AB9F29E.dita"><apiname>ecamhistogram.lib </apiname></xref>  </p> </entry> <entry><p>These files are used for implementing the Snapshot APIs. </p> </entry> </row> </tbody> </tgroup> </table> </section> <section><title>Architectural Relationship</title> <p>This is part of the camera component. </p> </section> <section><title>Description</title> <p>The client application using this API should provide <codeph>McameraObserver2 </codeph> interface to be signalled, with event <codeph>KuidECamEventCameraSnapshot</codeph>, when snapshot data is available to be retrieved from the Ecam server. The client can then retrieve the snapshot data from the server. </p> </section> <section><title>Key Snapshot API Classes</title> <p>The key classes that make up the Snapshot API are as follows: </p> <ul><li id="GUID-5A404626-6602-5203-9735-37E1801BF2B0"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-7DB06650-199E-3B00-A19A-1B48D671E46E"><apiname> CCamera::CCameraSnapshot </apiname></xref>  </p> <p>This class allows a client to request snapshot data in a specified image format for both still images and video. </p> <ul><li id="GUID-5A8FEB02-3EE7-5D68-9533-8E557B53B9F6"><p> <xref href="GUID-9749B0DF-B887-3798-9185-481DF8E2F7C2.dita#GUID-9749B0DF-B887-3798-9185-481DF8E2F7C2/GUID-AB58C0C8-2C2E-3A83-9022-F2E7A356F877"><apiname> CCameraSnapshot::SupportedFormats() </apiname></xref>  </p> <p>Gets a list of the camera formats for which the server supports snapshots. </p> </li> <li id="GUID-2A68E999-85DA-54C3-8FBF-5F0CA0C68A52"><p> <xref href="GUID-7DB06650-199E-3B00-A19A-1B48D671E46E.dita#GUID-7DB06650-199E-3B00-A19A-1B48D671E46E/GUID-0379784D-339B-3962-AD73-D2140518F39E"><apiname> CCamera::CCameraSnapshot::PrepareSnapshotL()
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    13
                     </apiname></xref>  </p> <p>Selects snapshot parameters. The following example shows how to do this: </p> <codeblock id="GUID-219108F7-389A-52C3-BBCF-91976A227B84" xml:space="preserve">// Gets the list of supported formats for snapshots
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    14
TUint suppFormats = snap-&gt;SupportedFormats();
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    15
        
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    16
CCamera::TFormat format = CCamera::EFormatJpeg;
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    17
if(suppFormats &amp; format)
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    18
    {
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    19
    // Sets the properties of the snapshot data including 
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    20
    // background colour and the position of the snapshot  
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    21
    TSize sShotSize(90,50);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    22
    TRgb bgrndColor(100,100,100);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    23
    TBool aspectRatio = ETrue;
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    24
    TPoint orgPos(2,2);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    25
     
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    26
    snap-&gt;PrepareSnapshotL(format, orgPos, sShotSize, bgrndColor,aspectRatio);
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    27
</codeblock> </li> <li id="GUID-9782C5D8-B43D-5506-8E49-B188AAC7D810"><p> <xref href="GUID-7DB06650-199E-3B00-A19A-1B48D671E46E.dita#GUID-7DB06650-199E-3B00-A19A-1B48D671E46E/GUID-BCC10C00-8EBC-3A9D-A399-7AAA13824E0D"><apiname>
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    28
                     CCamera::CCameraSnapshot::IsSnapshotActive()</apiname></xref>  </p> <p>Determines if the snapshot feature is active. </p> </li> <li id="GUID-8979122B-FEA6-54B8-80CC-1B439A2C60A5"><p> <xref href="GUID-7DB06650-199E-3B00-A19A-1B48D671E46E.dita#GUID-7DB06650-199E-3B00-A19A-1B48D671E46E/GUID-A6AD9EBB-CC0C-38B6-A2C4-8DADD2B4B729"><apiname> CCamera::CCameraSnapshot::StartSnapshot()
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    29
                     </apiname></xref>  </p> <p>Request notifications from the Camera. </p> </li> <li id="GUID-DF449145-0A9C-5B4B-8648-F9F29C543C1A"><p> <xref href="GUID-7DB06650-199E-3B00-A19A-1B48D671E46E.dita#GUID-7DB06650-199E-3B00-A19A-1B48D671E46E/GUID-40F3FFA0-736A-3E47-8BBA-ABAE8C44BD84"><apiname> CCamera::CCameraSnapshot::StopSnapshot() </apiname></xref> </p> <p>Stops receiving snapshot notifications. </p> </li> <li id="GUID-9B6FFA13-5523-5006-84DD-5F50E8DA6337"><p> <xref href="GUID-7DB06650-199E-3B00-A19A-1B48D671E46E.dita#GUID-7DB06650-199E-3B00-A19A-1B48D671E46E/GUID-FD954C76-308F-3405-A553-6D47D9C67D4D"><apiname> CCamera::CCameraSnapshot::SnapshotDataL()
89d6a7a84779 Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    30
                     </apiname></xref>  </p> <p>Returns the snapshot data from server to the client. </p> </li> </ul> </li> <li id="GUID-58145F88-1AD2-57EF-A0B0-CD133BF37BF3"><p> <xref href="GUID-B0E7BDE5-2303-3547-93FB-DE0F2BC8E5FA.dita"><apiname>McameraSnapshot</apiname></xref>  </p> </li> <li id="GUID-CC7F1791-2FEC-5747-90D2-8F2A3CCD4065"><p> <xref href="GUID-6106F1FD-B3E9-3C0C-85A8-02E3C9D60D51.dita"><apiname>McameraSnapshot2</apiname></xref>  </p> </li> <li id="GUID-7E2ED929-5F16-5B7F-98F3-D18F275C58BF"><p> <xref href="GUID-928182A8-809C-3968-9203-75142146E100.dita"><apiname>CCameraDirectSnapshot</apiname></xref>  </p> </li> <li id="GUID-4C5EF5B0-5D64-5703-8ED4-0787166106D2"><p> <xref href="GUID-1A18F853-86BE-35C8-846B-77A412F65AE7.dita"><apiname>McameraDirectSnapshot</apiname></xref>  </p> </li> </ul> </section> <section><title>Using Snapshot API</title> <p>Clients can use the Snapshot API to: </p> <ul><li id="GUID-0ABF1882-0A95-500D-AD8E-5A8801816B79"><p>Create snapshots for still images and video. </p> </li> <li id="GUID-46E79542-004F-5B0C-80C8-6E2B00160FEE"><p>View the captured images on the display instantly. </p> </li> </ul> </section> <section><title>See also</title> <p><xref href="GUID-36C3A2FD-F4F9-5B8C-91B7-40C29B3D2224.dita">Overview</xref> of the Camera component </p> <p>The <xref href="GUID-FD530B98-B17D-54CD-A86E-B6FFF701D19C.dita">Snapshot</xref> tutorial </p> </section> </conbody></concept>