|
|
|
Location:
ECam.h
Link against: ecam.lib
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).
CBase - Base class for all classes to be instantiated on the heapCCamera - Base class for camera devicesDefined in CCamera:
Brightness(), BuffersInUse(), CCameraAdvancedSettings, CCameraImageProcessing, CCameraPresets, CameraInfo(), CamerasAvailable(), CancelCaptureImage(), CaptureImage(), Contrast(), CustomInterface(), DigitalZoomFactor(), EBrightnessAuto, EContrastAuto, EExposureAperturePriority, EExposureAuto, EExposureBacklight, EExposureBeach, EExposureCenter, EExposureInfra, EExposureManual, EExposureNight, EExposureProgram, EExposureShutterPriority, EExposureSnow, EExposureSport, EExposureSuperNight, EExposureVeryLong, EFlashAuto, EFlashFillIn, EFlashForced, EFlashManual, EFlashNone, EFlashRedEyeReduce, EFlashSlowFrontSync, EFlashSlowRearSync, EFormat16BitRGB565, EFormat16bitRGB444, EFormat32BitRGB888, EFormatExif, EFormatFbsBitmapColor16M, EFormatFbsBitmapColor16MU, EFormatFbsBitmapColor4K, EFormatFbsBitmapColor64K, EFormatJpeg, EFormatMonochrome, EFormatUserDefined, EFormatYUV420Interleaved, EFormatYUV420Planar, EFormatYUV420SemiPlanar, EFormatYUV422, EFormatYUV422Reversed, EFormatYUV444, EWBAuto, EWBBeach, EWBCloudy, EWBDaylight, EWBFlash, EWBFluorescent, EWBManual, EWBShade, EWBSnow, EWBTungsten, EnumerateCaptureSizes(), EnumerateVideoFrameRates(), EnumerateVideoFrameSizes(), Exposure(), Flash(), FrameRate(), FramesPerBuffer(), GetFrameSize(), Handle(), JpegQuality(), NewDuplicateL(), NewDuplicateL(), NewL(), NewL(), PowerOff(), PowerOn(), PrepareImageCaptureL(), PrepareImageCaptureL(), PrepareVideoCaptureL(), PrepareVideoCaptureL(), Release(), Reserve(), SetBrightnessL(), SetContrastL(), SetDigitalZoomFactorL(), SetExposureL(), SetFlashL(), SetJpegQuality(), SetViewFinderMirrorL(), SetWhiteBalanceL(), SetZoomFactorL(), StartVideoCapture(), StartViewFinderBitmapsL(), StartViewFinderBitmapsL(), StartViewFinderDirectL(), StartViewFinderDirectL(), StartViewFinderL(), StartViewFinderL(), StopVideoCapture(), StopViewFinder(), TBrightness, TContrast, TExposure, TFlash, TFormat, TWhiteBalance, VideoCaptureActive(), ViewFinderActive(), ViewFinderMirror(), WhiteBalance(), ZoomFactor()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
| Capability: | UserEnvironment | An application that creates a CCamera object must have the UserEnvironment capability. |
| Capability: | MultimediaDD | The priority values (aPriority) of two clients are only compared if they both have the same MultimediaDD capability value. If one client has MultimediaDD capability and other does not, then the client with MultimediaDD capability will always be given greater priority, irrespective of the aPriority value. |
static IMPORT_C CCamera *NewL(MCameraObserver2 &aObserver, TInt aCameraIndex, TInt aPriority);
Creates an object representing a camera.
|
|
|
| Capability: | UserEnvironment | An application that creates a CCamera object must have the UserEnvironment capability. |
static IMPORT_C CCamera *NewL(MCameraObserver &aObserver, TInt aCameraIndex);
Creates an object representing a camera.
|
|
|
static IMPORT_C TInt CamerasAvailable();
Determines the number of cameras on the device.
|
| Capability: | UserEnvironment | An application that creates a CCamera object must have the UserEnvironment capability. |
static IMPORT_C CCamera *NewDuplicateL(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.
|
|
|
| Capability: | UserEnvironment | An application that creates a CCamera object must have the UserEnvironment capability. |
static IMPORT_C CCamera *NewDuplicateL(MCameraObserver &aObserver, TInt aCameraHandle);
Duplicates the original camera object for use by, for example, multimedia systems.
|
|
|
virtual void CameraInfo(TCameraInfo &aInfo) const=0;
Gets information about the camera device.
|
virtual void Reserve()=0;
Asynchronous function that performs any required initialisation and reserves the camera for exclusive use.
Calls MCameraObserver:: ReserveComplete() when complete.
virtual void Release()=0;
De-initialises the camera, allowing it to be used by other clients.
virtual void PowerOn()=0;
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.
virtual TInt Handle()=0;
Gets the device-unique handle of this camera object.
|
virtual void SetZoomFactorL(TInt aZoomFactor=0)=0;
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.
|
virtual TInt ZoomFactor() const=0;
Gets the currently set zoom factor.
|
virtual void SetDigitalZoomFactorL(TInt aDigitalZoomFactor=0)=0;
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.
|
virtual TInt DigitalZoomFactor() const=0;
Gets the currently set digital zoom factor.
|
virtual void SetContrastL(TInt aContrast)=0;
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.
|
virtual TInt Contrast() const=0;
Gets the currently set contrast value.
|
virtual void SetBrightnessL(TInt aBrightness)=0;
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.
|
virtual TInt Brightness() const=0;
Gets the currently set brightness adjustment value.
|
virtual void SetFlashL(TFlash aFlash=EFlashNone)=0;
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.
|
virtual TFlash Flash() const=0;
Gets the currently set flash mode.
|
virtual void SetExposureL(TExposure aExposure=EExposureAuto)=0;
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.
|
virtual TExposure Exposure() const=0;
Gets the currently set exposure setting value.
|
virtual void SetWhiteBalanceL(TWhiteBalance aWhiteBalance=EWBAuto)=0;
Sets the white balance adjustment of the device.
No effect if this is not supported, see TCameraInfo::iWhiteBalanceModesSupported.
|
|
virtual TWhiteBalance WhiteBalance() const=0;
Gets the currently set white balance adjustment value.
|
virtual void StartViewFinderDirectL(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow, TRect &aScreenRect)=0;
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.
|
|
virtual void StartViewFinderDirectL(RWsSession &aWs, CWsScreenDevice &aScreenDevice, RWindowBase &aWindow, TRect &aScreenRect, TRect &aClipRect)=0;
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.
|
|
virtual void StartViewFinderBitmapsL(TSize &aSize)=0;
Starts transfer of view finder data.
Bitmaps are returned by MCameraObserver::ViewFinderFrameReady().
|
|
virtual void StartViewFinderBitmapsL(TSize &aSize, TRect &aClipRect)=0;
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.
|
|
virtual void StartViewFinderL(TFormat aImageFormat, TSize &aSize)=0;
Starts transfer of view finder data.
Picture data is returned by MCameraObserver2::ViewFinderReady().
|
|
virtual void StartViewFinderL(TFormat aImageFormat, TSize &aSize, TRect &aClipRect)=0;
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.
|
|
virtual TBool ViewFinderActive() const=0;
Queries whether the view finder is active.
|
virtual void SetViewFinderMirrorL(TBool aMirror)=0;
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.
|
|
virtual TBool ViewFinderMirror() const=0;
Gets whether view finder mirroring is active.
|
virtual void PrepareImageCaptureL(TFormat aImageFormat, TInt aSizeIndex)=0;
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.
|
|
virtual void PrepareImageCaptureL(TFormat aImageFormat, TInt aSizeIndex, const TRect &aClipRect)=0;
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.
|
|
virtual void CaptureImage()=0;
Asynchronously performs still image capture.
Calls MCameraObserver::ImageReady() when complete.
virtual void EnumerateCaptureSizes(TSize &aSize, TInt aSizeIndex, TFormat aFormat) const=0;
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.
|
virtual void PrepareVideoCaptureL(TFormat aFormat, TInt aSizeIndex, TInt aRateIndex, TInt aBuffersToUse, TInt aFramesPerBuffer)=0;
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.
|
|
virtual void PrepareVideoCaptureL(TFormat aFormat, TInt aSizeIndex, TInt aRateIndex, TInt aBuffersToUse, TInt aFramesPerBuffer, const TRect &aClipRect)=0;
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.
|
|
virtual void StartVideoCapture()=0;
Starts capturing video.
Calls MCameraObserver::FrameBufferReady() when each buffer has been filled with the required number of frames, as set by PrepareVideoCaptureL().
virtual TBool VideoCaptureActive() const=0;
Tests whether video capture is active.
|
virtual void EnumerateVideoFrameSizes(TSize &aSize, TInt aSizeIndex, TFormat aFormat) const=0;
Enumerates through the available video frame sizes, based on the specified size index and format.
|
virtual void EnumerateVideoFrameRates(TReal32 &aRate, TInt aRateIndex, TFormat aFormat, TInt aSizeIndex, TExposure aExposure=EExposureAuto) const=0;
Enumerates through the available video frame rates, based on the specified rate index, video frame format, size index and exposure mode.
|
virtual void GetFrameSize(TSize &aSize) const=0;
Gets the frame size currently in use.
|
virtual TReal32 FrameRate() const=0;
Gets the frame rate currently in use.
|
virtual TInt BuffersInUse() const=0;
Gets the number of buffers currently in use.
|
virtual TInt FramesPerBuffer() const=0;
Gets the number of frames per buffer currently in use.
|
virtual void SetJpegQuality(TInt aQuality)=0;
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.
|
virtual TInt JpegQuality() const=0;
Gets the currently set jpeg quality value.
Returns 0 if not supported.
|
virtual TAny *CustomInterface(TUid aInterface)=0;
Gets a custom interface. The client has to cast the returned pointer to the appropriate type.
|
|
class CCameraAdvancedSettings : public CBase;
CCamera advanced settings class exposes an API for controlling individually digital camera advanced settings. These settings directly relate to the image acquisition phase both for still images and video.
Note: This class is not intended for sub-classing and used to standardise existing varieties of implementations.
CBase - Base class for all classes to be instantiated on the heapCCamera::CCameraAdvancedSettings - Defined in CCamera::CCameraAdvancedSettings:
Aperture(), ApertureExposureLockOn(), AutoFocusArea(), AutoFocusLockOn(), AutoFocusType(), AutomaticSizeSelectionChangeOn(), BracketMode(), BracketParameter(), BracketParameterAperture, BracketParameterAutoFocus, BracketStep(), BurstImages(), CameraIndex(), CameraType(), CameraType(), ContinuousAutoFocusTimeout(), DigitalZoom(), DriveMode(), EAutoFocusTypeAuto, EAutoFocusTypeContinuous, EAutoFocusTypeMultiAreaCentered, EAutoFocusTypeOff, EAutoFocusTypeSingle, EAutoFocusTypeSingleArea, EBracketMode3Image, EBracketMode5Image, EBracketModeOff, EBracketParameterColourBalance, EBracketParameterExposure, EBracketParameterFlashPower, EBracketParameterNone, EBracketStepLarge, EBracketStepMedium, EBracketStepNonConfig, EBracketStepSmall, ECameraOnBoard, ECameraPluggable, ECameraUnknown, EDriveModeAuto, EDriveModeBracket, EDriveModeBracketMerge, EDriveModeBurst, EDriveModeContinuous, EDriveModeSingleShot, EDriveModeTimeLapse, EDriveModeTimed, EEPixelAspect11To10, EEPixelAspect59To54, EFocusModeAuto, EFocusModeFixed, EFocusModeManual, EFocusModeUnknown, EFocusRangeAuto, EFocusRangeMacro, EFocusRangeNormal, EFocusRangePortrait, EFocusRangeSuperMacro, EFocusRangeTele, EMeteringModeAuto, EMeteringModeCenterWeighted, EMeteringModeEvaluative, EMeteringModeSpot, EPictureOrientationLandscape, EPictureOrientationPortrait, EPictureOrientationSquare, EPictureOrientationUnknown, EPixelAspect12To11, EPixelAspect1To1, EPixelAspectUnknown, EStabilizationAuto, EStabilizationComplexityAuto, EStabilizationComplexityHigh, EStabilizationComplexityLow, EStabilizationComplexityMedium, EStabilizationFine, EStabilizationMedium, EStabilizationModeAuto, EStabilizationModeHorizontal, EStabilizationModeManual, EStabilizationModeOff, EStabilizationModeRotation, EStabilizationModeVertical, EStabilizationOff, EStabilizationStrong, EWBColorTemperature, EWBRgb, EWBUnknown, EYuvRangeFull, EYuvRangeUnknown, EYuvRangeVideoCropped, ExposureCompensation(), ExposureCompensationStep(), ExposureLockOn(), ExposureMode(), FlashCompensation(), FlashCompensationStep(), FlashMode(), FocusDistance(), FocusMode(), FocusRange(), GetActiveSettingsL(), GetAperturesL(), GetBracketMerge(), GetCurrentFocusModeStepsL(), GetDigitalZoomStepsL(), GetDisabledSettingsL(), GetExposureCompensationRangeInSteps(), GetExposureCompensationStepsL(), GetFlashCompensationRangeInSteps(), GetFlashCompensationStepsL(), GetManualFlashPowerLevelsL(), GetMinFocalLength(), GetOpticalZoomStepsL(), GetShutterSpeedsL(), GetSupportedContinuousAutoFocusTimeoutsL(), GetSupportedIsoRatesL(), GetSupportedSettingsL(), GetTimeLapse(), GetTimeLapsePeriodRange(), GetTimerIntervalsL(), GetWBRgbValue(),