Symbian3/SDK/Source/GUID-80EC80E2-E197-50F7-B1FD-720A00AC3B4D.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.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-80EC80E2-E197-50F7-B1FD-720A00AC3B4D" xml:lang="en"><title>Onboard
Camera Overview</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>This document introduces you to the Onboard Ecam API. </p>
<section id="GUID-09FDE5EA-AF80-4129-913F-C1DA9D82E73E"><title>Purpose</title> <p>The Onboard Camera provides functionality
to control a digital camera and to request and receive specific image data
from it. Still or video images may be captured. A camera may be controlled
with its output media going into a non-Symbian platform sink (for example,
into hardware), or it may be controlled with output going into the Symbian
platform. </p> <p>The API defines basic common operations, but is also extensible
to allow for proprietary properties. </p> <p><b>Onboard
Ecam 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-5DF138D2-3ADC-5BCD-ADCD-D04240B33DC9">
<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-37F3C935-D1DB-3993-B3E0-A56991462D77.dita"><apiname>ecam.dll</apiname></xref>  </p> </entry>
<entry><p> <xref href="GUID-B4E2E996-CFBE-3156-B02D-D0F2F634B3C7.dita"><apiname>ecam.lib</apiname></xref>  </p> </entry>
<entry><p>These files are used for implementing the Onboard Camera functions. </p> </entry>
</row>
</tbody>
</tgroup>
</table> </section>
<section id="GUID-7ECFC164-8751-4DBE-93E2-9B0CF275CBB0"><title>Architectural Relationship</title> <p>The Onboard Camera provides
images to clients. A client may be an application with image requirements,
or the Multimedia Framework. Clients have specific priorities and may pre-empt
others in their interactions with the camera. </p> <p>Licensees and partners
implement the camera functionality for the camera hardware on their phone.
All cameras are ECom plug-ins sub-classed from the <xref href="GUID-A738B809-754B-3090-9209-0880687F173C.dita"><apiname>CCameraPlugin</apiname></xref> class. </p> <p>When
a new camera object is required, the ECam library requests a camera plug-in
from the ECom framework. When more than one ROM based plug-ins have been registered
on the platform, the one with the highest version defined in its resource
file is selected. </p> </section>
<section id="GUID-22512109-39BA-4E88-B615-609A60A5F199"><title>Description</title> <p>Client Applications can use the onboard
camera function for a number of tasks, including: </p> <p>Controlling camera
power, using the view finder, making basic camera image settings, capturing
a still image, capturing video, making advanced settings, getting snapshots,
getting image histograms, using image overlays, using preset camera settings,
image processing on the camera. </p> </section>
<section id="GUID-1AC509C3-E1D9-5DB4-9C09-90E0DCE576CB"><title>Key Onboard
Ecam API Classes</title> <p>The key classes that make up the Onboard Camera
are as follows: </p> <ul>
<li id="GUID-7D8751E9-C2B3-50DA-9B1C-6AC29FF592FA"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita"><apiname>CCamera</apiname></xref>  </p> <p>It
provides the base class for camera devices. This is the interface that the
client application uses to communicate with the camera. It provides all the
functions necessary to control, and acquire images from, the camera. </p> </li>
<li id="GUID-F8732ED8-D86C-591C-93FF-89BF4386FCE9"><p> <xref href="GUID-09C6DDB6-A208-3C81-9F54-697D4865D99F.dita"><apiname>MCameraObserver2</apiname></xref>  </p> <p>It
is an observer class which permits access to picture data as descriptors,
bitmaps or chunks. It defines an event-handling interface that is called when
events are generated from use of the camera functions, or from external sources
such as the camera being plugged or unplugged. </p> <p> <xref href="GUID-F2DC0AB8-A896-3F7A-BBED-848A3F463853.dita"><apiname>MCameraObserver</apiname></xref> is
an earlier version of this callback interface. </p> </li>
<li id="GUID-DB8CCF2A-54DA-565E-8CD4-DEE608AAB1CA"><p> <xref href="GUID-644E96EC-EFDC-335D-B2B6-A1BDB8538C0A.dita"><apiname>TCameraInfo</apiname></xref>  </p> <p>It
provides information about the camera. This includes: the version number and
name of camera hardware, camera orientation, whether the camera supports still
image capture and so on. </p> </li>
<li id="GUID-4A214B79-32AD-5BBC-AD34-084A9C960F50"><p> <xref href="GUID-7F66BE6C-9998-3F16-AD55-F6FDF6CB351F.dita"><apiname>MCameraBuffer</apiname></xref>  </p> <p>It
is the buffer class used by <codeph>MCameraObserver2</codeph> to pass back
view finder data, images and video frames. It enables the client to choose
in which way it accesses the picture data (descriptor, bitmap or kernel chunk). </p> </li>
<li id="GUID-C76A2F13-FC4F-5ABA-A818-B6031F4FB116"><p> <xref href="GUID-2773C25B-19DF-38B0-84F7-CABC89F43DD2.dita"><apiname>TECAMEvent</apiname></xref>  </p> <p>It
is a simple event class containing a UID to identify the event and a status
code. It is passed to <xref href="GUID-09C6DDB6-A208-3C81-9F54-697D4865D99F.dita"><apiname>MCameraObserver2</apiname></xref> as functional argument
using <xref href="GUID-08E0AF71-E21B-30FC-88AA-E822A40F61F5.dita"><apiname>HandleEvent</apiname></xref> method, when a request is completed.
The request is complete, if a control of the camera switches, camera hardware
settings changes, or due to external events such as the camera being plugged
in. </p> <p>Use a derived version of <codeph>TECAMEvent</codeph> and <codeph>TECAMEvent2</codeph> to
pass additional information required by extended API to the API client along
with the error event code. </p> </li>
<li id="GUID-F1E7A83E-6382-51FC-8E19-9F66CB1844CD"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-E31AEB11-B7A0-3637-BB31-866306F78118"><apiname>CCamera::CCameraAdvancedSettings</apiname></xref>  </p> <p>It
provides domain specific get and set methods for well known camera hardware
settings that relate directly to the image acquisition phase for both still
images and video. </p> </li>
<li id="GUID-A8284E63-1463-547D-9FB1-F2C9AA9FBA01"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-6750F61A-455B-371E-893B-090350DCB704"><apiname>CCamera::CCameraPresets</apiname></xref>  </p> <p>It
associates a single command with setting of several camera parameters to specific
values (and ranges). The class allows clients without knowledge of the camera
specifics to achieve comparable results for different cameras. </p> </li>
<li id="GUID-135AC315-B294-5587-B71C-379D0CBF4547"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-BD60287B-40A3-39D5-9C7B-7ABF976659B6"><apiname>CCamera::CCameraImageProcessing </apiname></xref>  </p> <p>It
is used to perform image processing operations on still images, video, viewfinder
(both client and direct). These include brightness, contrast, gamma, hue,
sharpness and saturation adjustments on the camera. The client is also able
to perform simple image transformations like cropping, rotation, mirroring,
scaling, noise reduction and glare reduction. </p> </li>
<li id="GUID-15E61113-8CE9-527B-A52C-B3A180B9960D"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-5CF1EE7D-EAED-39F7-AF9D-73DD813B64F9"><apiname> CCamera::CCameraOverlay</apiname></xref>  </p> <p>It
allows the client to overlay an image onto the view finder, snapshots, still
images, and video. </p> </li>
<li id="GUID-B8569488-6C25-5304-9A9E-8AAC964BCB06"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-4E270B4A-074C-3531-9789-123C8AE899F0"><apiname>CCamera::CCameraHistogram</apiname></xref> allows
the client to get histogram data (<xref href="GUID-5064D139-1B97-394C-8C7D-417F72444F75.dita"><apiname>MHistogramBuffer</apiname></xref>) in
a specified format for an image, such as a luminance-based, or average colour
value histogram. </p> <p>This class is deprecated, so use<xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-E159F066-0157-34B4-B154-38D120EAB16C"><apiname>CCamera::CCameraV2Histogram</apiname></xref> class. </p> </li>
<li id="GUID-7DAA023E-D0A5-598D-B97F-9C706A8D44DD"><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>It
allows the client to request snapshot data in a specified image format for
both still images and video. Snapshot object can be created specifically for
still images and video APIs. </p> </li>
<li id="GUID-B25BB7CA-8FDC-5344-BCDB-9C2018248B67"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-144A45FA-EADE-3036-B013-821F65142C82"><apiname>CCamera::CCameraDirectViewFinder</apiname></xref> used
for those viewfinders that use only viewfinder APIs of Ccamera. It provides
support for Direct View Finder functionalities, such as pause and resume.
see also <xref href="GUID-367ADFD7-A0F5-59D3-BF83-913CB8126B9D.dita">Viewfinder
API Overview</xref>. </p> </li>
<li id="GUID-F2BE13B7-5ADB-5E16-B2D3-CFB88A72068F"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-4618B02E-CD2E-3DEA-979F-4C55AE3D45EC"><apiname> CCamera::CCameraClientViewFinder</apiname></xref>  </p> <p>It
provides support for multiple client View Finder. </p> </li>
<li id="GUID-44C02BC0-02AE-5EDA-82FC-1F1DE23210B3"><p> <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>  </p> <p>It
allows to control image operations or its settings prior to image capture. </p> </li>
<li id="GUID-65E481B6-DEEC-57DD-98EC-A7D8433D5DEF"><p> <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>  </p> <p>It
captures the image and controls the overall capture. </p> </li>
<li id="GUID-9A6713D4-C284-545E-BD40-9269DBD2C573"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-C607DA37-D386-3291-A9C5-AD0E302607D3"><apiname> CCamera::CCameraPostImageCaptureControl</apiname></xref>  </p> <p>It
retrieves the image data from individual images and also controls the captured
images individually. </p> </li>
<li id="GUID-FBBF3E1B-D511-5AFB-8AE5-E996AD7CC4FC"><p> <xref href="GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4.dita#GUID-021C509B-C821-3401-B2F4-DE7F52BB16D4/GUID-D74635DE-C5D8-3A9A-ABDD-8324D8EFF460"><apiname>CCamera::CCameraVideoCaptureControl</apiname></xref>  </p> <p>It
controls the operations related to video capture. </p> </li>
</ul> <p>The class diagram of CCamera is shown below: </p> <fig id="GUID-E2F73C42-38F9-5EE1-B5EB-C255B42E0621">
<image href="GUID-C1A6477D-2130-5664-A845-898212F96381_d0e290246_href.png" placement="inline"/>
</fig> </section>
<section id="GUID-29660557-F0B3-4400-A482-CEEE36A7B3F4"><title>Using Onboard Ecam API</title> <p>The clients can use CCamera
function to control and acquire image data from the camera. </p> </section>
<section id="GUID-16BFDFCF-2805-402D-911B-A1A81A8BF50C"><title>See also</title> <p><xref href="GUID-36C3A2FD-F4F9-5B8C-91B7-40C29B3D2224.dita">Camera
Framework Overview</xref>  </p> <p><xref href="GUID-55A1A47A-A7DD-5B1A-88E1-4818CB65B782.dita">Camera
Tutorials</xref>  </p> </section>
</conbody></concept>