Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: ecam.h
Link against: ecam.lib

Class CCamera

class CCamera : public CBase;

Description

Base class for camera devices.

Provides the interface that an application uses to control, and acquire images from, the camera.

An application must supply an implementation of MCameraObserver2 (or MCameraObserver).

Derivation

Members

Defined in CCamera:
Brightness(), BuffersInUse(), CCameraAdvancedSettings, CCameraImageProcessing, CCameraPresets, CameraInfo(), CamerasAvailable(), CancelCaptureImage(), CaptureImage(), Contrast(), CustomInterface(), DigitalZoomFactor(), EBrightnessAuto, EContrastAuto, EExposureAperturePriority, EExposureAuto, EExposureBacklight, EExposureBeach, EExposureCenter, EExposureInfra, EExposureManual, EExposureNight, EExposureProgram, EExposureShutterPriority, EExposureSnow, EExposureSport, EExposureSuperNight, EExposureVeryLong, EFlashAuto, EFlashFillIn, EFlashForced, EFlashManual, EFlashNone, EFlashRedEyeReduce, EFlashSlowFrontSync, EFlashSlowRearSync, EFlashVideoLight, EFormat16BitRGB565, EFormat16bitRGB444, EFormat32BitRGB888, EFormatExif, EFormatFbsBitmapColor16M, EFormatFbsBitmapColor16MU, EFormatFbsBitmapColor4K, EFormatFbsBitmapColor64K, EFormatJpeg, EFormatMonochrome, EFormatUserDefined, EFormatYUV420Interleaved, EFormatYUV420Planar, EFormatYUV420SemiPlanar, EFormatYUV422, EFormatYUV422Reversed, EFormatYUV444, EWBAuto, EWBBeach, EWBCloudy, EWBDaylight, EWBFlash, EWBFluorescent, EWBManual, EWBShade, EWBSnow, EWBTungsten, EnumerateCaptureSizes(), EnumerateVideoFrameRates(), EnumerateVideoFrameSizes(), Exposure(), Flash(), FrameRate(), FramesPerBuffer(), GetFrameSize(), Handle(), JpegQuality(), New2L(), NewDuplicate2L(), NewDuplicateL(), NewDuplicateL(), NewL(), NewL(), PowerOff(), PowerOn(), PrepareImageCaptureL(), PrepareImageCaptureL(), PrepareVideoCaptureL(), PrepareVideoCaptureL(), Release(), Reserve(), SetBrightnessL(), SetContrastL(), SetDigitalZoomFactorL(), SetExposureL(), SetFlashL(), SetJpegQuality(), SetViewFinderMirrorL(), SetWhiteBalanceL(), SetZoomFactorL(), StartVideoCapture(), StartViewFinderBitmapsL(), StartViewFinderBitmapsL(), StartViewFinderDirectL(), StartViewFinderDirectL(), StartViewFinderL(), StartViewFinderL(), StopVideoCapture(), StopViewFinder(), TBrightness, TContrast, TExposure, TFlash, TFormat, TWhiteBalance, VideoCaptureActive(), ViewFinderActive(), ViewFinderMirror(), WhiteBalance(), ZoomFactor()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


NewL()

Capability: MultimediaDD A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD.
Capability: UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.

static IMPORT_C CCamera *NewL(MCameraObserver2 &aObserver, TInt aCameraIndex, TInt aPriority);

Description

Creates an object representing a camera.

Note: Applications using this method to create camera object may not receive enums/uids added in future( after being baselined). To receive them, they should rather use New2L(..) or NewDuplicate2L(..), in which case, they should prepare themselves to receive unrecognised values.

Parameters

MCameraObserver2 &aObserver

Reference to class derived from MCameraObserver2 designed to receive notification of asynchronous event completion.

TInt aCameraIndex

Index from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.

TInt aPriority

Value from -100 to 100 indicating relative priority of client to use camera.

Return value

CCamera *

Pointer to a fully constructed CCamera object. Ownership is passed to the caller.

Leave codes

KErrNoMemory

if out of memory.

KErrNotSupported

if aCameraIndex is out of range.

KErrPermissionDenied

if the application does not have the UserEnvironment capability.


NewL()

Capability: UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.

static IMPORT_C CCamera *NewL(MCameraObserver &aObserver, TInt aCameraIndex);

Description

Creates an object representing a camera.

Note: Applications using this method to create camera object may not receive enums/uids added in future(after being baselined). To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare themselves to receive unrecognised values.

Parameters

MCameraObserver &aObserver

Reference to class derived from MCameraObserver designed to receive notification of asynchronous event completion.

TInt aCameraIndex

Index from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.

Return value

CCamera *

Pointer to a fully constructed CCamera object. Ownership is passed to the caller.

Leave codes

KErrNoMemory

if out of memory.

KErrNotSupported

if aCameraIndex is out of range.

KErrPermissionDenied

if the application does not have the UserEnvironment capability.

[Top]


Member functions


CamerasAvailable()

static IMPORT_C TInt CamerasAvailable();

Description

Determines the number of cameras on the device.

Return value

TInt

Count of cameras present on the device.


New2L()

Capability: MultimediaDD A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD.
Capability: UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.

static IMPORT_C CCamera *New2L(MCameraObserver2 &aObserver, TInt aCameraIndex, TInt aPriority);

Description

Creates an object representing a camera. Clients prepare themselves to receive unrecognised enum, uids etc.

Note: Clients using this creation method should prepare themselves to receive any unrecognised enum values, uids from 'supported' or 'getter' methods

Parameters

MCameraObserver2 &aObserver

Reference to class derived from MCameraObserver2 designed to receive notification of asynchronous event completion.

TInt aCameraIndex

Index from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.

TInt aPriority

Value from -100 to 100 indicating relative priority of client to use camera.

Return value

CCamera *

Pointer to a fully constructed CCamera object. Ownership is passed to the caller.

Leave codes

KErrNoMemory

if out of memory.

KErrNotSupported

if aCameraIndex is out of range.

KErrPermissionDenied

if the application does not have the UserEnvironment capability.


NewDuplicateL()

Capability: UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.

static IMPORT_C CCamera *NewDuplicateL(MCameraObserver2 &aObserver, TInt aCameraHandle);

Description

Duplicates the original camera object for use by, for example, multimedia systems.

May leave with KErrNoMemory or KErrNotFound if aCameraHandle is not valid.

Note: Applications using this method to create camera object may not receive enums/uids added in future(after being baselined). To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare themselves to receive unrecognised values.

Parameters

MCameraObserver2 &aObserver

Reference to an observer.

TInt aCameraHandle

Handle of an existing camera object.

Return value

CCamera *

Duplicate of the original camera object.

Leave codes

KErrNoMemory

if out of memory.

KErrNotFound

if aCameraHandle is not valid.

KErrPermissionDenied

if the application does not have the UserEnvironment capability.


NewDuplicate2L()

Capability: UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.

static IMPORT_C CCamera *NewDuplicate2L(MCameraObserver2 &aObserver, TInt aCameraHandle);

Description

Duplicates the original camera object for use by, for example, multimedia systems. Clients prepare themselves to receive unrecognised enum, uids etc.

May leave with KErrNoMemory or KErrNotFound if aCameraHandle is not valid.

Note: Clients using this creation method should prepare themselves to receive any unrecognised enum values, uids from 'supported' or 'getter' methods

Parameters

MCameraObserver2 &aObserver

Reference to an observer.

TInt aCameraHandle

Handle of an existing camera object.

Return value

CCamera *

Duplicate of the original camera object.

Leave codes

KErrNoMemory

if out of memory.

KErrNotFound

if aCameraHandle is not valid.

KErrPermissionDenied

if the application does not have the UserEnvironment capability.


NewDuplicateL()

Capability: UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.

static IMPORT_C CCamera *NewDuplicateL(MCameraObserver &aObserver, TInt aCameraHandle);

Description

Duplicates the original camera object for use by, for example, multimedia systems.

Note: Applications using this method to create camera object may not receive enums/uids added in future(after being baselined). To receive them, they should rather use New2L() or NewDuplicate2L(), in which case, they should prepare themselves to receive unrecognised values.

Parameters

MCameraObserver &aObserver

Reference to an observer.

TInt aCameraHandle

Handle of an existing camera object.

Return value

CCamera *

Duplicate of the original camera object.

Leave codes

KErrNoMemory

if out of memory.

KErrNotFound

if aCameraHandle is not valid.

KErrPermissionDenied

if the application does not have the UserEnvironment capability.


CameraInfo()

virtual void CameraInfo(TCameraInfo &aInfo) const=0;

Description

Gets information about the camera device.

Parameters

TCameraInfo &aInfo

On return, information about the camera device. See TCameraInfo.


Reserve()

virtual void Reserve()=0;

Description

Asynchronous function that performs any required initialisation and reserves the camera for exclusive use.

Calls MCameraObserver:: ReserveComplete() when complete.


Release()

virtual void Release()=0;

Description

De-initialises the camera, allowing it to be used by other clients.


PowerOn()

virtual void PowerOn()=0;

Description

Asynchronous method to switch on camera power.

User must have successfully called Reserve() prior to calling this function.

Calls MCameraObserver::PowerOnComplete() when power on is complete.


PowerOff()

virtual void PowerOff()=0;

Description

Synchronous function for switching off camera power.


Handle()

virtual TInt Handle()=0;

Description

Gets the device-unique handle of this camera object.

Return value

TInt

The device-unique handle of this camera object.


SetZoomFactorL()

virtual void SetZoomFactorL(TInt aZoomFactor=0)=0;

Description

Sets the zoom factor.

This must be in the range of TCameraInfo::iMinZoom to TCameraInfo::iMaxZoom inclusive. May leave with KErrNotSupported if the specified zoom factor is out of range.

Parameters

TInt aZoomFactor

Required zoom factor.


ZoomFactor()

virtual TInt ZoomFactor() const=0;

Description

Gets the currently set zoom factor.

Return value

TInt

The currently set zoom factor.


SetDigitalZoomFactorL()

virtual void SetDigitalZoomFactorL(TInt aDigitalZoomFactor=0)=0;

Description

Sets the digital zoom factor.

This must be in the range of 0 to TCameraInfo::iMaxDigitalZoom inclusive.

May leave with KErrNotSupported if the zoom factor is out of range.

Parameters

TInt aDigitalZoomFactor

The required digital zoom factor.


DigitalZoomFactor()

virtual TInt DigitalZoomFactor() const=0;

Description

Gets the currently set digital zoom factor.

Return value

TInt

The currently set digital zoom factor.


SetContrastL()

virtual void SetContrastL(TInt aContrast)=0;

Description

Sets the contrast adjustment of the device.

This must be in the range of -100 to +100 or EContrastAuto. May leave with KErrNotSupported if the specified contrast value is out of range.

Parameters

TInt aContrast

Required contrast value. See TCameraInfo::EContrastSupported


Contrast()

virtual TInt Contrast() const=0;

Description

Gets the currently set contrast value.

Return value

TInt

The currently set contrast value.


SetBrightnessL()

virtual void SetBrightnessL(TInt aBrightness)=0;

Description

Sets the brightness adjustment of the device.

No effect if this is not supported, see TCameraInfo::EBrightnessSupported.

This must be in the range of -100 to +100 or EBrightnessAuto. May leave with KErrNotSupported if the brightness adjustment is out of range.

Parameters

TInt aBrightness

The required brightness adjustment.


Brightness()

virtual TInt Brightness() const=0;

Description

Gets the currently set brightness adjustment value.

Return value

TInt

The currently set brightness adjustment value.


SetFlashL()

virtual void SetFlashL(TFlash aFlash=EFlashNone)=0;

Description

Sets the flash mode.

No effect if this is not supported, see TCameraInfo::iFlashModesSupported.

May leave with KErrNotSupported if the specified flash mode is invalid.

Parameters

TFlash aFlash

The required flash mode.


Flash()

virtual TFlash Flash() const=0;

Description

Gets the currently set flash mode.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised) (set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set. In this case, application is assumed to be prepared to receive unrecognised enum values.

Return value

TFlash

The currently set flash mode.

See also:


SetExposureL()

virtual void SetExposureL(TExposure aExposure=EExposureAuto)=0;

Description

Sets the exposure adjustment of the device.

No effect if this is not supported, see CameraInfo::iExposureModesSupported.

May leave with KErrNotSupported if the specified exposure adjustment is invalid.

Parameters

TExposure aExposure

The required exposure adjustment.


Exposure()

virtual TExposure Exposure() const=0;

Description

Gets the currently set exposure setting value.

Return value

TExposure

The currently set exposure setting value.


SetWhiteBalanceL()

virtual void SetWhiteBalanceL(TWhiteBalance aWhiteBalance=EWBAuto)=0;

Description

Sets the white balance adjustment of the device.

No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported.

Parameters

TWhiteBalance aWhiteBalance

The required white balance adjustment.

Leave codes

KErrNotSupported

if the specified white balance adjustment is invalid.


WhiteBalance()

virtual TWhiteBalance WhiteBalance() const=0;

Description

Gets the currently set white balance adjustment value.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values (unrecognised). So, any extra enum value(unrecognised) (set in the ECAM implementation because of sharing clients) should not be returned from the ECAM implementation. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. ECAM implementation, after verifying this,(by checking version no.) may send new values, if set. In this case, application is assumed to be prepared to receive unrecognised enum values. Refer CCamera::CCameraAdvancedSettings::WhiteBalanceMode() implementation

Return value

TWhiteBalance

The currently set white balance adjustment value.

See also:


StartViewFinderDirectL()

virtual void StartViewFinderDirectL(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow, TRect &aScreenRect)=0;

Description

Starts transfer of view finder data to the given portion of the screen using direct screen access.

The aScreenRect parameter is in screen co-ordinates and may be modified if, eg, the camera requires the destination to have a certain byte alignment, etc.

Parameters

RWsSession &aWs

Window server session.

CWsScreenDevice &aScreenDevice

Screen device.

RWindowBase &aWindow

Displayable window.

TRect &aScreenRect

Portion of the screen to which view finder data is to be transferred. This is in screen co-ordinates and may be modified if, for example, the camera requires the destination to have a certain byte alignment.

Leave codes

KErrNotReady

if PowerOn() has either not been called, or has not yet completed.


StartViewFinderDirectL()

virtual void StartViewFinderDirectL(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow, TRect &aScreenRect, TRect &aClipRect)=0;

Description

Starts transfer of view finder data to the given portion of the screen using direct screen access and also clips to the specified portion of the screen.

The view finder has the same size and position as aScreenRect but is only visible in the intersection of aScreenRect and aClipRect. May leave with KErrNotSupported or KErrNotReady if Reserve() has not been called, or has not yet completed.

Parameters

RWsSession &aWs

Window server session.

CWsScreenDevice &aScreenDevice

Screen device.

RWindowBase &aWindow

Displayable window.

TRect &aScreenRect

Portion of the screen to which view finder data is to be transferred. This is in screen co-ordinates and may be modified if, for example, the camera requires the destination to have a certain byte alignment.

TRect &aClipRect

The rectangle to which the screen will be clipped.

Leave codes

KErrNotReady

if PowerOn() hasn't been called successfully.


StartViewFinderBitmapsL()

virtual void StartViewFinderBitmapsL(TSize &aSize)=0;

Description

Starts transfer of view finder data.

Bitmaps are returned by MCameraObserver::ViewFinderFrameReady().

Parameters

TSize &aSize

On return, the size used.

Leave codes

KErrNotReady

if PowerOn() has not been called, or has not yet completed.


StartViewFinderBitmapsL()

virtual void StartViewFinderBitmapsL(TSize &aSize, TRect &aClipRect)=0;

Description

Starts transfer of view finder data and clips the bitmap to the specified clip rectangle.

The bitmap is the size of the intersection of aSize and aClipRect, not simply aSize padded with white space.

Parameters

TSize &aSize

On return, the size used.

TRect &aClipRect

Required clip rectangle. May be modified if, for example, the camera only supports certain byte alignments.

Leave codes

KErrInUse

if Reserve() hasn't been called successfully.

KErrNotReady

if PowerOn() hasn't been called successfully.


StartViewFinderL()

virtual void StartViewFinderL(TFormat aImageFormat, TSize &aSize)=0;

Description

Starts transfer of view finder data.

Picture data is returned by MCameraObserver2::ViewFinderReady().

Parameters

TFormat aImageFormat

The image format requested by the client.

TSize &aSize

On return, the size used.

Leave codes

KErrNotSupported

KErrNotReady

if Reserve() has not been called, or has not yet completed.


StartViewFinderL()

virtual void StartViewFinderL(TFormat aImageFormat, TSize &aSize, TRect &aClipRect)=0;

Description

Starts transfer of view finder data and clips the picture to the specified clip rectangle. Picture data is returned by MCameraObserver2::ViewFinderReady().

The picture is the size of the intersection of aSize and aClipRect, not simply aSize padded with white space.

Parameters

TFormat aImageFormat

The image format.

TSize &aSize

On return, the size used.

TRect &aClipRect

Required clip rectangle. May be modified if, for example, the camera only supports certain byte alignments.

Leave codes

KErrInUse

if Reserve() hasn't been called successfully,

KErrNotReady

if PowerOn() hasn't been called successfully.


StopViewFinder()

virtual void StopViewFinder()=0;

Description

Stops transfer of view finder data to the screen.


ViewFinderActive()

virtual TBool ViewFinderActive() const=0;

Description

Queries whether the view finder is active.

Return value

TBool

ETrue if the view finder is active. EFalse if the view finder is not active.


SetViewFinderMirrorL()

virtual void SetViewFinderMirrorL(TBool aMirror)=0;

Description

Sets whether view finder mirroring is on.

Used to switch between what the camera sees and what you would see if the device were a mirror.

Parameters

TBool aMirror

ETrue to set mirroring on, EFalse to set mirroring off.

Leave codes

KErrNotSupported.


ViewFinderMirror()

virtual TBool ViewFinderMirror() const=0;

Description

Gets whether view finder mirroring is active.

Return value

TBool

ETrue if mirroring is set, EFalse if mirroring is not set.


PrepareImageCaptureL()

virtual void PrepareImageCaptureL(TFormat aImageFormat, TInt aSizeIndex)=0;

Description

Performs setup and allocation of memory.

Called prior to calling CaptureImage() to keep the latency of that function to a minimum.

Needs to be called only once for multiple CaptureImage() calls. May leave with KErrNotSupported or KErrNoMemory or KErrInUse or KErrNotReady.

The specified image format must be one of the formats supported (see TCameraInfo::iImageFormatsSupported).

The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1 inclusive.

Parameters

TFormat aImageFormat

The image format.

TInt aSizeIndex

Size index.

Leave codes

KErrNotSupported

KErrNoMemory

KErrNotReady

if PowerOn() hasn't been called successfully.


PrepareImageCaptureL()

virtual void PrepareImageCaptureL(TFormat aImageFormat, TInt aSizeIndex, const TRect &aClipRect)=0;

Description

Performs setup and allocation of memory and clips the image to the specified rectangle.

No effect unless TCameraInfo::iImageClippingSupported is set to ETrue. The image captured is the intersection of aClipRect and the rectangle from (0,0) to aSize. Needs to be called only once for multiple CaptureImage() calls. May leave with KErrNotSupported or KErrNoMemory.

The specified image format must be one of the formats supported (see TCameraInfo::iImageFormatsSupported).

The specified size index must be in the range of 0 to TCameraInfo::iNumImageSizesSupported-1 inclusive.

Parameters

TFormat aImageFormat

The image format.

TInt aSizeIndex

Size index.

const TRect &aClipRect

The rectangle to which the image is to be clipped.

Leave codes

KErrNotSupported

KErrNoMemory

KErrInUse

if Reserve() hasn't been called successfully

KErrNotReady

if PowerOn() hasn't been called successfully.


CaptureImage()

virtual void CaptureImage()=0;

Description

Asynchronously performs still image capture.

Calls MCameraObserver::ImageReady() when complete.


CancelCaptureImage()

virtual void CancelCaptureImage()=0;

Description

Cancels the asynchronous still image capture.


EnumerateCaptureSizes()

virtual void EnumerateCaptureSizes(TSize &aSize, TInt aSizeIndex, TFormat aFormat) const=0;

Description

Enumerates through the available image capture sizes, based on the specified size index and format

The size index must be in the range 0 to TCameraInfo::iNumImageSizesSupported-1 inclusive.

Parameters

TSize &aSize

Image size.

TInt aSizeIndex

Size index.

TFormat aFormat

The image format.


PrepareVideoCaptureL()

virtual void PrepareVideoCaptureL(TFormat aFormat, TInt aSizeIndex, TInt aRateIndex, TInt aBuffersToUse, TInt aFramesPerBuffer)=0;

Description

Prepares for video capture.

Performs setup and allocation of memory prior to calling StartVideoCapture() to keep the latency of that function to a minimum.

May leave with KErrNotSupported or KErrNoMemory.

Parameters

TFormat aFormat

Format must be one of the video frame formats supported (see TCameraInfo::iVideoFrameFormatsSupported).

TInt aSizeIndex

Size index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive.

TInt aRateIndex

The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.

TInt aBuffersToUse

The number of discrete buffers to use.

TInt aFramesPerBuffer

How large the buffers are to be. Must be less than or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned to MCameraObserver::FrameBufferReady() at a time.

Leave codes

May

leave with KErrNotSupported, KErrNoMemory, or KErrNotReady if PowerOn() hasn't been called successfully.


PrepareVideoCaptureL()

virtual void PrepareVideoCaptureL(TFormat aFormat, TInt aSizeIndex, TInt aRateIndex, TInt aBuffersToUse, TInt aFramesPerBuffer, const TRect &aClipRect)=0;

Description

Prepares for video capture and clips the frames to the given rectangle.

Performs setup and allocation of memory prior to calling StartVideoCapture() to keep the latency of that function to a minimum.

May leave with KErrNotSupported or KErrNoMemory.

Parameters

TFormat aFormat

Format must be one of the video frame formats supported (see TCameraInfo::iVideoFrameFormatsSupported).

TInt aSizeIndex

Size index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive.

TInt aRateIndex

The rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.

TInt aBuffersToUse

The number of discrete buffers to use.

TInt aFramesPerBuffer

How large the buffers are to be. Must be less than or equal to TCameraInfo::iMaxFramesPerBufferSupported. One buffer is returned to MCameraObserver::FrameBufferReady() at a time.

const TRect &aClipRect

The rectangle to which the image is to be clipped.

Leave codes

KErrNotSupported

KErrNoMemory,

KErrInUse

if Reserve() hasn't been called successfully

KErrNotReady

if PowerOn() hasn't been called successfully.


StartVideoCapture()

virtual void StartVideoCapture()=0;

Description

Starts capturing video.

Calls MCameraObserver::FrameBufferReady() when each buffer has been filled with the required number of frames, as set by PrepareVideoCaptureL().


StopVideoCapture()

virtual void StopVideoCapture()=0;

Description

Stops video capture.


VideoCaptureActive()

virtual TBool VideoCaptureActive() const=0;

Description

Tests whether video capture is active.

Return value

TBool

ETrue if video capture is active. EFalse if video capture is not active


EnumerateVideoFrameSizes()

virtual void EnumerateVideoFrameSizes(TSize &aSize, TInt aSizeIndex, TFormat aFormat) const=0;

Description

Enumerates through the available video frame sizes, based on the specified size index and format.

Parameters

TSize &aSize

On return the available video frame sizes. Sizes should be returned in order, largest first, so clients do not have to iterate through every one.

TInt aSizeIndex

Size index. Must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive

TFormat aFormat

Image format.


EnumerateVideoFrameRates()

virtual void EnumerateVideoFrameRates(TReal32 &aRate, TInt aRateIndex, TFormat aFormat, TInt aSizeIndex, TExposure aExposure=EExposureAuto) const=0;

Description

Enumerates through the available video frame rates, based on the specified rate index, video frame format, size index and exposure mode.

Parameters

TReal32 &aRate

On return, the available video frame rates. Some rates may not be available due to, for example, current flash mode setting. In those cases a rate of 0 will be returned. Rates should be returned in order, highest first, so clients do not have to iterate through every one.

TInt aRateIndex

The rate index. Must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.

TFormat aFormat

The format.

TInt aSizeIndex

The size index.

TExposure aExposure

The exposure mode.


GetFrameSize()

virtual void GetFrameSize(TSize &aSize) const=0;

Description

Gets the frame size currently in use.

Parameters

TSize &aSize

The frame size currently in use.


FrameRate()

virtual TReal32 FrameRate() const=0;

Description

Gets the frame rate currently in use.

Return value

TReal32

The frame rate currently in use.


BuffersInUse()

virtual TInt BuffersInUse() const=0;

Description

Gets the number of buffers currently in use.

Return value

TInt

The number of buffers currently in use.


FramesPerBuffer()

virtual TInt FramesPerBuffer() const=0;

Description

Gets the number of frames per buffer currently in use.

Return value

TInt

The number of frames per buffer currently in use.


SetJpegQuality()

virtual void SetJpegQuality(TInt aQuality)=0;

Description

Sets the quality value to use if jpeg is a supported image for video format.

Ignored if jpeg is not a supported image for video format.

Parameters

TInt aQuality

The quality value to use, clamped to the range 1 to 100.


JpegQuality()

virtual TInt JpegQuality() const=0;

Description

Gets the currently set jpeg quality value.

Returns 0 if not supported.

Return value

TInt

The currently set jpeg quality value.


CustomInterface()

virtual TAny *CustomInterface(TUid aInterface)=0;

Description

Gets a custom interface. The client has to cast the returned pointer to the appropriate type.

Parameters

TUid aInterface

The Uid of the particular interface function required.

Return value

TAny *

Custom interface pointer. NULL if the requested interface is not supported.

[Top]


Member classes


Class CCameraAdvancedSettings

class CCameraAdvancedSettings : public CBase;

Description

CCamera advanced settings class exposes an API for controlling individually digital camera advanced settings. These settings directly relate to the image acquisition phase both for still images and video.

Note: This class is not intended for sub-classing and used to standardise existing varieties of implementations.

Derivation

Members

Defined in CCamera::CCameraAdvancedSettings:
Aperture(), ApertureExposureLockOn(), AutoFocusArea(), AutoFocusLockOn(), AutoFocusType(), AutomaticSizeSelectionChangeOn(), BracketMode(), BracketParameter(), BracketParameterAperture, BracketParameterAutoFocus, BracketStep(), BurstImages(), CameraIndex(), CameraType(), CameraType(), ContinuousAutoFocusTimeout(), DigitalZoom(), DriveMode(), EAutoFocusTypeAuto, EAutoFocusTypeContinuous, EAutoFocusTypeMultiAreaCentered, EAutoFocusTypeOff, EAutoFocusTypeSingle, EAutoFocusTypeSingleArea, EBracketMode3Image, EBracketMode5Image, EBracketModeOff, EBracketParameterColourBalance, EBracketParameterExposure, EBracketParameterFlashPower, EBracketParameterNone, EBracketStepLarge, EBracketStepMedium, EBracketStepNonConfig, EBracketStepSmall, ECameraOnBoard, ECameraPluggable, ECameraUnknown, EDriveModeAuto, EDriveModeBracket, EDriveModeBracketMerge, EDriveModeBurst, EDriveModeContinuous, EDriveModeSingleShot, EDriveModeTimeLapse, EDriveModeTimed, EEPixelAspect10To11, EEPixelAspect11To10, EEPixelAspect16To11, EEPixelAspect40To33, EEPixelAspect59To54, EFocusModeAuto, EFocusModeFixed, EFocusModeManual, EFocusModeUnknown, EFocusRangeAuto, EFocusRangeMacro, EFocusRangeNormal, EFocusRangePortrait, EFocusRangeSuperMacro, EFocusRangeTele, EMeteringModeAuto, EMeteringModeCenterWeighted, EMeteringModeEvaluative, EMeteringModeSpot, EPictureOrientationLandscape, EPictureOrientationPortrait, EPictureOrientationSquare, EPictureOrientationUnknown, EPixelAspect12To11, EPixelAspect1To1, EPixelAspectUnknown, EStabilizationAuto, EStabilizationComplexityAuto, EStabilizationComplexityHigh, EStabilizationComplexityLow, EStabilizationComplexityMedium, EStabilizationFine, EStabilizationMedium, EStabilizationModeAuto, EStabilizationModeHorizontal, EStabilizationModeManual, EStabilizationModeOff, EStabilizationModeRotation, EStabilizationModeVertical, EStabilizationOff, EStabilizationStrong, EWBColorTemperature, EWBRgb, EWBUnknown, EYuvRangeFull, EYuvRangeUnknown, EYuvRangeVideoCropped, ExposureCompensation(), ExposureCompensationStep(), ExposureLockOn(), ExposureMode(), FlashCompensation(), FlashCompensationStep(), FlashMode(), FocusDistance(), FocusMode(), FocusRange(), GetActiveSettingsL(), GetAperturesL(), GetBracketMerge(), GetCurrentFocusModeStepsL(), GetDigitalZoomStepsL(), GetDisabledSettingsL(), GetExposureCompensationRangeInSteps(), GetExposureCompensationStepsL(), GetFlashCompensationRangeInSteps(), GetFlashCompensationStepsL(), GetManualFlashPowerLevelsL(), GetMinFocalLength(), GetOpticalZoomStepsL(), GetShutterSpeedsL(), GetSupportedContinuousAutoFocusTimeoutsL(), GetSupportedIsoRatesL(), GetSupportedSettingsL(), GetTimeLapse(), GetTimeLapsePeriodRange(), GetTimerIntervalsL(), GetWBRgbValue(), GetWBSupportedColorTemperaturesL(), IsCameraPresent(), IsCameraPresent(), IsExternalFlashPresent(), IsFlashReady(), IsoRate(), ManualFlashPowerLevel(), MeteringMode(), NewL(), OpticalZoom(), PictureOrientation(), PixelAspectRatio(), RedEyeReduceOn(), SetAperture(), SetApertureExposureLockOn(), SetAutoFocusArea(), SetAutoFocusLockOn(), SetAutoFocusType(), SetAutomaticSizeSelectionChangeOn(), SetBracketMerge(), SetBracketMode(), SetBracketParameter(), SetBracketStep(), SetBurstImages(), SetContinuousAutoFocusTimeout(), SetDigitalZoom(), SetDriveMode(), SetExposureCompensation(), SetExposureCompensationStep(), SetExposureLockOn(), SetExposureMode(), SetFlashCompensation(), SetFlashCompensationStep(), SetFlashMode(), SetFocusDistance(), SetFocusMode(), SetFocusRange(), SetIsoRate(), SetManualFlashPowerLevel(), SetMeteringMode(), SetOpticalZoom(), SetPictureOrientation(), SetPixelAspectRatio(), SetRedEyeReduceOn(), SetShootClickOn(), SetShutterSpeed(), SetStabilizationComplexity(), SetStabilizationEffect(), SetStabilizationMode(), SetTimeLapse(), SetTimerInterval(), SetWBColorTemperature(), SetWBRgbValue(), SetWhiteBalanceMode(), SetYuvRange(), ShootClickOn(), ShutterSpeed(), StabilizationComplexity(), StabilizationEffect(), StabilizationMode(), SupportedAutoFocusAreas(), SupportedAutoFocusTypes(), SupportedBracketModes(), SupportedBracketParameters(), SupportedBracketSteps(), SupportedDriveModes(), SupportedExposureModes(), SupportedFlashModes(), SupportedFocusModes(), SupportedFocusRanges(), SupportedMeteringModes(), SupportedPixelAspectRatios(), SupportedStabilizationComplexityValues(), SupportedStabilizationEffects(), SupportedStabilizationModes(), SupportedWBUnits(), SupportedWhiteBalanceModes(), SupportedYuvRanges(), TAutoFocusArea, TAutoFocusType, TBracketMode, TBracketParameter, TBracketStep, TCameraType, TDriveMode, TFocusMode, TFocusRange, TMeteringMode, TPictureOrientation, TPixelAspectRatio, TStabilizationAlgorithmComplexity, TStabilizationEffect, TStabilizationMode, TWBUnits, TYuvRange, TimerInterval(), WBColorTemperature(), WhiteBalanceMode(), YuvRange(), ~CCameraAdvancedSettings()

Inherited from CBase:
Delete(), Extension_(), operator new()

Construction and destruction


NewL()

static IMPORT_C CCameraAdvancedSettings *NewL(CCamera &aCamera);

Description

Factory function for creating the CCameraAdvancedSettings object.

Note: Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.

Parameters

CCamera &aCamera

a reference to a CCamera object providing the settings.

Return value

CCameraAdvancedSettings *

a pointer to a fully constructed CCameraAdvancedSettings object.

Leave codes

KErrNoMemory

Out of memory.


~CCameraAdvancedSettings()

IMPORT_C ~CCameraAdvancedSettings();

Description

Destructor

Member functions


CameraType()

IMPORT_C TCameraType CameraType() const;

Description

Gets the type of this camera.

Return value

TCameraType

the type of this camera

See also:


CameraType()

IMPORT_C TCameraType CameraType(TInt aCameraIndex);

Description

Get the type of a specific camera denoted by its index. A pluggable camera may not necessarily be physically present. The type denotes whether the slot allocated to that index is for pluggable or onboard camera.

Parameters

TInt aCameraIndex

An integer in the range of [0: CCamera::CamerasAvailable()-1].

Return value

TCameraType

the TCameraType value for the specific camera. If the index is out of range, the return value is ECameraUnknown.

See also:


IsCameraPresent()

IMPORT_C TBool IsCameraPresent() const;

Description

Checks whether the current camera is present.

Return value

TBool

Whether the camera is currently present. ETrue if camera is present, EFalse otherwise. For example ECameraOnBoard (built-in) cameras are always present.


IsCameraPresent()

IMPORT_C TBool IsCameraPresent(TInt aCameraIndex);

Description

Checks whether the camera, denoted by its index, is currently present. The index uniquely identifies the camera on the device.

Parameters

TInt aCameraIndex

An integer in the range of [0:CCamera::CamerasAvailable()-1] specifying the camera device to use

Return value

TBool

Whether the camera is currently present. ETrue if camera is present, EFalse otherwise. For example built-in (ECameraOnBoard) cameras are always present.


CameraIndex()

IMPORT_C TInt CameraIndex() const;

Description

Gets current camera index. The index uniquely identifies the camera on the device.

Return value

TInt

camera index in the inclusive range of [0:CCamera::CamerasAvailable() - 1].


SupportedStabilizationModes()

IMPORT_C TInt SupportedStabilizationModes() const;

Description

Gets all of the supported stabilization modes on the camera. The result is a bitfield of the valid TStabilizationMode flags.

Return value

TInt

a bitfield of all supported stabilization modes.

See also:


StabilizationMode()

IMPORT_C TStabilizationMode StabilizationMode() const;

Description

Gets current stabilization mode on the camera. The result is a valid TStabilizationMode value.

Return value

TStabilizationMode

current stabilization mode of type TStabilizationMode.


SetStabilizationMode()

IMPORT_C void SetStabilizationMode(TStabilizationMode aStabilizationMode);

Description

Sets a specific stabilization mode on the camera.

Stabilization mode change fires a KUidECamEventCameraSettingStabilizationMode event to all MCameraObserver2 clients of this specific camera.

Parameters

TStabilizationMode aStabilizationMode

new stabilization mode of TStabilizationMode type.


SupportedFocusModes()

IMPORT_C TInt SupportedFocusModes() const;

Description

Gets all of the supported focus modes on the camera. The result is a bitfield of the valid TFocusMode flags.

Return value

TInt

a bitfield of all supported focus modes.

See also:


FocusMode()

IMPORT_C TFocusMode FocusMode() const;

Description

Gets current focus mode on the camera. The result is a valid TFocusMode value.

Return value

TFocusMode

current focus mode.


SetFocusMode()

IMPORT_C void SetFocusMode(TFocusMode aFocusMode);

Description

Sets a specific focus mode on the camera. Focus mode change fires a KUidECamEventCameraSettingFocusMode event to all MCameraObserver2 clients of the camera.

Parameters

TFocusMode aFocusMode

new focus mode of TFocusMode type.


SupportedFocusRanges()

IMPORT_C TInt SupportedFocusRanges() const;

Description

Gets all supported focus ranges on the camera.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values. So, any extra enum value passed from the implementation will be filtered at this point. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values

Return value

TInt

an integer - a bitfield of all supported TFocusRange values.


FocusRange()

IMPORT_C TFocusRange FocusRange() const;

Description

Gets current focus range on the camera.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values. So, any extra enum value received from the implementation will be dropped and EFocusRangeAuto would be passed instead. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values

Return value

TFocusRange

the current TFocusRange value.


SetFocusRange()

IMPORT_C void SetFocusRange(TFocusRange aFocusRange);

Description

Sets a specific focus range on the camera. The focus range change fires both, KUidECamEventCameraSettingFocusRange and KUidECamEventCameraSettingFocusRange2 event to all MCameraObserver2 clients of the camera.

Parameters

TFocusRange aFocusRange

newly selected focus range.

See also:


SupportedAutoFocusTypes()

IMPORT_C TInt SupportedAutoFocusTypes() const;

Description

Gets all supported auto focus types on the camera.

Return value

TInt

an integer - a bitfield of all supported TAutoFocusType values.


AutoFocusType()

IMPORT_C TAutoFocusType AutoFocusType() const;

Description

Gets current auto focus type on the camera.

Return value

TAutoFocusType

a CCamera::TAutoFocusType value.

See also:


SetAutoFocusType()

IMPORT_C void SetAutoFocusType(TAutoFocusType aAutoFocusType);

Description

Sets a specific auto focus type on the camera. The focus type change fires both, KUidECamEventCameraSettingAutoFocusType and KUidECamEventCameraSettingAutoFocusType2 event to all MCameraObserver2 clients of the camera.

Parameters

TAutoFocusType aAutoFocusType

Autofocus selection.

See also:


SupportedAutoFocusAreas()

IMPORT_C TInt SupportedAutoFocusAreas() const;

Description

Gets all supported auto focus areas on the camera.

Return value

TInt

an integer - a bitfield of al supported TAutoFocusArea values.


AutoFocusArea()

IMPORT_C TAutoFocusArea AutoFocusArea() const;

Description

Gets current chosen auto focus area on the camera.

Return value

TAutoFocusArea

a CCamera::TAutoFocusArea value.


SetAutoFocusArea()

IMPORT_C void SetAutoFocusArea(TAutoFocusArea aAutoFocusArea);

Description

Sets a specific auto focus area on the camera. Focus area change fires a KUidECamEventCameraSettingAutoFocusArea event to all MCameraObserver2 clients of the camera.

Parameters

TAutoFocusArea aAutoFocusArea

Autofocus area selection.


FocusDistance()

IMPORT_C TInt FocusDistance() const;

Description

Get focus distance in millimetres.

Return value

TInt

the current focus distance in millimetres, directly from user setting of lenses.


SetFocusDistance()

IMPORT_C void SetFocusDistance(TInt aDistance);

Description

Set focus distance in millimetres. Focus distance change fires a KUidECamEventCameraSettingFocusDistance event to all MCameraObserver2 clients of the camera.

Parameters

TInt aDistance

the new distance value in millimetres.


GetMinFocalLength()

IMPORT_C TInt GetMinFocalLength() const;

Description

Get minimum focus distance in millimetres

Note: Current Focal length is calculated as focalLength = opticalZoom * minFocalLength;

Return value

TInt

the minimum (35 camera equivalent) focal length of a camera.


GetSupportedIsoRatesL()

IMPORT_C void GetSupportedIsoRatesL(RArray< TInt > &aSupportedIsoRates) const;

Description

Gets the set of camera supported ISO rates.

Note: When camera device is incapable of revealing the ISO rates supported, it has to be assumed that camera will work only on the permanently set value. If this value is not known, empty array may be returned; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aSupportedIsoRates

an array of integers which gets filled with the supported ISO rates.


IsoRate()

IMPORT_C TInt IsoRate() const;

Description

Gets current ISO rate.

Note: The returned value may be checked with the list of supported ISO rates. If value returned does not belong to this list, then it may be treated as an error case.

Return value

TInt

current ISO rate as a TInt value. Negative value returned means error case (system wide error code) and positive value means current ISO rate.


SetIsoRate()

IMPORT_C void SetIsoRate(TInt aRate);

Description

Set current ISO rate for the camera. Triggers KUidECamEventCameraSettingIsoRate to all MCameraObserver2 clients of the camera.

Parameters

TInt aRate

required new ISO rate.


GetAperturesL()

IMPORT_C void GetAperturesL(RArray< TInt > &aFStops, TValueInfo &aInfo) const;

Description

Gets the current discrete aperture steps (F-stops) supported by the camera.

Note: When camera device is incapable of revealing the aperture openings supported, it has to be assumed that camera will work only on the parmanently set value. If this value is not known, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aFStops

A reference to an empty array of TInt which would be populated by the implementation with the specific supported values. If the array is empty on return, the camera supports all integer values in the aperture range. Each value is multiplied by a factor of KECamFineResolutionFactor.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNoMemory

Out of memory.


Aperture()

IMPORT_C TInt Aperture() const;

Description

Get current aperture value.

Return value

TInt

Current aperture value as an integer, multiplied by KECamFineResolutionFactor. For example the function will return 280 for the actual aperture of F2.8. Negative value returned means error case (system wide error code) and positive value means current aperture.


SetAperture()

IMPORT_C void SetAperture(TInt aFStop);

Description

Set a new aperture value. All MCameraObserver2 clients of the camera receive a KUidECamEventCameraSettingAperture event notification when aperture value is changed.

Note: The aperture parameter value is an integer, multiplied by KECamFineResolutionFactor. For example to set an aperture of F2.8, call SetAperture(280).

Parameters

TInt aFStop

a new aperture value in the supported by the camera range.


GetShutterSpeedsL()

IMPORT_C void GetShutterSpeedsL(RArray< TInt > &aShutterSpeeds, TValueInfo &aInfo) const;

Description

Gets the set of supported shutter speeds.

Note: When camera device is incapable of revealing the shutter speeds supported, it has to be assumed that camera will work only on the parmanently set value. If this value is not known, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aShutterSpeeds

a reference to an RArray of TInt representing the discrete shutter speeds supported currently by the camera.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNoMemory

Out of memory.


ShutterSpeed()

IMPORT_C TInt ShutterSpeed() const;

Description

Gets the current shutter speed

Return value

TInt

the current shutter speed in microseconds. Negative value returned means error case (system wide error code) and positive value means current shutter speed.


SetShutterSpeed()

IMPORT_C void SetShutterSpeed(TInt aShutterSpeed);

Description

Sets the current shutter speed. When set, all MCameraObserver2 clients of the camera receive a KUidECamEventCameraSettingShutterSpeed event

Parameters

TInt aShutterSpeed

the required shutter speed in microseconds.


SupportedMeteringModes()

IMPORT_C TInt SupportedMeteringModes() const;

Description

Get all supported metering modes on this camera represented as bitfield of type TMeteringMode.

Return value

TInt

the set of supported metering modes.


MeteringMode()

IMPORT_C TMeteringMode MeteringMode() const;

Description

Get current metering mode.

Return value

TMeteringMode

a value of type TMeteringMode.


SetMeteringMode()

IMPORT_C void SetMeteringMode(TMeteringMode aMeteringMode);

Description

Set the current metering mode. When set, all MCameraObserver2 clients are notified with a KUidECamEventCameraSettingMeteringMode event.

Parameters

TMeteringMode aMeteringMode

new selection for metering mode of type TMeteringMode.


SupportedDriveModes()

IMPORT_C TInt SupportedDriveModes() const;

Description

Get all supported drive modes as bitfields of TDriveMode type.

Return value

TInt

the set of supported drive modes.


DriveMode()

IMPORT_C TDriveMode DriveMode() const;

Description

Gets currently active drive mode.

Return value

TDriveMode

current drive mode.


SetDriveMode()

IMPORT_C void SetDriveMode(TDriveMode aDriveMode);

Description

Set the current metering mode. When set all MCameraObserver2 clients are notified with KUidECamEventCameraSettingDriveMode.

Parameters

TDriveMode aDriveMode

new selection for drive mode value of type TDriveMode.


SupportedBracketModes()

IMPORT_C TInt SupportedBracketModes() const;

Description

Get all supported bracket modes as bitfields.

Return value

TInt

the set of all supported bracket modes as an integer.


BracketMode()

IMPORT_C TBracketMode BracketMode() const;

Description

Get current bracket mode.

Return value

TBracketMode

the current bracket mode TBracketMode.


SetBracketMode()

IMPORT_C void SetBracketMode(TBracketMode aBracketMode);

Description

Set new bracket mode. All MCameraObserver2 clients are notified with KUidECamEventCameraSettingBracketMode.

Parameters

TBracketMode aBracketMode

new selection for bracket mode of type TBracketMode.


SupportedBracketParameters()

IMPORT_C TInt SupportedBracketParameters() const;

Description

Get all supported bracket parameters as bitfields.

Return value

TInt

the set of all currently supported bracket modes.


BracketParameter()

IMPORT_C TBracketParameter BracketParameter() const;

Description

Get current bracket parameter.

Return value

TBracketParameter

the current bracket mode TBracketParameter.


SetBracketParameter()

IMPORT_C void SetBracketParameter(TBracketParameter aBracketParameter);

Description

Set new bracket parameter When set all clients are notified with KUidECamEventCameraSettingBracketParameter.

Parameters

TBracketParameter aBracketParameter

new selection for parameter type of type TBracketParameter.


SupportedBracketSteps()

IMPORT_C TInt SupportedBracketSteps() const;

Description

Get all supported bracket steps as bitfields.

Return value

TInt

the set of all supported bracket modes.


BracketStep()

IMPORT_C TBracketStep BracketStep() const;

Description

Get current bracket step.

Return value

TBracketStep

the current bracket mode TBracketStep.


SetBracketStep()

IMPORT_C void SetBracketStep(TBracketStep aBracketStep);

Description

Set new bracket step. All MCameraObserver2 clients are notified with KUidECamEventCameraSettingBracketStep.

Parameters

TBracketStep aBracketStep

new selection for step of type TBracketStep.


GetBracketMerge()

IMPORT_C void GetBracketMerge(TInt &aStartIndex, TInt &aFrames) const;

Description

Gets the settings for which frames to merge. Valid only in EDriveModeBracketMerge mode.

Note: there must be at least two images to merge. All are assumed to form a sequence and are identified using the first frame index and number of frames e.g. to merge two frames - one on and one +1, when in EBracketMode3Image, one sets the start index to 1 and frames to two.

Note: It is very much TBracketMode setting dependent operation.

Parameters

TInt &aStartIndex

the index of the start frame, starts from 0.

TInt &aFrames

the number of frames to be merged.


SetBracketMerge()

IMPORT_C void SetBracketMerge(TInt aStartIndex, TInt aFrames);

Description

Sets the settings for which frames to merge. Valid only in EDriveModeBracketMerge mode.

Note: there must be at least two images to merge. All are assumed to form a sequence and are identified using the first frame index and number of frames e.g. to merge two frames - one on and one +1, when in EBracketMode3Image, one sets the start index to 1 and frames to 2. MCameraObserver2 clients are notified with a KUidECamEventBracketMerge event.

Note: It is very TBracketMode setting dependent.

Parameters

TInt aStartIndex

the index of the start frame, starts from 0.

TInt aFrames

the number of frames to be merged.


SupportedFlashModes()

IMPORT_C TInt SupportedFlashModes() const;

Description

Get camera all supported flash modes CCamera::TFlash

Note: Some of the flash modes are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L()

Return value

TInt

the set of all supported flash modes as bitfields in an integer.

See also:


FlashMode()

IMPORT_C CCamera::TFlash FlashMode() const;

Description

Gets the currently set flash mode.

Note: Clients not using the CCamera::New2L() or CCamera::NewDuplicate2L() would be given CCamera::EFlashAuto if current flash mode exceeds CCamera::EFlashManual

Return value

CCamera::TFlash

The currently set flash mode.

See also:


SetFlashMode()

IMPORT_C void SetFlashMode(CCamera::TFlash aMode);

Description

Sets the flash mode.

Triggers a KUidECamEventCameraSettingFlashMode event to all camera MCameraObserver2 clients.

Parameters

CCamera::TFlash aMode

The required flash mode.


RedEyeReduceOn()

IMPORT_C TBool RedEyeReduceOn() const;

Description

Gets whether the flash red eye reduction is switched on.

Return value

TBool

The present state - ETrue for switched on and EFalse for switched off.


SetRedEyeReduceOn()

IMPORT_C void SetRedEyeReduceOn(TBool aState);

Description

Sets the flash red eye reduction on or off.

Triggers a KUidECamEventCameraSettingFlashRedEyeReduceOn event to all camera MCameraObserver2 clients.

Parameters

TBool aState

The required state ETrue for switching it on and EFalse for switching it off.


GetFlashCompensationStepsL()

IMPORT_C void GetFlashCompensationStepsL(RArray< TInt > &aFlashCompensationSteps, TValueInfo &aInfo) const;

Description

Get flash compensation steps as integers multiplied by KECamFineResolutionFactor. For example 0.5 EV is 50.

Note: When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Note: When camera device is incapable of revealing the flash compensation steps supported, it has to be assumed that camera will work only on the parmanently set value. If this value is not known, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aFlashCompensationSteps

an RArray of integers which is populated on return to reflect the supported flash compensation steps,

TValueInfo &aInfo

an TValueInfo reference, which establishes the organization of the returned data.

Leave codes

KErrNoMemory

Out of memory.

See also:


FlashCompensationStep()

IMPORT_C TInt FlashCompensationStep() const;

Description

Get current flash power compensation step.

Return value

TInt

current flash compensation step.


SetFlashCompensationStep()

IMPORT_C void SetFlashCompensationStep(TInt aFlashCompensationStep);

Description

Set current flash compensation step as an integer multiplied by KECamFineResolutionFactor. For example to set a compensation of -0.3 EV, one should use a parameter with value -30. All clients receive a KUidECamEventCameraSettingFlashCompensationStep event, when the value has changed.

Parameters

TInt aFlashCompensationStep

a new value for the flash compensation step.


GetFlashCompensationRangeInSteps()

IMPORT_C void GetFlashCompensationRangeInSteps(TInt &aNegativeCompensation, TInt &aPositiveCompensation) const;

Description

Get current flash power compensation range measured in a already selected compensation step magnitude.

Note: This range may change if a different compensation step is selected. For example if flash compensation range is in the range -1EV 1.5EV and the selected flash compensation step is selected to be 0.3 EV, the result of this call will be aNegativeCompensation = -3 and aPositiveCompensation = 5. as there can be only three full steps for negative compensation (1/0.3) and five for flash power boost (1.5/0.3). In this way developers, having pre-selected a step value from the supported set, would need to provide just the multiplier (in steps) and the direction (the sign). Steps are always assumed integers.

Parameters

TInt &aNegativeCompensation

a reference to an integer returning the maximum number of steps available for negative compensation.

TInt &aPositiveCompensation

a reference to an integer returning the maximum number of steps available for positive compensation.


FlashCompensation()

IMPORT_C TInt FlashCompensation() const;

Description

Get the current flash compensation value as integer steps. Positive values boost flash power, negative reduce flash power. The change is not cumulative i.e. the change is stateless. Each call assumes no previous compensation has been performed i.e. that there is a zero compensation.

Note: if returned value is 2 (compensation steps) and the current flash compensation step is 0.3 EV, then the actual compensation effect will be 0.6 EV.

Return value

TInt

the current number of compensation steps as an integer.


SetFlashCompensation()

IMPORT_C void SetFlashCompensation(TInt aFlashCompensationInSteps);

Description

Set the current flash compensation value as integer steps. Positive values increase power, negative reduce power. The change is not acumulative e.g. the change is stateless. Each call assumes no previous compensation has been performed i.e. that there is a zero compensation. Triggers a KUidECamEventCameraSettingFlashCompensation event.

Parameters

TInt aFlashCompensationInSteps

a required compensation steps - negative value reduce the flash power positive boosts up the flash power.


IsExternalFlashPresent()

IMPORT_C TBool IsExternalFlashPresent() const;

Description

Check whether there is an external flash source.

Return value

TBool

ETrue if an external flash source is present, EFalse otherwise


GetManualFlashPowerLevelsL()

IMPORT_C void GetManualFlashPowerLevelsL(RArray< TInt > &aManualFlashPowerLevels, TValueInfo &aInfo) const;

Description

Gets the current discrete manual flash power levels supported by the camera in range 0-100 as a percentage of maximum power level.

Note: When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. When camera device is incapable of revealing the manual flash power levels supported, it has to be assumed that camera will work only on the permanently set value. If this value is not known, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aManualFlashPowerLevels

An empty array of TInt which would be populated by the implementation with the specific supported values. If the array is empty on return, the camera does not support this functionality.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNoMemory

Out of memory.


ManualFlashPowerLevel()

IMPORT_C TInt ManualFlashPowerLevel() const;

Description

Gets the current manual flash power level on the camera.

Return value

TInt

the current manual flash power level as a value in the range [0:100]. Negative value returned means error case (system wide error code) and positive value means current manual flash power level.


SetManualFlashPowerLevel()

IMPORT_C void SetManualFlashPowerLevel(TInt aManualFlashPowerLevel);

Description

Sets the current manual flash power level on the camera. Triggers a KUidECamEventCameraSettingManualFlashPower event to all MCameraObserver2 clients.

Parameters

TInt aManualFlashPowerLevel

one of the values returned in GetManualFlashPowerLevelsL().


SupportedExposureModes()

IMPORT_C TInt SupportedExposureModes() const;

Description

Get Supported exposure modes - bitfields of CCamera::TExposure

Return value

TInt

the set of supported exposure modes.


ExposureMode()

IMPORT_C CCamera::TExposure ExposureMode() const;

Description

Gets the currently set exposure setting value.

Return value

CCamera::TExposure

The currently set exposure setting value.


SetExposureMode()

IMPORT_C void SetExposureMode(CCamera::TExposure aExposureMode);

Description

Sets the exposure mode of the camera. Triggers a KUidECamEventCameraSettingExposure event to all MCameraObserver2 clients.

Parameters

CCamera::TExposure aExposureMode

The required exposure adjustment.


GetExposureCompensationStepsL()

IMPORT_C void GetExposureCompensationStepsL(RArray< TInt > &aExposureCompensationSteps, TValueInfo &aInfo) const;

Description

Get exposure compensation steps as integers multiplied by KECamFineResolutionFactor. For example 0.3 EV is 30.

Note: When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case. When camera device is incapable of revealing the exposure compensation steps supported, it has to be assumed that camera will work only on the permanently set value. If this value is not known, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aExposureCompensationSteps

an RArray of integers which is populated to reflect the supported exposure compensation steps, all values have been multiplied by KECamFineResolutionFactor before truncated to integers.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNoMemory

Out of memory.


ExposureCompensationStep()

IMPORT_C TInt ExposureCompensationStep() const;

Description

Get current exposure compensation step.

Return value

TInt

the current exposure compensation step.


SetExposureCompensationStep()

IMPORT_C void SetExposureCompensationStep(TInt aExposureCompensationStep);

Description

Set current exposure compensation step as an integer multiplied by KECamFineResolutionFactor. All MCameraObserver2 clients receive a KUidECamEventCameraSettingExposureCompensationStep event, when the value has changed.

Parameters

TInt aExposureCompensationStep

a new value for the exposure compensation step.


GetExposureCompensationRangeInSteps()

IMPORT_C void GetExposureCompensationRangeInSteps(TInt &aNegativeCompensation, TInt &aPositiveCompensation) const;

Description

Get current exposure compensation range in steps. It depends on the previously selected exposure compensation step.

Parameters

TInt &aNegativeCompensation

reference to an integer returning the maximum number of steps available for negative compensation,

TInt &aPositiveCompensation

reference to an integer returning the maximum number of steps available for positive compensation,

See also:


ExposureCompensation()

IMPORT_C TInt ExposureCompensation() const;

Description

Get the current exposure compensation steps. Positive values increase exposure times, negative reduce exposure times. The change is not cumulative i.e. the change is stateless. Each call assumes no previous compensation has been performed i.e. that there is a zero compensation.

Note: if returned value is 2 (compensation steps) and the current exposure compensation step is 0.3 EV, then the actual compensation effect will be 0.6 EV.

Return value

TInt

current number of compensation steps as an integer.


SetExposureCompensation()

IMPORT_C void SetExposureCompensation(TInt aExposureCompensationInSteps);

Description

Set the current exposure compensation value as integer steps. Triggers a KUidECamEventCameraSettingExposureCompensation event to all MCameraObserver2 clients.

Parameters

TInt aExposureCompensationInSteps

a required number of compensation steps - negative value reduce the exposure time positive increases the exposure time.


SupportedWhiteBalanceModes()

IMPORT_C TInt SupportedWhiteBalanceModes() const;

Description

Gets camera supported set of white balance adjustments.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) passed from the implementation will be filtered at this point. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values

Return value

TInt

bitfield of all supported CCamera::TWhiteBalance values.


WhiteBalanceMode()

IMPORT_C CCamera::TWhiteBalance WhiteBalanceMode() const;

Description

Gets the current white balance value.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values. So, any extra enum value(unrecognised) received from the implementation will be dropped and EWBAuto would be passed instead. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values

Return value

CCamera::TWhiteBalance

The current white balance value.


SetWhiteBalanceMode()

IMPORT_C void SetWhiteBalanceMode(CCamera::TWhiteBalance aWhiteBalanceMode);

Description

Sets the white balance adjustment of the camera.

No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported. Triggers KUidECamEventCameraSettingWhiteBalance event to all MCameraObserver2 clients.

Parameters

CCamera::TWhiteBalance aWhiteBalanceMode

The required white balance mode.


ApertureExposureLockOn()

IMPORT_C TBool ApertureExposureLockOn() const;

Description

Gets the current state for aperture and exposure lock.

Return value

TBool

ETrue if aperture and exposure values are locked together, EFalse if these are not locked.


SetApertureExposureLockOn()

IMPORT_C void SetApertureExposureLockOn(TBool aAELock);

Description

Sets the current state for aperture and exposure lock. Triggers a KUidECamEventAELock event to all MCameraObserver2 clients.

Parameters

TBool aAELock

a value whether to lock exposure and aperture together.


ShootClickOn()

IMPORT_C TBool ShootClickOn() const;

Description

Gets the current state for button clicking sound effect.

Return value

TBool

ETrue to switch clicking sound on, EFalse sound off


SetShootClickOn()

IMPORT_C void SetShootClickOn(TBool aShootClickOn);

Description

Sets the button clicking sound on /off. Triggers a KUidECamEventSoundClick event to all MCameraObserver2 clients.

Parameters

TBool aShootClickOn

ETrue to switch clicking sound on, EFalse sound is switched off.


GetTimerIntervalsL()

IMPORT_C void GetTimerIntervalsL(RArray< TInt > &aTimerIntervals, TValueInfo &aInfo) const;

Description

Get camera supported timer values. Active only when drive mode EDriveModeTimed. Time is in microseconds. As time interval is expected to be relatively short, integer value is considered sufficient.

Note: When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aTimerIntervals

an RArray of integers which is populated to reflect the supported timer interval steps.

TValueInfo &aInfo

an TValueInfo reference, which establishes the organization of the returned data.

See also:


TimerInterval()

IMPORT_C TInt TimerInterval() const;

Description

Get current timer value. Active only when drive mode is EDriveModeTimed. Timer resolution is in microseconds.

Return value

TInt

current time interval value. Negative value returned means error case (system wide error code) and positive value means current timer interval.


SetTimerInterval()

IMPORT_C void SetTimerInterval(TInt aTimerInterval);

Description

Set current timer value. Active only when drive mode EDriveModeTimed. This is the time interval (delay) in microseconds between user pressing the button and image is taken. The setting of the value triggers a KUidECamEventCameraSettingTimerInterval event to all MCameraObserver2 clients.

Parameters

TInt aTimerInterval

The selected timer interval in microseconds.


GetTimeLapsePeriodRange()

IMPORT_C void GetTimeLapsePeriodRange(TTime &aTimeLapseMin, TTime &aTimeLapseMax) const;

Description

Get camera supported time lapse period range. Active only when drive mode EDriveModeTimeLapse. The time lapse is denoted as the uniform time period between consecutive frames.

Parameters

TTime &aTimeLapseMin

The minimum time value.

TTime &aTimeLapseMax

The maximum time value.


GetTimeLapse()

IMPORT_C void GetTimeLapse(TTime &aStart, TTime &aEnd, TTime &aInterval) const;

Description

Get current time lapse value. Active only when drive mode EDriveModeTimeLapse. The time lapse is denoted as the uniform time period between consecutive frames and operation is configurable by its start, end and a fixed interval.

Parameters

TTime &aStart

the start of the timelapse period.

TTime &aEnd

the end of the timelapse period; start < end.

TTime &aInterval

the set parameter between two successive snapshots.


SetTimeLapse()

IMPORT_C void SetTimeLapse(const TTime &aStart, const TTime &aEnd, const TTime &aInterval);

Description

Set current time lapse value. Active only when drive mode EDriveModeTimeLapse. The time lapse is denoted as the uniform time period between consecutive frames. Setting triggers a KUidECamEventCameraSettingTimeLapse event to all MCameraObserver2 camera clients.

Parameters

const TTime &aStart

the start of the timelapse period.

const TTime &aEnd

the end of the timelapse period; start < end.

const TTime &aInterval

the set parameter between two successive snapshots.


PictureOrientation()

IMPORT_C TPictureOrientation PictureOrientation() const;

Description

Get current picture orientation

Return value

TPictureOrientation

a TPictureOrientation value.


SetPictureOrientation()

IMPORT_C void SetPictureOrientation(TPictureOrientation aOrientation);

Description

Set a new picture orientation This triggers a KUidECamEventPictureOrientation event to all MCameraObserver2 clients.

Parameters

TPictureOrientation aOrientation

a value of TPictureOrientation denoting the new orientation.


SupportedPixelAspectRatios()

IMPORT_C TInt SupportedPixelAspectRatios() const;

Description

Get supported pixel aspect ratio.

Note: Some of the pixel aspect ratios are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L()

Mask out new features for old clients

Return value

TInt

a bitfield of all supported TPixelAspectRatio values.


PixelAspectRatio()

IMPORT_C TPixelAspectRatio PixelAspectRatio() const;

Description

Get current pixel aspect ratio.

Note: Some of the pixel aspect ratios are available only for clients using either CCamera::New2L() or CCamera::NewDuplicate2L()

Mask out new features for old clients

Return value

TPixelAspectRatio

a TPixelAspectRatio value.


SetPixelAspectRatio()

IMPORT_C void SetPixelAspectRatio(TPixelAspectRatio aPixelAspectRatio);

Description

Set a new pixel aspect ratio. This triggers a KUidECamEventPixelAspectRatio event to all MCameraObserver2 clients.

Parameters

TPixelAspectRatio aPixelAspectRatio

a value of TPixelAspectRatio denoting the new pixel aspect ratio.


SupportedYuvRanges()

IMPORT_C TInt SupportedYuvRanges() const;

Description

Get supported YUV ranges.

Return value

TInt

a bitfileld of all supported TYuvRange values.


YuvRange()

IMPORT_C TYuvRange YuvRange() const;

Description

Get current YUV range.

Return value

TYuvRange

a TYuvRange value.


SetYuvRange()

IMPORT_C void SetYuvRange(TYuvRange aYuvRange);

Description

Set a new YUV range. This triggers a KUidECamEventYuvRange event to all MCameraObserver2 clients.

Parameters

TYuvRange aYuvRange

a value of TYuvRange denoting the new YUV range.


BurstImages()

IMPORT_C TInt BurstImages() const;

Description

Get the number of images captured normally under EDriveModeBurst condition.

Note: : due to memory or image size limitations the actual number may be less.

Return value

TInt

the number of images set to capture in burst mode.


SetBurstImages()

IMPORT_C void SetBurstImages(TInt aImages);

Description

Set the number of images captured normally under EDriveModeBurst condition. Triggers a KUidECamEventBurstImages event to all MCameraObserver2 clients.

Note: : due to memory or image size limitations the actual number may be less.

Parameters

TInt aImages

the number of images set to capture in burst mode


GetOpticalZoomStepsL()

IMPORT_C void GetOpticalZoomStepsL(RArray< TInt > &aOpticalZoomSteps, TValueInfo &aInfo) const;

Description

Gets the optical zoom levels.

Note: Such approach allows for support for both linear and non-linear zoom steps. When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aOpticalZoomSteps

Array to hold optical zoom values multiplied by KECamFineResolutionFactor to retain precision. So that if zoom is not supported the array will return a single element of value KECamFineResolutionFactor.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNoMemory

Out of memory.


OpticalZoom()

IMPORT_C TInt OpticalZoom() const;

Description

Gets the currently set zoom value.

Return value

TInt

The currently set optical zoom value. The value is multiplied by KECamFineResolutionFactor to retain precision. Negative value returned means error case (system wide error code) and positive value means current optical zoom.


SetOpticalZoom()

IMPORT_C void SetOpticalZoom(TInt aOpticalZoom);

Description

Sets the zoom using a specific value. Triggers a KUidECamEventCameraSettingOpticalZoom event to all MCameraObserver2 clients.

Parameters

TInt aOpticalZoom

Required zoom value.


GetDigitalZoomStepsL()

IMPORT_C void GetDigitalZoomStepsL(RArray< TInt > &aDigitalZoomSteps, TValueInfo &aInfo) const;

Description

Gets the digital zoom levels.

Note: Such approach allows for support for both linear and non-linear zoom steps. When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aDigitalZoomSteps

Array to hold digital zoom values multiplied by KECamFineResolutionFactor to retain precision. So that if zoom is not supported the array will return a single element of value KECamFineResolutionFactor.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNoMemory

Out of memory.


DigitalZoom()

IMPORT_C TInt DigitalZoom() const;

Description

Gets the currently set digital zoom value.

Return value

TInt

The currently set digital zoom value. The value is multiplied by KECamFineResolutionFactor to retain precision. Negative value returned means error case (system wide error code) and positive value means current digital zoom.


SetDigitalZoom()

IMPORT_C void SetDigitalZoom(TInt aDigitalZoom);

Description

Sets the digital zoom value. Triggers a KUidECamEventCameraSettingDigitalZoom event to all MCameraObserver2 clients.

Parameters

TInt aDigitalZoom

Required zoom value.


ExposureLockOn()

IMPORT_C TBool ExposureLockOn() const;

Description

Checks whether exposure value is locked or not.

Return value

TBool

whether exposure value is locked or not. ETrue if locked, EFalse otherwise.


SetExposureLockOn()

IMPORT_C void SetExposureLockOn(TBool aState);

Description

Sets exposure lock state. Triggers a KUidECamEventCameraSettingExposureLock event to all MCameraObserver2 clients.

Parameters

TBool aState

Required new state.


AutoFocusLockOn()

IMPORT_C TBool AutoFocusLockOn() const;

Description

Checks whether AutoFocus value is locked or not.

Return value

TBool

whether AutoFocus value is locked or not. ETrue if locked, EFalse otherwise.


SetAutoFocusLockOn()

IMPORT_C void SetAutoFocusLockOn(TBool aState);

Description

Sets autofocus lock state. Triggers a KUidECamEventCameraSettingAutoFocusLock event to all MCameraObserver2 clients.

Parameters

TBool aState

Required new state.


GetSupportedSettingsL()

IMPORT_C void GetSupportedSettingsL(RArray< TUid > &aSettings) const;

Description

Gets an array of all the advanced settings parameters supported by the camera. These are identified by UIDs and relate to the set or subset of it of all defined settings UIDs.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has been added in later versions

Parameters

RArray< TUid > &aSettings

An empty array of TUids which would be populated by the implementation with the UIDs of the supported parameters. If the array is empty on return, the camera does not support any settings.

Leave codes

KErrNoMemory

Out of memory.


GetActiveSettingsL()

IMPORT_C void GetActiveSettingsL(RArray< TUid > &aActiveSettings) const;

Description

Gets an array of all the advanced settings parameters currently active on the camera. These are identified by UIDs and relate to the set or subset of it of all supported settings UIDs.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has been added in later versions

Parameters

RArray< TUid > &aActiveSettings

An empty array of TUids which would be populated by the implementation with the active setting UIDs. If the array is empty on return, the camera does not support any settings.

Leave codes

KErrNoMemory

Out of memory.


GetDisabledSettingsL()

IMPORT_C void GetDisabledSettingsL(RArray< TUid > &aDisabledSettings) const;

Description

Gets an array of all the advanced settings parameters currently disabled on the camera. These are identified by UIDs and relate to the set or subset of it of all supported settings UIDs.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

KUidECamEventCameraSettingAutoFocusType2UidValue is the baseline. Any settings with greater uid value means that it has been added in later versions

Parameters

RArray< TUid > &aDisabledSettings

An empty array of TUids which would be populated by the implementation with the disabled setting UIDs. If the array is empty on return, the camera does not support any settings.

Leave codes

KErrNoMemory

Out of memory.


AutomaticSizeSelectionChangeOn()

IMPORT_C TBool AutomaticSizeSelectionChangeOn() const;

Description

Retrieves the state for automatic size selection option. Default value is EFalse.

Return value

TBool

ETrue if the automatic selection is switched on. Default value is EFalse.


SetAutomaticSizeSelectionChangeOn()

IMPORT_C void SetAutomaticSizeSelectionChangeOn(TBool aSetOn);

Description

Allow camera to proactively change image size due external factors. Default value is EFalse. Triggers a KUidECamEventCameraSettingAutomaticSizeSelection event notification.

Parameters

TBool aSetOn

whether the option should be switched on


GetSupportedContinuousAutoFocusTimeoutsL()

IMPORT_C void GetSupportedContinuousAutoFocusTimeoutsL(RArray< TInt > &aTimeouts, TValueInfo &aInfo) const;

Description

Retrieves the timeout values camera supported by the camera when in continuous auto focus mode. Timeouts are in microseconds.

Note: When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aTimeouts

An empty array to hold timeout values.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNoMemory

Out of memory.


ContinuousAutoFocusTimeout()

IMPORT_C TInt ContinuousAutoFocusTimeout() const;

Description

Gets the current value for continuous autofocus timeout. Timeouts are in microseconds.

Return value

TInt

the timeout value in microseconds. Negative value returned means error case (system wide error code) and positive value means current value for continuous autofocus timeout.


SetContinuousAutoFocusTimeout()

IMPORT_C void SetContinuousAutoFocusTimeout(TInt aTimeout);

Description

Sets the current value for continuous autofocus timeout. Timeouts are in microseconds. All MCameraObserver2 clients of the camera receive a KUidECamEventCameraSettingsContinuousAutoFocusTimeout event notification when timeout value is changed.

Parameters

TInt aTimeout

the timeout value in microseconds.


SupportedStabilizationEffects()

IMPORT_C TInt SupportedStabilizationEffects() const;

Description

Gets the current stabilization effect on the camera.

Return value

TInt

a TStabilizationEffect value.


StabilizationEffect()

IMPORT_C TStabilizationEffect StabilizationEffect() const;

Description

Gets all supported stabilization effects on the camera.

Return value

TStabilizationEffect

an integer - a bitfield of all supported TStabilizationEffect values.


SetStabilizationEffect()

IMPORT_C void SetStabilizationEffect(TStabilizationEffect aEffect);

Description

Sets a specific stabilization effect on the camera. When a value is set, MCameraObserver2 clients for that camera will receive a KUidECamEventCameraSettingsStabilizationEffect event notification.

Parameters

TStabilizationEffect aEffect

stabilization effect selection of type TStabilizationEffect.


SupportedStabilizationComplexityValues()

IMPORT_C TInt SupportedStabilizationComplexityValues() const;

Description

Gets all supported stabilization algorithm values on the camera.

Return value

TInt

an integer - a bitfield of all supported TStabilizationAlgorithmComplexity values.


StabilizationComplexity()

IMPORT_C TStabilizationAlgorithmComplexity StabilizationComplexity() const;

Description

Gets current active stabilization algorithm selection on the camera.

Return value

TStabilizationAlgorithmComplexity

a TStabilizationAlgorithmComplexity value.


SetStabilizationComplexity()

IMPORT_C void SetStabilizationComplexity(TStabilizationAlgorithmComplexity aComplexity);

Description

Sets a specific stabilization algorithm on the camera. When a value is set, MCameraObserver2 clients for that camera will receive a KUidECamEventSettingsStabilizationAlgorithmComplexity event notification.

Parameters

TStabilizationAlgorithmComplexity aComplexity

stabilization effect selection of type TStabilizationAlgorithmComplexity.


SupportedWBUnits()

IMPORT_C TWBUnits SupportedWBUnits() const;

Description

Gets the units in which the white balance is measured on the camera.

Note: The methods used to get or set these differ depending on the supported unit type. It is expected that a camera will support only a single type or none.

Return value

TWBUnits

a value of TWBUnits type.


GetWBRgbValue()

IMPORT_C void GetWBRgbValue(TRgb &aValue) const;

Description

Get white balance value represented as a RGB triplet.

Parameters

TRgb &aValue

a reference to TRgb object which will contain the current white balance.

See also:


SetWBRgbValue()

IMPORT_C void SetWBRgbValue(const TRgb &aValue);

Description

Set white balance value using a RGB triplet. Change in value causes an event notification KUidECamEventCameraSettingsWBValue to be sent to all MCameraObserver2 clients of this camera.

Parameters

const TRgb &aValue

a const reference to TRgb object, which contains the new white balance.

See also:


GetWBSupportedColorTemperaturesL()

IMPORT_C void GetWBSupportedColorTemperaturesL(RArray< TInt > &aWBColorTemperatures, TValueInfo &aInfo) const;

Description

Get the white balance values, as temperature measured in Kelvin, supported on the camera.

Note: When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aWBColorTemperatures

A reference to an empty array of TInt which would be populated by the implementation with the specific supported values.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.


WBColorTemperature()

IMPORT_C TInt WBColorTemperature() const;

Description

Get the white balance as a temperature in Kelvin

Return value

TInt

current white balance value as a temperature in Kelvins. Negative value returned means error case (system wide error code) and positive value means current value for white balance as a temperature in Kelvin.


SetWBColorTemperature()

IMPORT_C void SetWBColorTemperature(TInt aWBColorTemperature);

Description

Set the white balance as a temperature in Kelvin

Parameters

TInt aWBColorTemperature

white balance value as a temperature in Kelvins.


IsFlashReady()

IMPORT_C TInt IsFlashReady(TBool &aReady) const;

Description

Checks whether the flash is ready.

Parameters

TBool &aReady

A reference to a boolean set by the implementation to ETrue if the flash is ready, EFalse otherwise.

Return value

TInt

KErrNotSupported if the implementation of this method is not supported.


GetCurrentFocusModeStepsL()

IMPORT_C void GetCurrentFocusModeStepsL(RArray< TInt > &aFocusModeSteps, TValueInfo &aInfo) const;

Description

Get the number of focus steps for current focus mode.

Note: When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Parameters

RArray< TInt > &aFocusModeSteps

A reference to an empty array of TInt which would be populated by the implementation with the specific supported values.

TValueInfo &aInfo

a reference to TValueInfo, which establishes the type of the returned data.

Leave codes

KErrNotSupported

if the implementation of this method is not supported. May also leave as a result of other system errors.

Member enumerations


Enum TCameraType

TCameraType

Description

Specifies camera type.

ECameraUnknown

Unable to identify.

ECameraOnBoard

Camera is non-detachable from device. Camera is always present.

ECameraPluggable

Camera is detachable from device. Camera is not always present.


Enum TStabilizationMode

TStabilizationMode

Description

Specifies stabilization mode of the camera.

EStabilizationModeOff

Not present or switched off, default

EStabilizationModeHorizontal

Stabilization only in horizontal direction.

EStabilizationModeVertical

Stabilization only in vertical direction.

EStabilizationModeRotation

Rotational stabilization.

EStabilizationModeAuto

Automatic stabilization.

EStabilizationModeManual

Manual stabilization.


Enum TStabilizationEffect

TStabilizationEffect

Description

Supported magnitudes of stabilization effect when in manual mode.

EStabilizationOff

Stabilization effect is off.

EStabilizationAuto

Stabilization effect is automatic, default.

EStabilizationFine

Stabilization effect is very small in magnitude.

EStabilizationMedium

Stabilization effect is average in magnitude.

EStabilizationStrong

Stabilization effect is large in magnitude.


Enum TStabilizationAlgorithmComplexity

TStabilizationAlgorithmComplexity

Description

Supported stabilization algorithms, graded on complexity.

EStabilizationComplexityAuto

Stabilization algorithm selection is automatic, default.

EStabilizationComplexityLow

Stabilization algorithm is simple - less precise but fast.

EStabilizationComplexityMedium

Stabilization algorithm is of medium complexity.

EStabilizationComplexityHigh

Stabilization algorithm is of high complexity.


Enum TFocusMode

TFocusMode

Description

Supported focus modes.

EFocusModeUnknown

Focus mode is unknown.

EFocusModeAuto

Focus is automatic, default.

EFocusModeFixed

Focus is fixed.

EFocusModeManual

Focus is manually set.


Enum TFocusRange

TFocusRange

Description

Supported focus ranges.

EFocusRangeAuto

Auto. Default

EFocusRangeMacro

Focus operates in close range (macro).

EFocusRangeNormal

Normal operation.

EFocusRangeTele

Extended (tele) operation.

EFocusRangePortrait

Focus at larger areas at short to medium distance.

EFocusRangeSuperMacro

Optimised macro operation, where depth of field is very shallow and observation area changes quickly.


Enum TAutoFocusType

TAutoFocusType

Description

Specifies the supported autofocus types.

EAutoFocusTypeOff

Autofocus is switched off.

EAutoFocusTypeSingle

Operates on a single shot, consumes less power.

EAutoFocusTypeContinuous

Continious autofocus, more precise but consumes more power. also known as AF Servo.


Enum TAutoFocusArea

TAutoFocusArea

Description

Specifies the autofocus area.

EAutoFocusTypeAuto

Automatic. Default value

EAutoFocusTypeSingleArea

Single area, suitable for relatively flat surfaces and portrait.

EAutoFocusTypeMultiAreaCentered

Multiple points of an object, more weighting for centre points.


Enum TMeteringMode

TMeteringMode

Description

Specifies the Metering mode for the camera. EMeteringModeAuto is the default value.

EMeteringModeAuto

Automatic mode, default.

EMeteringModeCenterWeighted

Metering in which the center is given a weighted priority.

EMeteringModeSpot

Metering of a central area/spot only, also known as partial.

EMeteringModeEvaluative

Metering is evaluated over a matrix(several spots) and calculated as a function of that. Usually best but with increased power consumption. Alternative name multi-metering mode.


Enum TDriveMode

TDriveMode

Description

Specifies the drive mode for the camera. This determines how and in what sucession are images shot. EDriveModeSingleShot is the default.

EDriveModeAuto

Automatic. Default

EDriveModeSingleShot

Camera takes a single image/shot.

EDriveModeContinuous

Camera continuously captures images (as fast as it can) until stopped or out of storage medium.

EDriveModeBracket

Camera is in bracketing mode, producing individual frames.

EDriveModeBracketMerge

Camera is in bracketing mode, but producing a single image.

EDriveModeTimed

camera captures a single shot after specified time period.

EDriveModeTimeLapse

Camera captures a set of images with an uniform interval between them.

EDriveModeBurst

Camera captures a set of images as fast as it can, but in batches(bursts).


Enum TBracketMode

TBracketMode

Description

Specifies Bracket mode.

EBracketModeOff

Bracket mode is switched off. Default value.

EBracketMode3Image

Bracket mode on. Three consecutive pictures are taken in order under (-1), on (0), over (+1), where correction magnitude is defined by bracket step size and by TBracketParameter

EBracketMode5Image

Bracket mode on. Five consecutive pictures are taken in order under (-2),under (-1), on (0), over (+1), over (+2), where correction magnitude is defined by bracket step size and by TBracketParameter


Enum TBracketParameter

TBracketParameter

Description

Supported parameters used for bracketing.

Note: Bracket mode parameter value changes by a selected uniform step between successive image shots.

See also:

EBracketParameterNone

None.

EBracketParameterExposure

Exposure settings change.

EBracketParameterFlashPower

Flash power change.

EBracketParameterColourBalance

Colour balance settings change.

BracketParameterAperture

Aperture settings change.

BracketParameterAutoFocus

Autofocus settings change.


Enum TBracketStep

TBracketStep

Description

Specifies the magnitude of bracketing step. The actual value and availability is parameter dependent.

See also:

EBracketStepNonConfig

Not supported.

EBracketStepSmall

Small value.

EBracketStepMedium

Medium value.

EBracketStepLarge

Large value.


Enum TPictureOrientation

TPictureOrientation

Description

Specifies the orientation of the picture.

EPictureOrientationUnknown

No information about picture orientation.

EPictureOrientationPortrait

Portrait - height larger than width.

EPictureOrientationLandscape

Landscape width larger than height.

EPictureOrientationSquare

Square width equals the height.


Enum TPixelAspectRatio

TPixelAspectRatio

Description

Specifies the pixel aspect ratio

Note: It is specified as a fraction of (x) horizontal pixel size divided by vertical (y) pixel size. The pixel aspect ratio for square pixels is 1/1.

EPixelAspectUnknown

Pixel ratio undetermined

EPixelAspect1To1

Pixel Ratio 1:1.

EPixelAspect12To11

Pixel Ratio 12:11

EEPixelAspect11To10

Pixel Ratio 11:10.

EEPixelAspect59To54

Pixel Ratio 59:54.

EEPixelAspect16To11

Pixel Ratio 16:11.

Note: This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L()

EEPixelAspect10To11

Pixel Ratio 10:11.

Note: This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L()

EEPixelAspect40To33

Pixel Ratio 40:33.

Note: This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L()


Enum TYuvRange

TYuvRange

Description

Specifies YUV colour space dynamic range.

Note: video compressors often use narrower than the default range. The nominal Y range is [16:235] and the U and V ranges [16:240].

EYuvRangeUnknown

Yuv range undetermined

EYuvRangeFull

Yuv Full Range. The nominal Y,U and V colours range is [0:255].

EYuvRangeVideoCropped

Yuv Cropped Range. The nominal Y range is [16:235] and the U and V ranges [16:240].


Enum TWBUnits

TWBUnits

Description

Specifies the units supported by the camera for manual white balance setting.

EWBUnknown

The units type is undetermined or not supported.

EWBColorTemperature

The white balance is represented as temperature degrees in Kelvin.

EWBRgb

The white balance is represented as RGB triples.


Class CCameraPresets

class CCameraPresets : public CBase;

Description

This API is used to simplify user - camera interaction by allowing simultaneous setting of various advanced camera hardware settings using a single parameter.

Preset is identified by a single UID and relates to a known predefined outcome. For example the 'Night' Preset will be used to set the camera into a night mode so that the user can take night photos.

The particular set of settings associated with the specific preset and their specific values and ranges are camera hardware specific and outside the scope of this API.

Note: This class is not intended for sub-classing and used to standardise existing varieties of implementations.

Derivation

Members

Defined in CCamera::CCameraPresets:
GetAffectedSettingsL(), GetAssociatedSettingsL(), GetSupportedPresetsL(), NewL(), Preset(), SetPreset(), ~CCameraPresets()

Inherited from CBase:
Delete(), Extension_(), operator new()

Construction and destruction


NewL()

static IMPORT_C CCameraPresets *NewL(CCamera &aCamera);

Description

Factory function for creating the CCameraPresets object.

Note: Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.

Parameters

CCamera &aCamera

a reference to a CCamera object providing the settings.

Return value

CCameraPresets *

a pointer to a fully constructed CCameraPresets object.

Leave codes

KErrNoMemory

Out of memory.


~CCameraPresets()

IMPORT_C ~CCameraPresets();

Description

Destructor

Member functions


GetSupportedPresetsL()

IMPORT_C void GetSupportedPresetsL(RArray< TUid > &aPresets) const;

Description

Gets the presets supported by the camera. These are identified by UIDs and relate to a known predefined outcome. The settings associated with a particular preset and their specific values and ranges are specific to each type of camera hardware and are therefore not defined by the API.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new presets added). So, any extra uid value(unrecognised) passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values.

Note: Any preset uid, if added in future, has to have a uid value greater than KUidECamPresetFactoryDefaultUidValue otherwise unfamilar preset uids could not be checked.

Parameters

RArray< TUid > &aPresets

An empty array of TUids which would be populated by the implementation with the specific supported values. If the array is empty on return, the camera does not support presets.

Leave codes

KErrNoMemory

Out of memory.


SetPreset()

IMPORT_C void SetPreset(TUid aPreset);

Description

Sets a specific preset supported by the device. All clients, implementing the MCameraObserver2 interface will receive a notification with the UID of the specific preset, signalling a new preset has been selected.

Parameters

TUid aPreset

The UID of the new requested preset.


Preset()

IMPORT_C TUid Preset() const;

Description

Gets the current preset set on the camera.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new presets added). So, any extra uid(unrecognised) value received from the implementation will be mapped to KUidECamPresetFactoryDefault at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

Return value

TUid

The UID of the current preset. If there is no active preset then the returned value is KNullUid.


GetAffectedSettingsL()

IMPORT_C void GetAffectedSettingsL(RArray< TUid > &aSettings) const;

Description

Get all settings affected by the current preset. This is to say that all settings which are related to the preset in question will be included in the list, even though the value might not have changed.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

Parameters

RArray< TUid > &aSettings

An empty array of TUids which would be populated by the implementation with the specific settings.

Leave codes

KErrNoMemory

Out of memory.


GetAssociatedSettingsL()

IMPORT_C void GetAssociatedSettingsL(TUid aPreset, RArray< TUid > &aSettings) const;

Description

Get all settings associated with a specific preset, identified by a UID. This function does not require a preset to have been set prior the call as in GetAffectedSettingsL() function. The returned array will contain the UIDs of all settings which are associated and potentially affected by that particular preset.

Note: if CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added uid values (new settings added). So, any extra uid value passed from the implementation will be filtered at this point. To receive extra added uid values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised uid values

Parameters

TUid aPreset

the UID of the preset in question.

RArray< TUid > &aSettings

An empty array of TUids which would be populated by the implementation with the UIDs of the settings associated with that preset.

Leave codes

KErrArgument

If the provided preset UID is not recognised.

KErrNoMemory

Out of memory.


Class CCameraImageProcessing

class CCameraImageProcessing : public CBase;

Description

This class is used to perform image processing operations on the camera. These include brightness, contrast, gamma, hue, sharpness and saturation adjustments. The client is also able to perform simple image transformations like cropping, rotation, mirroring, scaling, noise reduction and glare reduction. . When an operation selection is complete, all clients are notified with the respective event UID.

As often cameras may support only a subset of discrete values of the allowed range, the API allows the client to retrieve those and use them explicitly.

Note: This class is not intended for sub-classing and used to standardise existing varieties of implementations.

Note: it is assumed that setting a new value for a transformations(transform, adjust, effect) effectively activates the transformations. Whilst for effects and adjustments there is always a value, transforms may have a dependency on other parameters and crop - requires setting of source rectangle. scale - will use setting of source rectangle, and the magnification factor is determined by the source rectangle and the output size. This is always magnification. if a value is set, it is assumed to be a scaling factor multiplied by KECamFineResolutionFactor and set to integer. mirror - values of TMirror type. rotation - the angle in degrees. noise reduction - TNoiseReduction. glare removal - TGlareReduction.

Example

        // Lets assume that an application would need to check whether gamma correction is 
        // supported on a particular platform. After obtaining a valid pointer to the interface, 
        // it would call GetSupportedTransformationsL() to obtain the list of the supported 
        // transformations and check whether KUidECamEventImageProcessingAdjustGamma
        // is in the list. If it is then call SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, 200);
        // to set the new value. A notification will be generated to the client to indicate success.

        RArray<TUid> suppTransforms; // array of supported transformations
        CleanupClosePushL(suppTransforms);

        imageProcess->GetSupportedTransformationsL(suppTransfUids);
         ...
        // if the gamma is supported 
        TInt gammaCorrection = 200; // gamma correction of 2.0
        imageProcess->SetTranformationValue(KUidECamEventImageProcessingAdjustGamma, gammaCorrection);
        ...
        // pop stack to close the RArray

Derivation

Members

Defined in CCamera::CCameraImageProcessing:
EEffectEmboss, EEffectLowSharpening, EEffectMonochrome, EEffectNegative, EEffectNeutral, EEffectNone, EEffectRedEyeReduction, EEffectSepia, EEffectSolarize, EEffectVivid, EGammaAuto, EGlareReductionBasic, EGlareReductionNone, EHueAuto, EMirrorBoth, EMirrorHorizontal, EMirrorNone, EMirrorVertical, ENoiseReductionBasic, ENoiseReductionNone, ESaturationAuto, ESharpnessAuto, GetActiveTransformSequenceL(), GetActiveTransformationsL(), GetSourceRect(), GetSupportedTransformationsL(), GetTransformationSupportedValuesL(), NewL(), SetActiveTransformSequenceL(), SetSourceRect(), SetTransformationValue(), TEffect, TGamma, TGlareReduction, THue, TMirror, TNoiseReduction, TSaturation, TSharpness, TransformationValue(), ~CCameraImageProcessing()

Inherited from CBase:
Delete(), Extension_(), operator new()

Construction and destruction


NewL()

static IMPORT_C CCameraImageProcessing *NewL(CCamera &aCamera);

Description

Factory function for creating the CCameraImageProcessing object.

Note: Clients using MCameraObserver are not recommended to use this extension class since they cannot handle events.

Parameters

CCamera &aCamera

a reference to a CCamera object providing the settings.

Return value

CCameraImageProcessing *

a pointer to a fully constructed CCameraImageProcessing object.

Leave codes

KErrNoMemory

Out of memory.


~CCameraImageProcessing()

IMPORT_C ~CCameraImageProcessing();

Description

Destructor

Member functions


GetSupportedTransformationsL()

IMPORT_C void GetSupportedTransformationsL(RArray< TUid > &aTransformations) const;

Description

Get all transformations supported on the camera.

Parameters

RArray< TUid > &aTransformations

An empty RArray of TUids to store the UIDs of the supported transformations.

Leave codes

KErrNoMemory

Out of memory.


GetActiveTransformationsL()

IMPORT_C void GetActiveTransformationsL(RArray< TUid > &aTransformations) const;

Description

Get currently active transformations on the camera.

Parameters

RArray< TUid > &aTransformations

An empty RArray of TUids to store the UIDs of the supported transformations.

Leave codes

KErrNoMemory

Out of memory.


GetTransformationSupportedValuesL()

IMPORT_C void GetTransformationSupportedValuesL(TUid aTransformation, RArray< TInt > &aValues, TValueInfo &aInfo) const;

Description

Get all values supported by an active transformation.

Note: Depending on the value of aInfo parameter, same array of values may describe different set of values. When camera device doesn't support this, empty array may be returned and TValueInfo may be ENotActive; corresponding getter/setters for this feature should not be used in such a case.

Note: If CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values for Effects. So, any extra enum value(unrecognised) passed from the implementation will be filtered at this point. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values

it is assumed that implementation will use EBitField to pack all supported effects

Parameters

TUid aTransformation

The UID of active transform for which values are requested.

RArray< TInt > &aValues

An array of integers to represent the values for the requested transformation.

TValueInfo &aInfo

Additional information describing the returned array of values.

Leave codes

KErrNoMemory

Out of memory.


TransformationValue()

IMPORT_C TInt TransformationValue(TUid aTransformation) const;

Description

Get the current value of a transformation

Note: If CCamera::New2L() or CCamera::NewDuplicate2L() is not used to create CCamera object, it is assumed that application is not prepared to receive extra added enum values for Effects. So, any extra enum value (unrecognised) received from the implementation will be dropped and EEffectNone would be passed instead. To receive extra added enum values, application should rather use CCamera::New2L() or CCamera::NewDuplicate2L() to create camera object. In this case, application is assumed to be prepared to receive unrecognised enum values

Parameters

TUid aTransformation

The UID of the transformation

Return value

TInt

The integer value of the tranformation.


SetTransformationValue()

IMPORT_C void SetTransformationValue(TUid aTransformation, TInt aValue);

Description

Set new value for a transformation. A notification event with the transformation UID is sent to all clients. UIDs are in the form KUidECamEventImageProcessingXXXX.

Parameters

TUid aTransformation

The UID of the transformation

TInt aValue

The integer value of the tranformation.


GetActiveTransformSequenceL()

IMPORT_C void GetActiveTransformSequenceL(RArray< TUid > &aTransformSequence) const;

Description

Get the sequence of all active transforms, ordered in order of execution.

Parameters

RArray< TUid > &aTransformSequence

an empty array to be populated with sequence of transform UIDs, where transform entries with smaller index are executed earlier.

Leave codes

KErrNoMemory

Out of memory.


SetActiveTransformSequenceL()

IMPORT_C void SetActiveTransformSequenceL(RArray< TUid > &aTransformSequence);

Description

Set the order of all active transform in terms of execution. The transforms with smaller index are executed earlier.

Parameters

RArray< TUid > &aTransformSequence

The list of ordered transforms, where transforms with smaller index are executed earlier.

Leave codes

KErrNoMemory

Out of memory.


SetSourceRect()

IMPORT_C void SetSourceRect(const TRect &aRect);

Description

Set the source rectangle for KUidECamEventImageProcessingTransformScale or KUidECamEventImageProcessingTransformCrop. The coordinates should fall within the current image rectangle. The result is always a logical AND operation between the two rectangles.

Parameters

const TRect &aRect

a reference to TRect object which describes the coordinates of the area of interest.


GetSourceRect()

IMPORT_C void GetSourceRect(TRect &aRect) const;

Description

Get the source rectangle for KUidECamEventImageProcessingTransformScale or KUidECamEventImageProcessingTransformCrop. The coordinates should fall within the current image rectangle. The result is always a logical AND operation between the two rectangles.

Parameters

TRect &aRect

a reference to TRect object to hold the current source rectangle coordinates. If it has not been set, the coordinates match these of the whole image.

Member enumerations


Enum TGamma

TGamma

Description

Gamma settings

EGammaAuto

Sets the gamma adjustment automatically.


Enum TSharpness

TSharpness

Description

Sharpness Settings

ESharpnessAuto

Sets the sharpness adjustment automatically.


Enum TSaturation

TSaturation

Description

Saturation Settings

ESaturationAuto

Sets the saturation adjustment automatically.


Enum THue

THue

Description

Hue Settings

EHueAuto

Sets the hue adjustment automatically.


Enum TEffect

TEffect

Description

Settings for the supported effects

EEffectNone

Effects off is default, always supported

EEffectNegative

Negative visual effect.

EEffectMonochrome

Black and white visual effect.

EEffectSolarize

Solarization visual effect.

EEffectSepia

Sepia visual effect.

EEffectEmboss

Emboss visual effect.

EEffectRedEyeReduction

Red eye glare reduction visual effect.

EEffectVivid

Vivid colour visual effect.

EEffectNeutral

Neutral colour visual effect.

EEffectLowSharpening

Selective sharpening visual effect.


Enum TMirror

TMirror

Description

Mirror settings

EMirrorNone

Default value. Mirroring is disabled.

EMirrorHorizontal

Mirror along horizontal axis.

EMirrorVertical

Mirror along vertical axis.

EMirrorBoth

Mirror along horizontal and vertical axis.


Enum TNoiseReduction

TNoiseReduction

Description

Noise filter settings

ENoiseReductionNone

Default value. Noise reduction disabled.

ENoiseReductionBasic

most basic noise reduction.


Enum TGlareReduction

TGlareReduction

Description

Glare reduction settings

EGlareReductionNone

Default value. Glare reduction disabled.

EGlareReductionBasic

most basic glare reduction.

[Top]


Member enumerations


Enum TFormat

TFormat

Description

Possible still image and video frame formats

Formats are read from left to right, starting at the top of the image. YUV format is as defined by ITU-R BT.601-4.

EFormatMonochrome

8 bit greyscale values, 0=black, 255=white.

EFormat16bitRGB444

Packed RGB triplets, 4 bits per pixel with red in the least significant bits and the 4 most significant bits unused.

EFormat16BitRGB565

Packed RGB triplets, 5 bits per pixel for red and blue and 6 bits for green, with red in the least significant bits.

EFormat32BitRGB888

Packed RGB triplets, 8 bits per pixel with red in the least significant bits and the 8 most significant bits unused.

EFormatJpeg

JFIF JPEG.

EFormatExif

EXIF JPEG

EFormatFbsBitmapColor4K

CFbsBitmap object with display mode EColor4K.

EFormatFbsBitmapColor64K

CFbsBitmap object with display mode EColor64K.

EFormatFbsBitmapColor16M

CFbsBitmap object with display mode EColor16M.

EFormatUserDefined

Implementation dependent.

EFormatYUV420Interleaved

4:2:0 format, 8 bits per sample, Y00Y01Y10Y11UV.

EFormatYUV420Planar

4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0...V0...

EFormatYUV422

4:2:2 format, 8 bits per sample, UY0VY1.

EFormatYUV422Reversed

4:2:2 format, 8 bits per sample, Y1VY0U.

EFormatYUV444

4:4:4 format, 8 bits per sample, Y00U00V00 Y01U01V01...

EFormatYUV420SemiPlanar

4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0V0...

EFormatFbsBitmapColor16MU

CFbsBitmap object with display mode EColor16MU.


Enum TContrast

TContrast

Description

Specifies whether contrast is set automatically.

EContrastAuto

Sets the contrast automatically.


Enum TBrightness

TBrightness

Description

Specifies whether brightness is set automatically.

EBrightnessAuto

Sets the brightness automatically.


Enum TFlash

TFlash

Description

Specifies the type of flash.

EFlashNone

No flash, always supported.

EFlashAuto

Flash will automatically fire when required.

EFlashForced

Flash will always fire.

EFlashFillIn

Reduced flash for general lighting

EFlashRedEyeReduce

Red-eye reduction mode.

EFlashSlowFrontSync

Flash at the moment when shutter opens.

EFlashSlowRearSync

Flash at the moment when shutter closes.

EFlashManual

User configurable setting

EFlashVideoLight

Constant emission of light during video mode

Note: This value is available only to the API clients using CCamera::New2L() or CCamera::NewDuplicate2L()


Enum TExposure

TExposure

Description

Specifies the type of exposure. - EExposureAuto is the default value.

EExposureAuto

Set exposure automatically. Default, always supported.

EExposureNight

Night-time setting for long exposures.

EExposureBacklight

Backlight setting for bright backgrounds.

EExposureCenter

Centered mode for ignoring surroundings.

EExposureSport

Sport setting for very short exposures.

EExposureVeryLong

Generalised setting for very long exposures.

EExposureSnow

Snow setting for daylight exposure.

EExposureBeach

Beach setting for daylight exposure with reflective glare.

EExposureProgram

Programmed exposure setting.

EExposureAperturePriority

Aperture setting is given priority.

EExposureShutterPriority

Shutter speed setting is given priority.

EExposureManual

User selectable exposure value setting.

EExposureSuperNight

Exposure night setting with colour removed to get rid of colour noise.

EExposureInfra

Exposure for infra-red sensor on the camera


Enum TWhiteBalance

TWhiteBalance

Description

Specifies how the white balance is set.

EWBAuto

Set white balance automatically. Default, always supported.

EWBDaylight

Normal daylight.

EWBCloudy

Overcast daylight.

EWBTungsten

Tungsten filament lighting.

EWBFluorescent

Fluorescent tube lighting

EWBFlash

Flash lighting.

EWBSnow

High contrast daylight primarily snowy

EWBBeach

High contrast daylight primarily near the sea

EWBManual

User configurable mode

EWBShade

Shade