Symbian3/SDK/Source/GUID-0B24B36D-F4C5-508A-A65B-18E4E4C45C37.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 concept
    10 <!DOCTYPE concept
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
    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()
    12 <concept id="GUID-0B24B36D-F4C5-508A-A65B-18E4E4C45C37" xml:lang="en"><title>Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody>
    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
    13 <p>This document introduces you to the Snapshot API. </p>
       
    14 <section id="GUID-E45FEE91-DAE3-4ADA-886E-FA15926BC364"><title>Purpose</title> <p>This
       
    15 API allows the client to request snapshot data in a specified image format
       
    16 for both still images and video. The client can specify the properties of
       
    17 the snapshot, such as size, background colour and position to be used. For
       
    18 example, details about whether the snapshot has been scaled. </p> <p><b>Snapshot
       
    19 API Library Details</b> </p> <p>The DLL that provides the functionality and
       
    20 the library to which your code must link is identified below. </p> <table id="GUID-2842BA4C-19BB-5641-9D92-C76DCA01AF00">
       
    21 <tgroup cols="3"><colspec colname="col0"/><colspec colname="col1"/><colspec colname="col2"/>
       
    22 <thead>
       
    23 <row>
       
    24 <entry>DLL</entry>
       
    25 <entry>LIB</entry>
       
    26 <entry>Short Description</entry>
       
    27 </row>
       
    28 </thead>
       
    29 <tbody>
       
    30 <row>
       
    31 <entry><p><codeph>ecamsnapshot.dll</codeph> </p> </entry>
       
    32 <entry><p> <codeph>euser.lib</codeph>  </p> <p> <codeph>ecampluginsupport.lib </codeph> </p> <p> <codeph>ecamhistogram.lib</codeph> </p> </entry>
       
    33 <entry><p>These files are used for implementing the Snapshot APIs. </p> </entry>
       
    34 </row>
       
    35 </tbody>
       
    36 </tgroup>
       
    37 </table> </section>
       
    38 <section id="GUID-0DEFF9A2-3A3E-47FD-81ED-B73667C6A8FB"><title>Architectural
       
    39 Relationship</title> <p>This is part of the camera component. </p> </section>
       
    40 <section id="GUID-F347B9F8-560B-43C9-9974-942DA8E8610E"><title>Description</title> <p>The
       
    41 client application using this API should provide <codeph>McameraObserver2</codeph> interface
       
    42 to be signalled, with event <codeph>KuidECamEventCameraSnapshot</codeph>,
       
    43 when snapshot data is available to be retrieved from the Ecam server. The
       
    44 client can then retrieve the snapshot data from the server. </p> </section>
       
    45 <section id="GUID-A2178F27-19D7-443F-80EB-62A21C70A3EC"><title>Key Snapshot
       
    46 API Classes</title> <p>The key classes that make up the Snapshot API are as
       
    47 follows: </p> <ul>
       
    48 <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
       
    49 class allows a client to request snapshot data in a specified image format
       
    50 for both still images and video. </p> <ul>
       
    51 <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
       
    52 a list of the camera formats for which the server supports snapshots. </p> </li>
       
    53 <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()
       
    54                      </apiname></xref>  </p> <p>Selects snapshot parameters. The
       
    55 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
    14 TUint suppFormats = snap-&gt;SupportedFormats();
    56 TUint suppFormats = snap-&gt;SupportedFormats();
    15         
    57         
    16 CCamera::TFormat format = CCamera::EFormatJpeg;
    58 CCamera::TFormat format = CCamera::EFormatJpeg;
    17 if(suppFormats &amp; format)
    59 if(suppFormats &amp; format)
    18     {
    60     {
    22     TRgb bgrndColor(100,100,100);
    64     TRgb bgrndColor(100,100,100);
    23     TBool aspectRatio = ETrue;
    65     TBool aspectRatio = ETrue;
    24     TPoint orgPos(2,2);
    66     TPoint orgPos(2,2);
    25      
    67      
    26     snap-&gt;PrepareSnapshotL(format, orgPos, sShotSize, bgrndColor,aspectRatio);
    68     snap-&gt;PrepareSnapshotL(format, orgPos, sShotSize, bgrndColor,aspectRatio);
    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>
    69 </codeblock> </li>
    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()
    70 <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>         
    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()
    71             CCamera::CCameraSnapshot::IsSnapshotActive()</apiname></xref>  </p> <p>Determines
    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>
    72 if the snapshot feature is active. </p> </li>
       
    73 <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()
       
    74                      </apiname></xref>  </p> <p>Request notifications from the Camera. </p> </li>
       
    75 <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
       
    76 receiving snapshot notifications. </p> </li>
       
    77 <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()
       
    78                      </apiname></xref>  </p> <p>Returns the snapshot data from server
       
    79 to the client. </p> </li>
       
    80 </ul> </li>
       
    81 <li id="GUID-58145F88-1AD2-57EF-A0B0-CD133BF37BF3"><p> <xref href="GUID-CBB8D575-A12F-32C4-BC19-55AEB51D2601.dita"><apiname>MCameraSnapshot</apiname></xref>  </p> </li>
       
    82 <li id="GUID-CC7F1791-2FEC-5747-90D2-8F2A3CCD4065"><p> <xref href="GUID-A048086C-0481-3E68-9B96-70943917B3FB.dita"><apiname>MCameraSnapshot2</apiname></xref>  </p> </li>
       
    83 <li id="GUID-7E2ED929-5F16-5B7F-98F3-D18F275C58BF"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-880B1BDF-C42F-3190-81C2-B2DD555AC8FE"><apiname>CCamera::CCameraDirectSnapshot</apiname></xref>  </p> </li>
       
    84 <li id="GUID-4C5EF5B0-5D64-5703-8ED4-0787166106D2"><p> <xref href="GUID-E75CBA2D-933F-33CF-9F66-0868D6BC0649.dita"><apiname>MCameraDirectSnapshot</apiname></xref>  </p> </li>
       
    85 </ul> </section>
       
    86 <section id="GUID-EEA6127D-B05C-4E40-AE81-9FB6AF6E6FB6"><title>Using Snapshot
       
    87 API</title> <p>Clients can use the Snapshot API to: </p> <ul>
       
    88 <li id="GUID-0ABF1882-0A95-500D-AD8E-5A8801816B79"><p>Create snapshots for
       
    89 still images and video. </p> </li>
       
    90 <li id="GUID-46E79542-004F-5B0C-80C8-6E2B00160FEE"><p>View the captured images
       
    91 on the display instantly. </p> </li>
       
    92 </ul> </section>
       
    93 <section id="GUID-519A1998-16F8-4280-BCC5-8F653BB1B420"><title>See also</title> <p><xref href="GUID-36C3A2FD-F4F9-5B8C-91B7-40C29B3D2224.dita">Overview</xref> of the Camera
       
    94 component </p> <p>The <xref href="GUID-FD530B98-B17D-54CD-A86E-B6FFF701D19C.dita">Snapshot</xref> tutorial </p> </section>
       
    95 </conbody></concept>