Using
Time-Nudge-Capture Drive Mode
This topic describes how to capture an image using Time-Nudge-Capture
drive mode in the Ecam API.
Before you start
you should understand the following topics:
Call CCamera::New2L(MCameraObserver2 &,TInt,TInt) to
create an instance of CCamera.
Call CCamera::CCameraPreImageCaptureControl to create
an image capture object.
Call CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(const
TPrepareImageParameters &,MCaptureImageObserver &) to prepare
for capturing the image. TPrepareImageParameter uses TDriveModeDependentAttributes to
set the number of images before and after the camera capture key press event.
The iDriveMode value in TPrepareImageParameter should
be replaced into the EDriveModeTimeNudgeCapture value, to
support the time-nudge-capture drive mode.
If an aErrorCode occurs while preparing an image, you
have to call CCamera::PrepareImageComplete(CCamera::CCameraImageCapture*,
TInt).
Note: The PrepareImageComplete() 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 CaptureImage() function
is called.
Call CCamera::CaptureImage() to capture an image.
Note: You can call the CaptureImage() function to capture
the current image exposed to the sensor plus the required number of post-image
capture images.
Call the MCaptureImageObserver::IndividualImageControlHandle(CCamera::CCameraImageCapture
&,TPostCaptureControlId) function for each captured image to
pass the individual id of each image to the client.
Call MCaptureImageObserver::ImageCaptureComplete(CCamera::CCameraImageCapture
&,TInt) and MCameraObserver2::HandleEvent(const TECAMEvent
&) to notify the client that the current capture operation has
finished.
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 CaptureImage() calls.
Call CCamera::CCameraPostImageCaptureControl::CCameraPostImageCaptureControl(CCamera::CCameraImageCapture
*,TPostCaptureControlId) to control the post image capture after
capturing the desired image.
Call the MCameraObserver2::HandleEvent(const TECAMEvent &) function
when you have deleted the current CCameraImageCapture object.
Note: In this drive mode, only one instance of CCameraImageCapture can
be created at any one time, that is, PrepareImageCapture() can
only be called once. In order to successfully call PrepareImageCapture() again
and create a new CCameraImageCapture object, clients must
first destroy the previous one. Therefore, the implementation should only
issue this callback once the client has deleted the object.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.