This tutorial gives you information about Advanced Camera Settings.
The purpose of this tutorial is to provide detailed descriptions of various advanced settings of Camera.
Introduction
Every individual camera setting is identified
by a UID to facilitate integration in the camera messaging mechanism.
Each change of a parameter value causes an event notification containing
the UID of the setting to be sent to all MCameraObserver2
clients of the camera. If additional information is required, clients
would use the related getter function to identify the new value of
the setting. Some settings may have a dependency on others. In this
respect a particular setting value may disable a related supported
setting.
The Following tasks will be covered in this tutorial:
Creating the CCameraAdvancedSettings
object
Setting Camera Details
Operating in stabilization mode
Operating in Flash Mode
Operating in Focus Mode.
Basic Procedure for Creating the Advance Settings Object
The high level steps to perform specific advance settings are shown here:
Create the CCameraAdvancedSettings object.
Provide a reference to a CCamera object. This returns a pointer to a fully constructed CCameraAdvancedSettings object.
CCamera::CCameraAdvancedSettings*
CCamera::CCameraAdvancedSettings::NewL
.
Note: Creation of CCameraAdvancedSettings also involves creation of the corresponding M classes; MCameraAdvancedSettings, MCameraAdvancedSettings2, MCameraAdvancedSettings3 and MCameraAdvancedSettings4 derived classes. Licensee provide concrete implementation for these M classes. CCameraAdvancedSettings is a facade which forwards the setting calls to respective M classes methods.
Note: Clients using MCameraObserver are not recommended to use this extension class, since they cannot handle events.
Basic Procedure for Setting Camera Details
The high level steps to set Camera details are shown here:
Get the information about the type of the Camera using CCamera::CCameraAdvancedSettings::TCameraType.
Check whether the current camera is present using CCamera::CCameraAdvancedSettings::IsCameraPresent().
Get the unique index of the current camera that identifies the camera on the device using CCamera::CCameraAdvancedSettings::CameraIndex()..
Basic Procedure for operating in Stabilization Mode
The high level steps to set Camera in stabilization mode are shown here:
Get all the supported stabilization modes on the camera using CCamera::CCameraAdvancedSettings::SupportedStabilizationModes().
Get current stabilization mode on the camera using CCamera::CCameraAdvancedSettings::StabilizationMode().
Set a specific stabilization mode on the camera using CCamera::CCameraAdvancedSettings::SetStabilizationMode().
The client receives the notifications of the settings asynchronously through MCameraObserver2::HandleEvent() with UID KUidECamEventCameraSettingStabilizationMode.
Note: MCameraAdvancedSettings::SetStabilizationMode() concrete implementation implements the actual setting of stabilization mode.
Basic Procedure for operating in Flash Mode
The high level steps to set Camera in flash mode are shown here:
Get the list of supported flash mode using the CCamera::CCameraAdvancedSettings::SupportedFlashModes() method and get the current flash mode using the CCamera::CCameraAdvancedSettings::FlashMode() method.
Set the flash mode using CCamera::CCameraAdvancedSettings::SetFlashMode(). This triggers a KUidECamEventCameraSettingFlashMode event to all camera MCameraObserver2 clients.
Check if the flash red eye reduction is switched on using CCamera::CCameraAdvancedSettings::RedEyeReduceOn(). It returns ETrue for switched ON and EFalse for switched OFF at current state.
Red Eye Reduce is a special mode of flash that can be set in two ways:
CCamera::CCameraAdvancedSettings::SetFlashMode(CCamera::EFlashRedEyeReduce)
CCamera::CCameraAdvancedSettings::SetRedEyeReduceOn(ETrue)
This allows the client to set two flashes simultaneously.
In such scenario, if CCamera::CCameraAdvancedSettings::FlashMode() is used, the flash mode set using SetFlashMode()
is retrieved.
Set the flash type as listed under CCamera::Tflash to CCamera::EFlashVideoLight to have constant emission of light during video mode.
Use EPCWFlashOverheated
method to indicate that flash is overheated.
Use EPCWFlashNotNeeded
method to indicate that
flash cannot be used because of enough ambient light.
When the clients subscribe for PreCaptureWarnings, concrete implementation issues PreCaptureWarnings. CCamera::CCameraAdvancedSettings::SubscribeToPreCaptureWarningL is one such method that is used for subscription.
Subsequent to subscription, if Ecam adaptation identifies any unfavourable conditions prior to image or video capture, it issues the event KUidECamEventCameraSettingPreCaptureWarning. TECAMEvent2 class should be used to provide the status of every PreCaptureWarning.
Overview for the advanced settings of Camera