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

Nested Classes and Structures

Public Member Functions
TInt Brightness()
TInt BuffersInUse()
voidCameraInfo(TCameraInfo &)
IMPORT_C TIntCameraVersion()
IMPORT_C TIntCamerasAvailable()
voidCancelCaptureImage()
voidCaptureImage()
TInt Contrast()
TAny *CustomInterface(TUid)
TInt DigitalZoomFactor()
voidEnumerateCaptureSizes(TSize &, TInt, TFormat)
voidEnumerateVideoFrameRates(TReal32 &, TInt, TFormat, TInt, TExposure)
voidEnumerateVideoFrameSizes(TSize &, TInt, TFormat)
TExposure Exposure()
TFlash Flash()
TReal32 FrameRate()
TInt FramesPerBuffer()
voidGetFrameSize(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)
voidPowerOff()
voidPowerOn()
voidPrepareImageCaptureL(TFormat, TInt)
voidPrepareImageCaptureL(TFormat, TInt, const TRect &)
voidPrepareVideoCaptureL(TFormat, TInt, TInt, TInt, TInt)
voidPrepareVideoCaptureL(TFormat, TInt, TInt, TInt, TInt, const TRect &)
voidRelease()
voidReserve()
voidSetBrightnessL(TInt)
voidSetContrastL(TInt)
voidSetDigitalZoomFactorL(TInt)
voidSetExposureL(TExposure)
voidSetFlashL(TFlash)
voidSetJpegQuality(TInt)
voidSetViewFinderMirrorL(TBool)
voidSetWhiteBalanceL(TWhiteBalance)
voidSetZoomFactorL(TInt)
voidStartVideoCapture()
voidStartViewFinderBitmapsL(TSize &)
voidStartViewFinderBitmapsL(TSize &, TRect &)
voidStartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &)
voidStartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &, TRect &)
voidStartViewFinderL(TFormat, TSize &)
voidStartViewFinderL(TFormat, TSize &, TRect &)
voidStopVideoCapture()
voidStopViewFinder()
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
enumTBrightness { EBrightnessAuto = KMinTInt }
enumTContrast { EContrastAuto = KMinTInt }
enumTExposure {
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
}
enumTFlash {
EFlashNone = 0x0000, EFlashAuto = 0x0001, EFlashForced = 0x0002, EFlashFillIn = 0x0004, EFlashRedEyeReduce = 0x0008, EFlashSlowFrontSync = 0x0010, EFlashSlowRearSync = 0x0020, EFlashManual = 0x0040, EFlashVideoLight = 0x0080
}
enumTFormat {
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
}
enumTWhiteBalance {
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_CCCamera()[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.

The currently set brightness adjustment value.

BuffersInUse()

TInt BuffersInUse()const [pure virtual]

Gets the number of buffers currently in use.

The number of buffers currently in use.

CameraInfo(TCameraInfo &)

voidCameraInfo(TCameraInfo &aInfo)const [pure virtual]

Gets information about the camera device.

Parameters

TCameraInfo & aInfoOn return, information about the camera device. See TCameraInfo.

CameraVersion()

IMPORT_C TIntCameraVersion()

Returns the camera API version no.

CamerasAvailable()

IMPORT_C TIntCamerasAvailable()[static]

Determines the number of cameras on the device.

Count of cameras present on the device.

CancelCaptureImage()

voidCancelCaptureImage()[pure virtual]

Cancels the asynchronous still image capture.

CCamera::CCameraImageCapture

CaptureImage()

voidCaptureImage()[pure virtual]

Asynchronously performs still image capture.

Calls MCameraObserver::ImageReady() when complete.

CCamera::CCameraImageCapture

CCamera::CCameraPreImageCaptureControl

Contrast()

TInt Contrast()const [pure virtual]

Gets the currently set contrast value.

The currently set contrast value.

CustomInterface(TUid)

TAny *CustomInterface(TUidaInterface)[pure virtual]

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

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

Parameters

TUid aInterfaceThe Uid of the particular interface function required.

DigitalZoomFactor()

TInt DigitalZoomFactor()const [pure virtual]

Gets the currently set digital zoom factor.

The currently set digital zoom factor.

EnumerateCaptureSizes(TSize &, TInt, TFormat)

voidEnumerateCaptureSizes(TSize &aSize,
TIntaSizeIndex,
TFormataFormat
)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 & aSizeImage size.
TInt aSizeIndexSize index.
TFormat aFormatThe image format.

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

voidEnumerateVideoFrameRates(TReal32 &aRate,
TIntaRateIndex,
TFormataFormat,
TIntaSizeIndex,
TExposureaExposure = 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 & aRateOn 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 aRateIndexThe rate index. Must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.
TFormat aFormatThe format.
TInt aSizeIndexThe size index.
TExposure aExposure = EExposureAutoThe exposure mode.

EnumerateVideoFrameSizes(TSize &, TInt, TFormat)

voidEnumerateVideoFrameSizes(TSize &aSize,
TIntaSizeIndex,
TFormataFormat
)const [pure virtual]

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

Parameters

TSize & aSizeOn 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 aSizeIndexSize index. Must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive
TFormat aFormatImage format.

Exposure()

TExposure Exposure()const [pure virtual]

Gets the currently set exposure setting value.

The currently set exposure setting value.

Flash()

TFlash Flash()const [pure virtual]

Gets the currently set flash mode.

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.

The frame rate currently in use.

FramesPerBuffer()

TInt FramesPerBuffer()const [pure virtual]

Gets the number of frames per buffer currently in use.

The number of frames per buffer currently in use.

GetFrameSize(TSize &)

voidGetFrameSize(TSize &aSize)const [pure virtual]

Gets the frame size currently in use.

Parameters

TSize & aSizeThe frame size currently in use.

Handle()

TInt Handle()[pure virtual]

Gets the device-unique handle of this camera object.

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.

The currently set jpeg quality value.

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

New2L(MCameraObserver2 &, TInt, TInt)

IMPORT_C CCamera *New2L(MCameraObserver2 &aObserver,
TIntaCameraIndex,
TIntaPriority
)[static]

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

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

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 & aObserverReference to class derived from MCameraObserver2 designed to receive notification of asynchronous event completion.
TInt aCameraIndexIndex from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.
TInt aPriorityValue from -100 to 100 indicating relative priority of client to use camera.

NewDuplicate2L(MCameraObserver2 &, TInt)

IMPORT_C CCamera *NewDuplicate2L(MCameraObserver2 &aObserver,
TIntaCameraHandle
)[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.

Duplicate of the original camera object.

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 & aObserverReference to an observer.
TInt aCameraHandleHandle of an existing camera object.

NewDuplicateL(MCameraObserver2 &, TInt)

IMPORT_C CCamera *NewDuplicateL(MCameraObserver2 &aObserver,
TIntaCameraHandle
)[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.

Duplicate of the original camera object.

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 & aObserverReference to an observer.
TInt aCameraHandleHandle of an existing camera object.

NewDuplicateL(MCameraObserver &, TInt)

IMPORT_C CCamera *NewDuplicateL(MCameraObserver &aObserver,
TIntaCameraHandle
)[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.

Duplicate of the original camera object.

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 & aObserverReference to an observer.
TInt aCameraHandleHandle of an existing camera object.

NewL(MCameraObserver2 &, TInt, TInt)

IMPORT_C CCamera *NewL(MCameraObserver2 &aObserver,
TIntaCameraIndex,
TIntaPriority
)[static]

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

Creates an object representing a camera.

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

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 & aObserverReference to class derived from MCameraObserver2 designed to receive notification of asynchronous event completion.
TInt aCameraIndexIndex from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.
TInt aPriorityValue from -100 to 100 indicating relative priority of client to use camera.

NewL(MCameraObserver &, TInt)

IMPORT_C CCamera *NewL(MCameraObserver &aObserver,
TIntaCameraIndex
)[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.

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

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 & aObserverReference to class derived from MCameraObserver designed to receive notification of asynchronous event completion.
TInt aCameraIndexIndex from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.

PowerOff()

voidPowerOff()[pure virtual]

Synchronous function for switching off camera power.

PowerOn()

voidPowerOn()[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)

voidPrepareImageCaptureL(TFormataImageFormat,
TIntaSizeIndex
)[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 aImageFormatThe image format.
TInt aSizeIndexSize index.

PrepareImageCaptureL(TFormat, TInt, const TRect &)

voidPrepareImageCaptureL(TFormataImageFormat,
TIntaSizeIndex,
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 aImageFormatThe image format.
TInt aSizeIndexSize index.
const TRect & aClipRectThe rectangle to which the image is to be clipped.

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

voidPrepareVideoCaptureL(TFormataFormat,
TIntaSizeIndex,
TIntaRateIndex,
TIntaBuffersToUse,
TIntaFramesPerBuffer
)[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 aFormatFormat must be one of the video frame formats supported (see TCameraInfo::iVideoFrameFormatsSupported).
TInt aSizeIndexSize index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive.
TInt aRateIndexThe rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.
TInt aBuffersToUseThe number of discrete buffers to use.
TInt aFramesPerBufferHow 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 &)

voidPrepareVideoCaptureL(TFormataFormat,
TIntaSizeIndex,
TIntaRateIndex,
TIntaBuffersToUse,
TIntaFramesPerBuffer,
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 aFormatFormat must be one of the video frame formats supported (see TCameraInfo::iVideoFrameFormatsSupported).
TInt aSizeIndexSize index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive.
TInt aRateIndexThe rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.
TInt aBuffersToUseThe number of discrete buffers to use.
TInt aFramesPerBufferHow 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 & aClipRectThe rectangle to which the image is to be clipped.

Release()

voidRelease()[pure virtual]

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

Reserve()

voidReserve()[pure virtual]

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

Calls MCameraObserver:: ReserveComplete() when complete.

SetBrightnessL(TInt)

voidSetBrightnessL(TIntaBrightness)[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 aBrightnessThe required brightness adjustment.

SetContrastL(TInt)

voidSetContrastL(TIntaContrast)[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 aContrastRequired contrast value. See TCameraInfo::iContrastSupported

SetDigitalZoomFactorL(TInt)

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

SetExposureL(TExposure)

voidSetExposureL(TExposureaExposure = 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 = EExposureAutoThe required exposure adjustment.

SetFlashL(TFlash)

voidSetFlashL(TFlashaFlash = 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 = EFlashNoneThe required flash mode.

SetJpegQuality(TInt)

voidSetJpegQuality(TIntaQuality)[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 aQualityThe quality value to use, clamped to the range 1 to 100.

SetViewFinderMirrorL(TBool)

voidSetViewFinderMirrorL(TBoolaMirror)[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 aMirrorETrue to set mirroring on, EFalse to set mirroring off.

SetWhiteBalanceL(TWhiteBalance)

voidSetWhiteBalanceL(TWhiteBalanceaWhiteBalance = 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 = EWBAutoThe required white balance adjustment.

SetZoomFactorL(TInt)

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

StartVideoCapture()

voidStartVideoCapture()[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 &)

voidStartViewFinderBitmapsL(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 & aSizeOn return, the size used.

StartViewFinderBitmapsL(TSize &, TRect &)

voidStartViewFinderBitmapsL(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 & aSizeOn return, the size used.
TRect & aClipRectRequired clip rectangle. May be modified if, for example, the camera only supports certain byte alignments.

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

voidStartViewFinderDirectL(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 & aWsWindow server session.
CWsScreenDevice & aScreenDeviceScreen device.
RWindowBase & aWindowDisplayable window.
TRect & aScreenRectPortion 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 &)

voidStartViewFinderDirectL(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 & aWsWindow server session.
CWsScreenDevice & aScreenDeviceScreen device.
RWindowBase & aWindowDisplayable window.
TRect & aScreenRectPortion 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 & aClipRectThe rectangle to which the screen will be clipped.

StartViewFinderL(TFormat, TSize &)

voidStartViewFinderL(TFormataImageFormat,
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 aImageFormatThe image format requested by the client.
TSize & aSizeOn return, the size used.

StartViewFinderL(TFormat, TSize &, TRect &)

voidStartViewFinderL(TFormataImageFormat,
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 aImageFormatThe image format.
TSize & aSizeOn return, the size used.
TRect & aClipRectRequired clip rectangle. May be modified if, for example, the camera only supports certain byte alignments.

StopVideoCapture()

voidStopVideoCapture()[pure virtual]

Stops video capture.

StopViewFinder()

voidStopViewFinder()[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.

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

ViewFinderActive()

TBool ViewFinderActive()const [pure virtual]

Queries whether the view finder is active.

ETrue if the view finder is active. EFalse if the view finder is not 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.

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

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.

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.

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.