MCameraPreImageCaptureControl Class Reference

class MCameraPreImageCaptureControl

Mixin class for implementation by providers of the PreImageCaptureControl Camera Extension API. PreImageCaptureControl class exposes an API for controlling advanced still image related settings and control prior to capturing the images.

Member Functions Documentation

GetCaptureEventSupportInfoL(TUint &)

voidGetCaptureEventSupportInfoL(TUint &aSupportedDriveModes)const [pure virtual]

Retrieves whether the camera device is capable of providing capture event notification to the client. Client may take the responsibility of playing the capture sound after receiving the notification.

Note:

If capture event notification is supported, ECam implementation will use KUidECamEventImageCaptureEvent to notify clients that the image has been exposed to the camera sensor. Clients may play capture sound if they desire to do so.

leave
May leave with any error code.
CCamera::CCameraAdvancedSettings::TDriveMode

Parameters

TUint & aSupportedDriveModesA reference to bit-field of TUint which indicates the drive modes in which the capture event notification is supported. If aSupportedDriveModes =0, capture event notification is not supported.

GetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType &)

voidGetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType &aDirectSavingType)const [pure virtual]

Retrieves the type of direct saving currently used. This will be represented as a direct saving state as given by TDirectSavingType.

Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() callback to mark the completion of the image capture operation.

If EDirectSavingNotUsed, direct saving is not used. Images will be received in buffer MCameraImageBuffer through callback MCaptureImageObserver::ImageBufferReady().

If EDirectSavingHighResolutionFileOnly, direct saving to file option is currently used. But no cut down version of the image will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted().

If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down version of the image will be saved to another specified file. Callbacks used are MCaptureImageObserver:: ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for lower resolution image.

leave
May leave with any error code.
Note:

Direct saving to file will continue even if the client application gets closed for any reasons.

Parameters

CCamera::CCameraPreImageCaptureControl::TDirectSavingType & aDirectSavingTypeCurrent type of the direct saving.

GetDirectSnapshotSupportInfoL(TUint &)

voidGetDirectSnapshotSupportInfoL(TUint &aDirectSnapshotSupportInfo)const [pure virtual]

Retrieves information regarding the direct snapshot feature support. Direct Snapshot, if supported, can be created out of version2 direct viewfinder object only.

leave
May leave with any error code.

Parameters

TUint & aDirectSnapshotSupportInfoThis is a bit field providing supported direct snapshot of type TDirectSnapshotType

GetImageFormatsSupportedL(TUint &, const TSize &)

voidGetImageFormatsSupportedL(TUint &aImageFormatsSupported,
const TSize &aSize
)const [pure virtual]

Retrieves the supported image formats for a given resolution.

leave
May leave with any error code.

Parameters

TUint & aImageFormatsSupportedA bit field which retrieves the supported image formats for a given resolution. Formats have been defined as CCamera::TFormat
const TSize & aSizeThe resolution (or size) for which the total number of supported image formats have to be retrieved.

GetImageMaxMemorySizeL(TUint &)

voidGetImageMaxMemorySizeL(TUint &aMemorySize)const [pure virtual]

Get the maximum memory size in kilo bytes when encoding to the current format.

Note:

In case of JPEG, the maximum memory size will take preference over JPEG quality if the maximum memory size is not sufficient to achieve the desired quality. Refer CCamera::JpegQuality()

leave
May leave with any error code.

Parameters

TUint & aMemorySizeRetrieves the maximum memory size in kilo bytes.

GetImageMaxMemorySizeSettingSupportInfoL(TBool &)

voidGetImageMaxMemorySizeSettingSupportInfoL(TBool &aIsImageMaxMemorySizeSettingSupported)const [pure virtual]

Informs whether or not the setting of maximum memory size when encoding to the current format is supported.

leave
May leave with any error code.

Parameters

TBool & aIsImageMaxMemorySizeSettingSupportedETrue indicates that setting of maximum memory size is supported. EFalse indicates that setting of maximum memory size is not supported.

GetPixelAspectsSupportedL(TUint &, CCamera::TFormat, const TSize &)

voidGetPixelAspectsSupportedL(TUint &aPixelAspectsSupported,
CCamera::TFormataImageFormat,
const TSize &aSize
)const [pure virtual]

Retrieves the supported pixel aspect ratio for a given resolution in case of still image.

leave
May leave with any error code.

Parameters

TUint & aPixelAspectsSupportedA bit field which retrieves the supported pixel aspect ratio for a given resolution. Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio
CCamera::TFormat aImageFormatThe image format for which the supported pixel aspect ratio have to be retrieved.
const TSize & aSizeThe resolution (or size) for which the supported pixel aspect ratio have to be retrieved.

GetSupportedDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType &)

voidGetSupportedDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType &aSupportedDirectSavingType)const [pure virtual]

Retrieves information regarding the supported direct saving state. If used, still images are saved in files rather than providing clients the MCameraImageBuffer. Direct saving to file will continue even if the client application gets closed for any reasons.

If EDirectSavingHighResolutionFileOnly, direct saving to file is supported. But no cut down version of the image will be saved to file. Callback used is MCaptureImageObserver::ImageDirectSavingCompleted().

If EDirectSavingWithLowerResolutionFile, Direct saving to file is supported. Also, a cut down version of the image will be saved to another specified file. Callbacks used are MCaptureImageObserver::ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for lower resolution image.

leave
May leave with any error code.

Parameters

CCamera::CCameraPreImageCaptureControl::TDirectSavingType & aSupportedDirectSavingTypeRetrieves the enum specifying supported TDirectSavingType. If EDirectSavingNotUsed, direct saving not supported. Images will be received in buffer MCameraImageBuffer.

GetSupportedEmbeddedStillCaptureSettingsL(RArray< TUid > &)

voidGetSupportedEmbeddedStillCaptureSettingsL(RArray< TUid > &aSupportedEmbeddedStillCaptureSettings)const [pure virtual]

Retrieves the settings supported for embedded still captures. Possibilty exists that not all the settings supported for normal still image captures are supported for embedded still captures as well.

leave
May leave with any error code.

Parameters

RArray< TUid > & aSupportedEmbeddedStillCaptureSettingsArray of TUid which retrieves the supported embedded still captures. Empty list indicated that no settings are supported for embedded still captures.

GetSupportedProcessingOptionsL(TUint &)

voidGetSupportedProcessingOptionsL(TUint &aEcamProcessingOptionsSupported)const [pure virtual]

Retrieves the supported processing options.

leave
May leave with error code.

Parameters

TUint & aEcamProcessingOptionsSupportedBitfield containing the available processing options.

PrepareImageCapture(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters &, MCaptureImageObserver &)

voidPrepareImageCapture(const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters &aPrepareImageParameters,
MCaptureImageObserver &aCaptureImageObserver
)[pure virtual]

Performs setup and allocation of memory for image capture operation. Implementation creates a new CCameraImageCapture* object which reflects the prepare image parameters passed by the client. The callback MPreImageCaptureControlObserver:: PrepareImageComplete() passes the ownership of the CCameraImageCapture* object to the client.

This needs to be called every time client wishes to change prepare image parameters or if the client wishes to create a new CCameraImageCapture* object.

Note:

Next PrepareImageCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare.

Implementation will call CCameraImageCapture::CreateL(CCamera& aCamera, MCaptureImageObserver& aCaptureImageObserver) method and pass the CCameraImageCapture* to the client through the MPreImageCaptureControlObserver::PrepareImageComplete() callback.

If drive mode is EDriveModeTimeNudgeCapture the ECam implementation will immediately begin capturing images after creating a new CCameraImageCapture object. Once the client initiates image capture, the total amount of images requested by the client (specified by the client in TDriveModeDependentAttributes) will be returned to the client (via MCaptureImageObserver::ImageBufferReady()) or saved to file. The implementation should not create another instance of CCameraImageCapture whilst using this drive mode until the first instance is destroyed by the client.

CCamera::PrepareImageCaptureL(TFormat aImageFormat,TInt aSizeIndex)

Parameters

const CCamera::CCameraPreImageCaptureControl::TPrepareImageParameters & aPrepareImageParametersThe desired image parameters to be used for capturing still images using the CCameraImageCapture instance which would be passed by the implementation.
MCaptureImageObserver & aCaptureImageObserverThe Capture image observer which is needed by the implementation in order to pass it to the CCameraImageCapture while creating it.

Release()

voidRelease()[pure virtual]

Releases the interface.

SetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingType)

voidSetDirectSavingTypeL(CCamera::CCameraPreImageCaptureControl::TDirectSavingTypeaDirectSavingType)[pure virtual]

Instructs the ECam implementation to use the desired type of direct saving option as specifed by its state.

Whether or not the direct saving option is used, client will receive the MCaptureImageObserver::ImageCaptureComplete() callback to mark the completion of the image capture operation.

If EDirectSavingNotUsed, direct saving will not be used. Images will be received in buffer MCameraImageBuffer through callback MCaptureImageObserver::ImageBufferReady().

If EDirectSavingHighResolutionFileOnly, direct saving to file option will be used. But no cut down version of the image will be saved to file. Callback to be used is MCaptureImageObserver::ImageDirectSavingCompleted().

If EDirectSavingWithLowerResolutionFile, apart from direct saving to file option for the actual image, a cut down version of the image will be saved to another specified file. Callbacks to be used are MCaptureImageObserver:: ImageDirectSavingCompleted() for actual image and MCaptureImageObserver::CutDownImageDirectSavingCompleted() for lower resolution image.

leave
May leave with any error code.
Note:

Clients need to provide the filename before capturing still images under direct saving option. Callback MCaptureImageObserver::ImageDirectSavingCompleted() may provide error KErrNotReady if filenames are not provided before images are captured for direct saving. Similarly, if cut down version of image is also to be saved to file, MCaptureImageObserver::CutDownImageDirectSavingCompleted() may provide error KErrNotReady if filenames are not provided before hand.

Direct saving to file will continue even if the client application gets closed for any reasons.

Parameters

CCamera::CCameraPreImageCaptureControl::TDirectSavingType aDirectSavingTypeThe desired type of the direct saving.

SetLowerResolutionSequentialImageFilenameL(const TDesC8 &, TInt)

voidSetLowerResolutionSequentialImageFilenameL(const TDesC8 &aLowerResolutionFilename,
TIntaStartingSequenceNumber
)[pure virtual]

Provides the base name for file used to save cut down version of the original images. If there are sequential images, files will be created by implementation with names appearing as base name and appended by increasing integers which would start from aStartingSequenceNumber. This is used for the cut down version of the original image.

leave
May leave with any error code.
Note:

It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with zeroes.

Parameters

const TDesC8 & aLowerResolutionFilenameA const TDesC8&: Base name for files which ECam implementation needs to create in order to collect the cut down version of every sequential image.
TInt aStartingSequenceNumberThe starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep on increasing for every individual still image capture.

SetPreImageCaptureControlObserver(MPreImageCaptureControlObserver &)

voidSetPreImageCaptureControlObserver(MPreImageCaptureControlObserver &aPreImageCaptureControlObserver)[pure virtual]

The observer for the pre image capture control is passed to the implementation for passing callbacks on it.

Parameters

MPreImageCaptureControlObserver & aPreImageCaptureControlObserverThe reference to the pre image capture control observer.

SetSequentialImageFilenameL(const TDesC8 &, TInt)

voidSetSequentialImageFilenameL(const TDesC8 &aFilename,
TIntaStartingSequenceNumber
)[pure virtual]

Provides the base name for file used to save images. If there are sequential images, files will be created by implementation with names appearing as base name and appended by increasing integers which would start from aStartingSequenceNumber. This is used for the original image only, but not for the cut down version of the original image.

leave
May leave with any error code.
Note:

It is upto the implementation how many digits it uses for sequence number. Accordingly, padding will be done with zeroes.

Parameters

const TDesC8 & aFilenameA const TDesC8&: Base name for files which ECam implementation needs to create in order to collect every sequential image.
TInt aStartingSequenceNumberThe starting sequence number which will be appended to the base name 'aFilename'. The sequence number will keep on increasing for every individual still image capture.