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]

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

void PrepareSnapshotL ( CCamera::TFormat aFormat,
const TPoint & aPosition,
const TSize & aSize,
const TRgb & aBgColor,
TBool aMaintainAspectRatio
) [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 aFormat The image format that the snapshot must have.
const TPoint & aPosition The 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 & aSize The size of the snapshot in pixels.
const TRgb & aBgColor The 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 aMaintainAspectRatio Set to ETrue if the aspect ratio of the snapshot image must be maintained when scaling down.

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

void PrepareSnapshotL ( CCamera::TFormat aFormat,
const TSize & aSize,
TBool aMaintainAspectRatio
) [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 aFormat The image format that the snapshot must have.
const TSize & aSize The size of the snapshot in pixels.
TBool aMaintainAspectRatio Set to ETrue if the aspect ratio of the snapshot image must be maintained when scaling down.

Release()

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

void SetBgColorL ( 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 & aBgColor The new background colour.

SetPositionL(const TPoint &)

void SetPositionL ( 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 & aPosition The 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 .

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

Parameters

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

StartSnapshot()

void StartSnapshot ( ) [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()

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