CCamera Class Reference

class CCamera : public CBase

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 ).

Inherits from

Public Member Functions
TInt Brightness ()
TInt BuffersInUse ()
void CameraInfo ( TCameraInfo &)
IMPORT_C TInt CameraVersion ()
IMPORT_C TInt CamerasAvailable ()
void CancelCaptureImage ()
void CaptureImage ()
TInt Contrast ()
TAny * CustomInterface ( TUid )
TInt DigitalZoomFactor ()
void EnumerateCaptureSizes ( TSize &, TInt , TFormat )
void EnumerateVideoFrameRates ( TReal32 &, TInt , TFormat , TInt , TExposure )
void EnumerateVideoFrameSizes ( TSize &, TInt , TFormat )
TExposure Exposure ()
TFlash Flash ()
TReal32 FrameRate ()
TInt FramesPerBuffer ()
void GetFrameSize ( TSize &)
TInt Handle ()
TInt JpegQuality ()
IMPORT_C CCamera * New2L ( MCameraObserver2 &, TInt , TInt )
IMPORT_C CCamera * NewDuplicate2L ( MCameraObserver2 &, TInt )
IMPORT_C CCamera * NewDuplicateL ( MCameraObserver2 &, TInt )
IMPORT_C CCamera * NewDuplicateL ( MCameraObserver &, TInt )
IMPORT_C CCamera * NewL ( MCameraObserver2 &, TInt , TInt )
IMPORT_C CCamera * NewL ( MCameraObserver &, TInt )
void PowerOff ()
void PowerOn ()
void PrepareImageCaptureL ( TFormat , TInt )
void PrepareImageCaptureL ( TFormat , TInt , const TRect &)
void PrepareVideoCaptureL ( TFormat , TInt , TInt , TInt , TInt )
void PrepareVideoCaptureL ( TFormat , TInt , TInt , TInt , TInt , const TRect &)
void Release ()
void Reserve ()
void SetBrightnessL ( TInt )
void SetContrastL ( TInt )
void SetDigitalZoomFactorL ( TInt )
void SetExposureL ( TExposure )
void SetFlashL ( TFlash )
void SetJpegQuality ( TInt )
void SetViewFinderMirrorL ( TBool )
void SetWhiteBalanceL ( TWhiteBalance )
void SetZoomFactorL ( TInt )
void StartVideoCapture ()
void StartViewFinderBitmapsL ( TSize &)
void StartViewFinderBitmapsL ( TSize &, TRect &)
void StartViewFinderDirectL (RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &)
void StartViewFinderDirectL (RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &, TRect &)
void StartViewFinderL ( TFormat , TSize &)
void StartViewFinderL ( TFormat , TSize &, TRect &)
void StopVideoCapture ()
void StopViewFinder ()
TBool VideoCaptureActive ()
TBool ViewFinderActive ()
TBool ViewFinderMirror ()
TWhiteBalance WhiteBalance ()
TInt ZoomFactor ()
Private Member Functions
CCamera ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enum TBrightness { EBrightnessAuto  = KMinTInt }
enum TContrast { EContrastAuto  = KMinTInt }
enum TExposure {
EExposureAuto  = 0x0000, EExposureNight  = 0x0001, EExposureBacklight  = 0x0002, EExposureCenter  = 0x0004, EExposureSport  = 0x0008, EExposureVeryLong  = 0x0010, EExposureSnow  = 0x0020, EExposureBeach  = 0x0040, EExposureProgram  = 0x0080, EExposureAperturePriority  = 0x0100, EExposureShutterPriority  = 0x0200, EExposureManual  = 0x0400, EExposureSuperNight  = 0x0800, EExposureInfra  = 0x1000
}
enum TFlash {
EFlashNone  = 0x0000, EFlashAuto  = 0x0001, EFlashForced  = 0x0002, EFlashFillIn  = 0x0004, EFlashRedEyeReduce  = 0x0008, EFlashSlowFrontSync  = 0x0010, EFlashSlowRearSync  = 0x0020, EFlashManual  = 0x0040, EFlashVideoLight  = 0x0080
}
enum TFormat {
EFormatMonochrome  = 0x0001, EFormat16bitRGB444  = 0x0002, EFormat16BitRGB565  = 0x0004, EFormat32BitRGB888  = 0x0008, EFormatJpeg  = 0x0010, EFormatExif  = 0x0020, EFormatFbsBitmapColor4K  = 0x0040, EFormatFbsBitmapColor64K  = 0x0080, EFormatFbsBitmapColor16M  = 0x0100, EFormatUserDefined  = 0x0200, EFormatYUV420Interleaved  = 0x0400, EFormatYUV420Planar  = 0x0800, EFormatYUV422  = 0x1000, EFormatYUV422Reversed  = 0x2000, EFormatYUV444  = 0x4000, EFormatYUV420SemiPlanar  = 0x8000, EFormatFbsBitmapColor16MU  = 0x00010000, EFormatMJPEG  = 0x00020000, EFormatEncodedH264  = 0x00040000, EFormatYUV222ReversedV2  = 0x00080000
}
enum TWhiteBalance {
EWBAuto  = 0x0000, EWBDaylight  = 0x0001, EWBCloudy  = 0x0002, EWBTungsten  = 0x0004, EWBFluorescent  = 0x0008, EWBFlash  = 0x0010, EWBSnow  = 0x0020, EWBBeach  = 0x0040, EWBManual  = 0x0080, EWBShade  = 0x0100, EWBAutoSkin  = 0x0200, EWBHorizon  = 0x0400, EWBDaylightUnderWater  = 0x0800
}

Constructor & Destructor Documentation

CCamera()

IMPORT_C CCamera ( ) [private]

Default Constructor

Prevents implementers from deriving from CCamera . Implementation requires derivation from CCameraPlugin instead.

Member Functions Documentation

Brightness()

TInt Brightness ( ) const [pure virtual]

Gets the currently set brightness adjustment value.

BuffersInUse()

TInt BuffersInUse ( ) const [pure virtual]

Gets the number of buffers currently in use.

CameraInfo(TCameraInfo &)

void CameraInfo ( TCameraInfo & aInfo ) const [pure virtual]

Gets information about the camera device.

Parameters

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

CameraVersion()

IMPORT_C TInt CameraVersion ( )

Returns the camera API version no.

CamerasAvailable()

IMPORT_C TInt CamerasAvailable ( ) [static]

Determines the number of cameras on the device.

CancelCaptureImage()

void CancelCaptureImage ( ) [pure virtual]

Cancels the asynchronous still image capture.

CCamera::CCameraImageCapture

CaptureImage()

void CaptureImage ( ) [pure virtual]

Contrast()

TInt Contrast ( ) const [pure virtual]

Gets the currently set contrast value.

CustomInterface(TUid)

TAny * CustomInterface ( TUid aInterface ) [pure virtual]

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.

DigitalZoomFactor()

TInt DigitalZoomFactor ( ) const [pure virtual]

Gets the currently set digital zoom factor.

EnumerateCaptureSizes(TSize &, TInt, TFormat)

void EnumerateCaptureSizes ( TSize & aSize,
TInt aSizeIndex,
TFormat aFormat
) const [pure virtual]

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.

EnumerateVideoFrameRates(TReal32 &, TInt, TFormat, TInt, TExposure)

void EnumerateVideoFrameRates ( TReal32 & aRate,
TInt aRateIndex,
TFormat aFormat,
TInt aSizeIndex,
TExposure aExposure = EExposureAuto
) const [pure virtual]

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 = EExposureAuto The exposure mode.

EnumerateVideoFrameSizes(TSize &, TInt, TFormat)

void EnumerateVideoFrameSizes ( TSize & aSize,
TInt aSizeIndex,
TFormat aFormat
) const [pure virtual]

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.

Exposure()

TExposure Exposure ( ) const [pure virtual]

Gets the currently set exposure setting value.

Flash()

TFlash Flash ( ) const [pure virtual]

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.

CCamera::CCameraAdvancedSettings::FlashMode()

FrameRate()

TReal32 FrameRate ( ) const [pure virtual]

Gets the frame rate currently in use.

FramesPerBuffer()

TInt FramesPerBuffer ( ) const [pure virtual]

Gets the number of frames per buffer currently in use.

GetFrameSize(TSize &)

void GetFrameSize ( TSize & aSize ) const [pure virtual]

Gets the frame size currently in use.

Parameters

TSize & aSize The frame size currently in use.

Handle()

TInt Handle ( ) [pure virtual]

Gets the device-unique handle of this camera object.

JpegQuality()

TInt JpegQuality ( ) const [pure virtual]

Gets the currently set jpeg quality value.

Returns 0 if not supported.

CCamera::CCameraPreImageCaptureControl::GetImageMaxMemorySizeL(TUint& aMemorySize)

New2L(MCameraObserver2 &, TInt, TInt)

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

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

leave
KErrNoMemory if out of memory.
leave
KErrNotSupported if aCameraIndex is out of range.
leave
KErrPermissionDenied if the application does not have the UserEnvironment capability.
capability
UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.
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.
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.

NewDuplicate2L(MCameraObserver2 &, TInt)

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

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.

leave
KErrNoMemory if out of memory.
leave
KErrNotFound if aCameraHandle is not valid.
leave
KErrPermissionDenied if the application does not have the UserEnvironment capability.
capability
UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.
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.

NewDuplicateL(MCameraObserver2 &, TInt)

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

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

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

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

leave
KErrNoMemory if out of memory.
leave
KErrNotFound if aCameraHandle is not valid.
leave
KErrPermissionDenied if the application does not have the UserEnvironment capability.
capability
UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.
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.

NewDuplicateL(MCameraObserver &, TInt)

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

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

leave
KErrNoMemory if out of memory.
leave
KErrNotFound if aCameraHandle is not valid.
leave
KErrPermissionDenied if the application does not have the UserEnvironment capability.
capability
UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.
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.

NewL(MCameraObserver2 &, TInt, TInt)

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

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

Creates an object representing a camera.

leave
KErrNoMemory if out of memory.
leave
KErrNotSupported if aCameraIndex is out of range.
leave
KErrPermissionDenied if the application does not have the UserEnvironment capability.
capability
UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.
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.
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.

NewL(MCameraObserver &, TInt)

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

Creates an object representing a camera.

leave
KErrNoMemory if out of memory.
leave
KErrNotSupported if aCameraIndex is out of range.
leave
KErrPermissionDenied if the application does not have the UserEnvironment capability.
capability
UserEnvironment An application that creates a CCamera object must have the UserEnvironment capability.
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.

PowerOff()

void PowerOff ( ) [pure virtual]

Synchronous function for switching off camera power.

PowerOn()

void PowerOn ( ) [pure virtual]

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.

PrepareImageCaptureL(TFormat, TInt)

void PrepareImageCaptureL ( TFormat aImageFormat,
TInt aSizeIndex
) [pure virtual]

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.

leave
KErrNotSupported
leave
KErrNoMemory
leave
KErrNotReady if PowerOn() hasn't been called successfully.
Note:

Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture at the same time may not be possible. In this case, the recommendation is to unprepare video capture before preparing image capture if PrepareVideoCaptureL() has already been called.

CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)

Parameters

TFormat aImageFormat The image format.
TInt aSizeIndex Size index.

PrepareImageCaptureL(TFormat, TInt, const TRect &)

void PrepareImageCaptureL ( TFormat aImageFormat,
TInt aSizeIndex,
const TRect & aClipRect
) [pure virtual]

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.

leave
KErrNotSupported
leave
KErrNoMemory
leave
KErrInUse if Reserve() hasn't been called successfully
leave
KErrNotReady if PowerOn() hasn't been called successfully.
Note:

Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture at the same time may not be possible. In this case, the recommendation is to unprepare video capture before preparing image capture if PrepareVideoCaptureL() has already been called.

CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)

Parameters

TFormat aImageFormat The image format.
TInt aSizeIndex Size index.
const TRect & aClipRect The rectangle to which the image is to be clipped.

PrepareVideoCaptureL(TFormat, TInt, TInt, TInt, TInt)

void PrepareVideoCaptureL ( TFormat aFormat,
TInt aSizeIndex,
TInt aRateIndex,
TInt aBuffersToUse,
TInt aFramesPerBuffer
) [pure virtual]

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.

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

Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture at the same time may not be possible. In this case, the recommendation is to unprepare image capture before preparing video capture if PrepareImageCaptureL() has already been called.

CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)

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.

PrepareVideoCaptureL(TFormat, TInt, TInt, TInt, TInt, const TRect &)

void PrepareVideoCaptureL ( TFormat aFormat,
TInt aSizeIndex,
TInt aRateIndex,
TInt aBuffersToUse,
TInt aFramesPerBuffer,
const TRect & aClipRect
) [pure virtual]

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.

leave
KErrNotSupported
leave
KErrNoMemory,
leave
KErrInUse if Reserve() hasn't been called successfully
leave
KErrNotReady if PowerOn() hasn't been called successfully.
Note:

Depending on the ECAM implementation and underlying hardware, preparing both image capture and video capture at the same time may not be possible. In this case, the recommendation is to unprepare image capture before preparing video capture if PrepareImageCaptureL() has already been called.

CCamera::CCameraVideoCaptureControl::PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)

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.

Release()

void Release ( ) [pure virtual]

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

Reserve()

void Reserve ( ) [pure virtual]

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

Calls MCameraObserver :: ReserveComplete() when complete.

SetBrightnessL(TInt)

void SetBrightnessL ( TInt aBrightness ) [pure virtual]

Sets the brightness adjustment of the device.

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

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.

SetContrastL(TInt)

void SetContrastL ( TInt aContrast ) [pure virtual]

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::iContrastSupported

SetDigitalZoomFactorL(TInt)

void SetDigitalZoomFactorL ( TInt aDigitalZoomFactor = 0 ) [pure virtual]

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 = 0 The required digital zoom factor.

SetExposureL(TExposure)

void SetExposureL ( TExposure aExposure = EExposureAuto ) [pure virtual]

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 = EExposureAuto The required exposure adjustment.

SetFlashL(TFlash)

void SetFlashL ( TFlash aFlash = EFlashNone ) [pure virtual]

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 = EFlashNone The required flash mode.

SetJpegQuality(TInt)

void SetJpegQuality ( TInt aQuality ) [pure virtual]

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.

CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::iImageMaxMemorySize

Parameters

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

SetViewFinderMirrorL(TBool)

void SetViewFinderMirrorL ( TBool aMirror ) [pure virtual]

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.

leave
KErrNotSupported.
Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

Parameters

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

SetWhiteBalanceL(TWhiteBalance)

void SetWhiteBalanceL ( TWhiteBalance aWhiteBalance = EWBAuto ) [pure virtual]

Sets the white balance adjustment of the device.

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

leave
KErrNotSupported if the specified white balance adjustment is invalid.

Parameters

TWhiteBalance aWhiteBalance = EWBAuto The required white balance adjustment.

SetZoomFactorL(TInt)

void SetZoomFactorL ( TInt aZoomFactor = 0 ) [pure virtual]

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 = 0 Required zoom factor.

StartVideoCapture()

void StartVideoCapture ( ) [pure virtual]

Starts capturing video.

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

StartViewFinderBitmapsL(TSize &)

void StartViewFinderBitmapsL ( TSize & aSize ) [pure virtual]

Starts transfer of view finder data.

Bitmaps are returned by MCameraObserver::ViewFinderFrameReady() .

leave
KErrNotReady if PowerOn() has not been called, or has not yet completed.
Note:

This method is assumed to be meant for default display only.

CCamera::CCameraClientViewFinder

Parameters

TSize & aSize On return, the size used.

StartViewFinderBitmapsL(TSize &, TRect &)

void StartViewFinderBitmapsL ( TSize & aSize,
TRect & aClipRect
) [pure virtual]

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.

leave
KErrInUse if Reserve() hasn't been called successfully.
leave
KErrNotReady if PowerOn() hasn't been called successfully.
Note:

This method is assumed to be meant for default display only.

CCamera::CCameraClientViewFinder

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.

StartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &)

void StartViewFinderDirectL ( RWsSession & aWs,
CWsScreenDevice & aScreenDevice,
RWindowBase & aWindow,
TRect & aScreenRect
) [pure virtual]

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.

leave
KErrNotReady if PowerOn() has either not been called, or has not yet completed.
Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraV2DirectViewFinder

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.

StartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &, TRect &)

void StartViewFinderDirectL ( RWsSession & aWs,
CWsScreenDevice & aScreenDevice,
RWindowBase & aWindow,
TRect & aScreenRect,
TRect & aClipRect
) [pure virtual]

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.

leave
KErrNotReady if PowerOn() hasn't been called successfully.
Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraClientViewFinder

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.

StartViewFinderL(TFormat, TSize &)

void StartViewFinderL ( TFormat aImageFormat,
TSize & aSize
) [pure virtual]

Starts transfer of view finder data.

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

leave
KErrNotSupported
leave
KErrNotReady if Reserve() has not been called, or has not yet completed.
Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraClientViewFinder

Parameters

TFormat aImageFormat The image format requested by the client.
TSize & aSize On return, the size used.

StartViewFinderL(TFormat, TSize &, TRect &)

void StartViewFinderL ( TFormat aImageFormat,
TSize & aSize,
TRect & aClipRect
) [pure virtual]

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.

leave
KErrInUse if Reserve() hasn't been called successfully,
leave
KErrNotReady if PowerOn() hasn't been called successfully.
Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraClientViewFinder

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.

StopVideoCapture()

void StopVideoCapture ( ) [pure virtual]

Stops video capture.

StopViewFinder()

void StopViewFinder ( ) [pure virtual]

Stops transfer of view finder data to the screen.

Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

VideoCaptureActive()

TBool VideoCaptureActive ( ) const [pure virtual]

Tests whether video capture is active.

ViewFinderActive()

TBool ViewFinderActive ( ) const [pure virtual]

Queries whether the view finder is active.

Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

ViewFinderMirror()

TBool ViewFinderMirror ( ) const [pure virtual]

Gets whether view finder mirroring is active.

Note:

This method is assumed to be meant for default display only. KECamDefaultViewFinderHandle should be used to refer viewfinders started using CCamera methods.

CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

WhiteBalance()

TWhiteBalance WhiteBalance ( ) const [pure virtual]

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

CCamera::CCameraAdvancedSettings::WhiteBalanceMode()

ZoomFactor()

TInt ZoomFactor ( ) const [pure virtual]

Gets the currently set zoom factor.

Member Enumerations Documentation

Enum TBrightness

Specifies whether brightness is set automatically.

Enumerators

EBrightnessAuto = KMinTInt

Sets the brightness automatically.

Enum TContrast

Specifies whether contrast is set automatically.

Enumerators

EContrastAuto = KMinTInt

Sets the contrast automatically.

Enum TExposure

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

Enumerators

EExposureAuto = 0x0000

Set exposure automatically. Default, always supported. This may imply auto aperture so clients may receive a KUidEcamEvent2CameraSettingAutoAperture event notification some time later.

EExposureNight = 0x0001

Night-time setting for long exposures.

EExposureBacklight = 0x0002

Backlight setting for bright backgrounds.

EExposureCenter = 0x0004

Centered mode for ignoring surroundings.

EExposureSport = 0x0008

Sport setting for very short exposures.

EExposureVeryLong = 0x0010

Generalised setting for very long exposures.

EExposureSnow = 0x0020

Snow setting for daylight exposure.

EExposureBeach = 0x0040

Beach setting for daylight exposure with reflective glare.

EExposureProgram = 0x0080

Programmed exposure setting.

EExposureAperturePriority = 0x0100

Aperture setting is given priority.

EExposureShutterPriority = 0x0200

Shutter speed setting is given priority. This may imply auto aperture so clients may receive a KUidEcamEvent2CameraSettingAutoAperture event notification some time later.

EExposureManual = 0x0400

User selectable exposure value setting.

EExposureSuperNight = 0x0800

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

EExposureInfra = 0x1000

Exposure for infra-red sensor on the camera

Enum TFlash

Specifies the type of flash.

Enumerators

EFlashNone = 0x0000

No flash, always supported.

EFlashAuto = 0x0001

Flash will automatically fire when required.

EFlashForced = 0x0002

Flash will always fire.

EFlashFillIn = 0x0004

Reduced flash for general lighting

EFlashRedEyeReduce = 0x0008

Red-eye reduction mode.

EFlashSlowFrontSync = 0x0010

Flash at the moment when shutter opens.

EFlashSlowRearSync = 0x0020

Flash at the moment when shutter closes.

EFlashManual = 0x0040

User configurable setting

EFlashVideoLight = 0x0080
Constant emission of light during video mode
Note:

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

Enum TFormat

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.

Enumerators

EFormatMonochrome = 0x0001

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

EFormat16bitRGB444 = 0x0002

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

EFormat16BitRGB565 = 0x0004

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

EFormat32BitRGB888 = 0x0008

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

EFormatJpeg = 0x0010

JFIF JPEG.

EFormatExif = 0x0020

EXIF JPEG

EFormatFbsBitmapColor4K = 0x0040

CFbsBitmap object with display mode EColor4K.

EFormatFbsBitmapColor64K = 0x0080

CFbsBitmap object with display mode EColor64K.

EFormatFbsBitmapColor16M = 0x0100

CFbsBitmap object with display mode EColor16M.

EFormatUserDefined = 0x0200

Implementation dependent.

EFormatYUV420Interleaved = 0x0400

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

EFormatYUV420Planar = 0x0800

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

EFormatYUV422 = 0x1000

4:2:2 format, 8 bits per sample, UY0VY1. Maps to Graphics' EUidPixelFormatYUV_422Interleaved in pixelformats.h.

EFormatYUV422Reversed = 0x2000

4:2:2 format, 8 bits per sample, Y1VY0U. Maps to Graphics' EUidPixelFormatYUV_422InterleavedReversed in pixelformats.h.

EFormatYUV444 = 0x4000

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

EFormatYUV420SemiPlanar = 0x8000

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

EFormatFbsBitmapColor16MU = 0x00010000

CFbsBitmap object with display mode EColor16MU.

EFormatMJPEG = 0x00020000
Motion JPEG for video
Note:

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

EFormatEncodedH264 = 0x00040000
Compressed H264 video format.
Note:

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

EFormatYUV222ReversedV2 = 0x00080000
4:2:2 format, 8 bits per sample, Y0UY1V. Maps to Graphics' EUidPixelFormatYUV_422Reversed in pixelformats.h.
Note:

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

Enum TWhiteBalance

Specifies how the white balance is set.

Enumerators

EWBAuto = 0x0000

Set white balance automatically. Default, always supported.

EWBDaylight = 0x0001

Normal daylight.

EWBCloudy = 0x0002

Overcast daylight.

EWBTungsten = 0x0004

Tungsten filament lighting.

EWBFluorescent = 0x0008

Fluorescent tube lighting

EWBFlash = 0x0010

Flash lighting.

EWBSnow = 0x0020

High contrast daylight primarily snowy

EWBBeach = 0x0040

High contrast daylight primarily near the sea

EWBManual = 0x0080

User configurable mode

EWBShade = 0x0100

Shade

EWBAutoSkin = 0x0200

auto skin

If New2L() /NewDuplicate2L() are not used to create camera object, this enum value would be considered as unrecognized and filtered out in 'supported' or 'getter' methods.

EWBHorizon = 0x0400

horizon

If New2L() /NewDuplicate2L() are not used to create camera object, this enum value would be considered as unrecognized and filtered out in 'supported' or 'getter' methods.

EWBDaylightUnderWater = 0x0800

Daylight Under Water

If New2L() /NewDuplicate2L() are not used to create camera object, this enum value would be considered as unrecognized and filtered out in 'supported' or 'getter' methods.