MCameraSnapshot Class Reference

class MCameraSnapshot

This is a mixin class to be implemented by providers of the extension API for the camera snapshot.

Note:

This class is intended for sub classing by licensees only.

CCamera::CCameraSnapshot

Member Functions Documentation

IsSnapshotActive()

TBool IsSnapshotActive()const [pure virtual]

Use void MCameraSnapshot2::GetSnapshotStatusL(CCamera::CCameraSnapshot::TSnapshotState& aSnapshotState) const;

Determines if the snapshot feature is active.

ETrue, if StartSnapshot() has been called, otherwise EFalse.

PrepareSnapshotL(CCamera::TFormat, const TPoint &, const TSize &, const TRgb &, TBool)

voidPrepareSnapshotL(CCamera::TFormataFormat,
const TPoint &aPosition,
const TSize &aSize,
const TRgb &aBgColor,
TBoolaMaintainAspectRatio
)[pure virtual]

Use void MCameraSnapshot2::PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);

Sets the properties of the snapshot data including the background colour and the position of the snapshot.

leave

KErrNotSupported if the specified image format is not supported; also any system wide error.

Parameters

CCamera::TFormat aFormatThe image format that the snapshot must have.
const TPoint & aPositionThe top left corner position (in pixels) which determines the layout of the snapshot image within the dimensions provided by the aSize parameter when the snapshot has been scaled maintaining its aspect ratio. See also SetPositionL().
const TSize & aSizeThe size of the snapshot in pixels.
const TRgb & aBgColorThe background colour to be used if the snapshot has been scaled (maintaining its aspect ratio) and does not fully fill the dimension provided by the aSize parameter. See also SetBgColorL().
TBool aMaintainAspectRatioSet to ETrue if the aspect ratio of the snapshot image must be maintained when scaling down.

PrepareSnapshotL(CCamera::TFormat, const TSize &, TBool)

voidPrepareSnapshotL(CCamera::TFormataFormat,
const TSize &aSize,
TBoolaMaintainAspectRatio
)[pure virtual]

Use void MCameraSnapshot2::PrepareSnapshotL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);

Sets the properties of the snapshot data, excluding the background colour and the position of the snapshot. This method can be used when the client wishes to determine the layout and background colour after the snapshot image has been generated. See also SetPositionL() and SetBgColorL().

leave

KErrNotSupported if the specified image format is not supported; also any system wide error.

Parameters

CCamera::TFormat aFormatThe image format that the snapshot must have.
const TSize & aSizeThe size of the snapshot in pixels.
TBool aMaintainAspectRatioSet to ETrue if the aspect ratio of the snapshot image must be maintained when scaling down.

Release()

voidRelease()[pure virtual]

Destroys the object of this class on the ECam implementation. This function is called from the destructor of CCamera::CCameraSnapshot.

SetBgColorL(const TRgb &)

voidSetBgColorL(const TRgb &aBgColor)[pure virtual]

Use void MCameraSnapshot2::SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);

Sets the background colour to be used if the snapshot has been scaled (maintaining its aspect ratio) and does not fully fill the snapshot size as specified in PrepareSnapshot().

leave

KErrNotSupported if the specified image format is not supported; also any system wide error.

Parameters

const TRgb & aBgColorThe new background colour.

SetPositionL(const TPoint &)

voidSetPositionL(const TPoint &aPosition)[pure virtual]

Use void MCameraSnapshot2::SetSnapshotParametersL(const CCamera::CCameraSnapshot::TSnapshotParameters& aSnapshotParameters);

Sets the top left corner position (in pixels), where the snapshot should be laid out after scaling down (maintaining its aspect ratio). The position is within the dimensions provided by the snapshot size specified in PrepareSnapshot().

leave

KErrNotSupported if the specified image format is not supported; also any system wide error.

Parameters

const TPoint & aPositionThe top left corner position in pixels of the snapshot.

SnapshotDataL(RArray< TInt > &)

MCameraBuffer &SnapshotDataL(RArray< TInt > &aFrameIndexOrder)[pure virtual]

Use callbacks: MCaptureImageObserver::ClientSnapshotForImageReady and MCaptureVideoObserver:: ClientSnapshotReady

Returns the snapshot data from ECam implementation to the client.

The data is returned in an MCameraBuffer object. In the case where the driving mode returns more than one image (burst mode, bracket mode, etc.) the buffer contains several snapshots which may be returned in any order. The aFrameIndexOrder array provides the image sequence numbers in the order in which the snapshots for those images are returned within the MCameraBuffer.

A reference to an MCameraBuffer which will contain the returned snapshot image data.

leave

KErrNoMemory if the ECam implementation has not been able to create the camera buffer; also any system wide error.

Parameters

RArray< TInt > & aFrameIndexOrderA reference to an array that will receive the image sequence numbers in the order to which the snapshots within MCameraBuffer relate.

StartSnapshot()

voidStartSnapshot()[pure virtual]

Use void MCameraSnapshot2::EnableSnapshotL();

Activates the snapshot feature. Calls to this method when the snapshot feature is already active will be ignored.

The client will not receive snapshot notifications until the snapshot feature is activated.

StopSnapshot()

voidStopSnapshot()[pure virtual]

Use void MCameraSnapshot2::DisableSnapshotL();

Deactivates the snapshot feature if it is active.

Once the snapshot has been deactivated, the client will no longer receive notifications about snapshots.

SupportedFormats()

TUint32 SupportedFormats()[pure virtual]

Gets a list of camera formats for which the ECam implementation supports snapshots.

Bit field containing the supported camera formats as CCamera::TFormat values.