CCamera Class Reference

#include <ecam.h>

Link against: tsu_ecm_adv.lib

class CCamera : public CBase

Inherits from

  • CCamera
    Public Member Enumerations
    enumTBrightness { EBrightnessAuto }
    enumTContrast { EContrastAuto }
    enumTExposure { EExposureAuto, EExposureNight, EExposureBacklight, EExposureCenter, ..., EExposureInfra }
    enumTFlash { EFlashNone, EFlashAuto, EFlashForced, EFlashFillIn, ..., EFlashVideoLight }
    enumTFormat { EFormatMonochrome, EFormat16bitRGB444, EFormat16BitRGB565, EFormat32BitRGB888, ..., EFormatYUV222ReversedV2 }
    enumTWhiteBalance { EWBAuto, EWBDaylight, EWBCloudy, EWBTungsten, ..., EWBDaylightUnderWater }
    Public Member Functions
    pure virtual TInt Brightness()
    pure virtual TInt BuffersInUse()
    pure virtual voidCameraInfo(TCameraInfo &)
    IMPORT_C TIntCameraVersion()
    IMPORT_C TIntCamerasAvailable()
    pure virtual voidCancelCaptureImage()
    pure virtual voidCaptureImage()
    pure virtual TInt Contrast()
    pure virtual TAny *CustomInterface(TUid)
    pure virtual TInt DigitalZoomFactor()
    pure virtual voidEnumerateCaptureSizes(TSize &, TInt, TFormat)
    pure virtual voidEnumerateVideoFrameRates(TReal32 &, TInt, TFormat, TInt, TExposure)
    pure virtual voidEnumerateVideoFrameSizes(TSize &, TInt, TFormat)
    pure virtual TExposure Exposure()
    pure virtual TFlash Flash()
    pure virtual TReal32 FrameRate()
    pure virtual TInt FramesPerBuffer()
    pure virtual voidGetFrameSize(TSize &)
    pure virtual TInt Handle()
    pure virtual 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)
    pure virtual voidPowerOff()
    pure virtual voidPowerOn()
    pure virtual voidPrepareImageCaptureL(TFormat, TInt)
    pure virtual voidPrepareImageCaptureL(TFormat, TInt, const TRect &)
    pure virtual voidPrepareVideoCaptureL(TFormat, TInt, TInt, TInt, TInt)
    pure virtual voidPrepareVideoCaptureL(TFormat, TInt, TInt, TInt, TInt, const TRect &)
    pure virtual voidRelease()
    pure virtual voidReserve()
    pure virtual voidSetBrightnessL(TInt)
    pure virtual voidSetContrastL(TInt)
    pure virtual voidSetDigitalZoomFactorL(TInt)
    pure virtual voidSetExposureL(TExposure)
    pure virtual voidSetFlashL(TFlash)
    pure virtual voidSetJpegQuality(TInt)
    pure virtual voidSetViewFinderMirrorL(TBool)
    pure virtual voidSetWhiteBalanceL(TWhiteBalance)
    pure virtual voidSetZoomFactorL(TInt)
    pure virtual voidStartVideoCapture()
    pure virtual voidStartViewFinderBitmapsL(TSize &)
    pure virtual voidStartViewFinderBitmapsL(TSize &, TRect &)
    pure virtual voidStartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &)
    pure virtual voidStartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &, TRect &)
    pure virtual voidStartViewFinderL(TFormat, TSize &)
    pure virtual voidStartViewFinderL(TFormat, TSize &, TRect &)
    pure virtual voidStopVideoCapture()
    pure virtual voidStopViewFinder()
    pure virtual TBool VideoCaptureActive()
    pure virtual TBool ViewFinderActive()
    pure virtual TBool ViewFinderMirror()
    pure virtual TWhiteBalance WhiteBalance()
    pure virtual TInt ZoomFactor()
    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()

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

    Member Enumeration Documentation

    Enum TBrightness

    Specifies whether brightness is set automatically.

    EnumeratorValueDescription
    EBrightnessAutoKMinTInt

    Sets the brightness automatically.

    Enum TContrast

    Specifies whether contrast is set automatically.

    EnumeratorValueDescription
    EContrastAutoKMinTInt

    Sets the contrast automatically.

    Enum TExposure

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

    EnumeratorValueDescription
    EExposureAuto0x0000

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

    EExposureNight0x0001

    Night-time setting for long exposures.

    EExposureBacklight0x0002

    Backlight setting for bright backgrounds.

    EExposureCenter0x0004

    Centered mode for ignoring surroundings.

    EExposureSport0x0008

    Sport setting for very short exposures.

    EExposureVeryLong0x0010

    Generalised setting for very long exposures.

    EExposureSnow0x0020

    Snow setting for daylight exposure.

    EExposureBeach0x0040

    Beach setting for daylight exposure with reflective glare.

    EExposureProgram0x0080

    Programmed exposure setting.

    EExposureAperturePriority0x0100

    Aperture setting is given priority.

    EExposureShutterPriority0x0200

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

    EExposureManual0x0400

    User selectable exposure value setting.

    EExposureSuperNight0x0800

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

    EExposureInfra0x1000

    Exposure for infra-red sensor on the camera

    Enum TFlash

    Specifies the type of flash.

    EnumeratorValueDescription
    EFlashNone0x0000

    No flash, always supported.

    EFlashAuto0x0001

    Flash will automatically fire when required.

    EFlashForced0x0002

    Flash will always fire.

    EFlashFillIn0x0004

    Reduced flash for general lighting

    EFlashRedEyeReduce0x0008

    Red-eye reduction mode.

    EFlashSlowFrontSync0x0010

    Flash at the moment when shutter opens.

    EFlashSlowRearSync0x0020

    Flash at the moment when shutter closes.

    EFlashManual0x0040

    User configurable setting

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

    EnumeratorValueDescription
    EFormatMonochrome0x0001

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

    EFormat16bitRGB4440x0002

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

    EFormat16BitRGB5650x0004

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

    EFormat32BitRGB8880x0008

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

    EFormatJpeg0x0010

    JFIF JPEG.

    EFormatExif0x0020

    EXIF JPEG

    EFormatFbsBitmapColor4K0x0040

    CFbsBitmap object with display mode EColor4K.

    EFormatFbsBitmapColor64K0x0080

    CFbsBitmap object with display mode EColor64K.

    EFormatFbsBitmapColor16M0x0100

    CFbsBitmap object with display mode EColor16M.

    EFormatUserDefined0x0200

    Implementation dependent.

    EFormatYUV420Interleaved0x0400

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

    EFormatYUV420Planar0x0800

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

    EFormatYUV4220x1000

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

    EFormatYUV422Reversed0x2000

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

    EFormatYUV4440x4000

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

    EFormatYUV420SemiPlanar0x8000

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

    EFormatFbsBitmapColor16MU0x00010000

    CFbsBitmap object with display mode EColor16MU.

    EFormatMJPEG0x00020000
    Motion JPEG for video
    Note:

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

    EFormatEncodedH2640x00040000
    Compressed H264 video format.
    Note:

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

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

    EnumeratorValueDescription
    EWBAuto0x0000

    Set white balance automatically. Default, always supported.

    EWBDaylight0x0001

    Normal daylight.

    EWBCloudy0x0002

    Overcast daylight.

    EWBTungsten0x0004

    Tungsten filament lighting.

    EWBFluorescent0x0008

    Fluorescent tube lighting

    EWBFlash0x0010

    Flash lighting.

    EWBSnow0x0020

    High contrast daylight primarily snowy

    EWBBeach0x0040

    High contrast daylight primarily near the sea

    EWBManual0x0080

    User configurable mode

    EWBShade0x0100

    Shade

    EWBAutoSkin0x0200

    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.

    EWBHorizon0x0400

    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.

    EWBDaylightUnderWater0x0800

    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.

    Member Function Documentation

    Brightness ( )

    TInt Brightness()const [pure virtual]

    Gets the currently set brightness adjustment value.

    Returns: The currently set brightness adjustment value.

    BuffersInUse ( )

    TInt BuffersInUse()const [pure virtual]

    Gets the number of buffers currently in use.

    Returns: The number of buffers currently in use.

    CameraInfo ( TCameraInfo & )

    voidCameraInfo(TCameraInfo &aInfo)const [pure virtual]

    Gets information about the camera device.

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

    Returns: Count of cameras present on the device.

    CancelCaptureImage ( )

    voidCancelCaptureImage()[pure virtual]

    Cancels the asynchronous still image capture.

    See also: CCamera::CCameraImageCapture

    CaptureImage ( )

    voidCaptureImage()[pure virtual]

    Asynchronously performs still image capture.

    Calls MCameraObserver::ImageReady() when complete.

    See also: CCamera::CCameraImageCapture CCamera::CCameraPreImageCaptureControl

    Contrast ( )

    TInt Contrast()const [pure virtual]

    Gets the currently set contrast value.

    Returns: 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.

    ParameterDescription
    aInterfaceThe Uid of the particular interface function required.

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

    DigitalZoomFactor ( )

    TInt DigitalZoomFactor()const [pure virtual]

    Gets the currently set digital zoom factor.

    Returns: 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.

    ParameterDescription
    aSizeImage size.
    aSizeIndexSize index.
    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.

    ParameterDescription
    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.
    aRateIndexThe rate index. Must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.
    aFormatThe format.
    aSizeIndexThe size index.
    aExposureThe 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.

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

    Exposure ( )

    TExposure Exposure()const [pure virtual]

    Gets the currently set exposure setting value.

    Returns: 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.

    See also: CCamera::CCameraAdvancedSettings::FlashMode()

    Returns: The currently set flash mode.

    FrameRate ( )

    TReal32 FrameRate()const [pure virtual]

    Gets the frame rate currently in use.

    Returns: The frame rate currently in use.

    FramesPerBuffer ( )

    TInt FramesPerBuffer()const [pure virtual]

    Gets the number of frames per buffer currently in use.

    Returns: The number of frames per buffer currently in use.

    GetFrameSize ( TSize & )

    voidGetFrameSize(TSize &aSize)const [pure virtual]

    Gets the frame size currently in use.

    ParameterDescription
    aSizeThe frame size currently in use.

    Handle ( )

    TInt Handle()[pure virtual]

    Gets the device-unique handle of this camera object.

    Returns: 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.

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

    Returns: The currently set jpeg quality value.

    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.

    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

    ParameterDescription
    aObserverReference to class derived from MCameraObserver2 designed to receive notification of asynchronous event completion.
    aCameraIndexIndex from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.
    aPriorityValue from -100 to 100 indicating relative priority of client to use camera.

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

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

    ParameterDescription
    aObserverReference to an observer.
    aCameraHandleHandle of an existing camera object.

    Returns: Duplicate of the original camera object.

    NewDuplicateL ( MCameraObserver2 &, TInt )

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

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

    ParameterDescription
    aObserverReference to an observer.
    aCameraHandleHandle of an existing camera object.

    Returns: Duplicate of the original 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.
    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.

    ParameterDescription
    aObserverReference to an observer.
    aCameraHandleHandle of an existing camera object.

    Returns: Duplicate of the original camera object.

    NewL ( MCameraObserver2 &, TInt, TInt )

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

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

    ParameterDescription
    aObserverReference to class derived from MCameraObserver2 designed to receive notification of asynchronous event completion.
    aCameraIndexIndex from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.
    aPriorityValue from -100 to 100 indicating relative priority of client to use camera.

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

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

    ParameterDescription
    aObserverReference to class derived from MCameraObserver designed to receive notification of asynchronous event completion.
    aCameraIndexIndex from 0 to CamerasAvailable()-1 inclusive specifying the camera device to use.

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

    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.

    See also: CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)

    ParameterDescription
    aImageFormatThe image format.
    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.

    See also: CCamera::CCameraPreImageCaptureControl::PrepareImageCapture(TPrepareImageParameters aPrepareImageParameters)

    ParameterDescription
    aImageFormatThe image format.
    aSizeIndexSize index.
    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.

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

    ParameterDescription
    aFormatFormat must be one of the video frame formats supported (see TCameraInfo::iVideoFrameFormatsSupported).
    aSizeIndexSize index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive.
    aRateIndexThe rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.
    aBuffersToUseThe number of discrete buffers to use.
    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.

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

    ParameterDescription
    aFormatFormat must be one of the video frame formats supported (see TCameraInfo::iVideoFrameFormatsSupported).
    aSizeIndexSize index must be in the range 0 to TCameraInfo::iNumVideoFrameSizesSupported-1 inclusive.
    aRateIndexThe rate must be in the range 0 to TCameraInfo::iNumVideoFrameRatesSupported-1 inclusive.
    aBuffersToUseThe number of discrete buffers to use.
    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.
    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.

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

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

    ParameterDescription
    aDigitalZoomFactorThe 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.

    ParameterDescription
    aExposureThe 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.

    ParameterDescription
    aFlashThe 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.

    See also: CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters::iImageMaxMemorySize

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

    See also: CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

    ParameterDescription
    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.
    ParameterDescription
    aWhiteBalanceThe 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.

    ParameterDescription
    aZoomFactorRequired 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.

    See also: CCamera::CCameraClientViewFinder

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

    See also: CCamera::CCameraClientViewFinder

    ParameterDescription
    aSizeOn return, the size used.
    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.

    See also: CCamera::CCameraV2DirectViewFinder

    ParameterDescription
    aWsWindow server session.
    aScreenDeviceScreen device.
    aWindowDisplayable window.
    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.

    See also: CCamera::CCameraClientViewFinder

    ParameterDescription
    aWsWindow server session.
    aScreenDeviceScreen device.
    aWindowDisplayable window.
    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.
    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.

    See also: CCamera::CCameraClientViewFinder

    ParameterDescription
    aImageFormatThe image format requested by the client.
    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.

    See also: CCamera::CCameraClientViewFinder

    ParameterDescription
    aImageFormatThe image format.
    aSizeOn return, the size used.
    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.

    See also: CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

    VideoCaptureActive ( )

    TBool VideoCaptureActive()const [pure virtual]

    Tests whether video capture is active.

    Returns: 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.

    Note:

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

    See also: CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

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

    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.

    See also: CCamera::CCameraV2DirectViewFinder CCamera::CCameraClientViewFinder

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

    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

    See also: CCamera::CCameraAdvancedSettings::WhiteBalanceMode()

    Returns: The currently set white balance adjustment value.

    ZoomFactor ( )

    TInt ZoomFactor()const [pure virtual]

    Gets the currently set zoom factor.

    Returns: The currently set zoom factor.