CCamera::CCameraSnapshot Class Reference

class CCamera::CCameraSnapshot : public CBase

This class allows the client to request snapshot data in a specified image format for both still images and video.

Snapshot object may be created out of new classes: CCameraImageCapture and CCameraVideoCaptureControl. The client selects snapshot parameters calling PrepareSnapshotL(const TSnapshotParameters& aSnapshotParameters). It can then enable and disable the snapshot generation by calling EnableSnapshotL() and DisableSnapshotL(). The client application using this API shall provide MCaptureImageObserver and MCaptureVideoObserver interface. Callbacks available are MCaptureImageObserver:: ClientSnapshotForImageReady and MCaptureVideoObserver::ClientSnapshotReady.

Snapshots are supposed to be displayed on a particular viewfinder. So, while destruction, client shall destroy snapshot first. In general, child objects shall be destroyed before the parent objects.

Following is valid for older clients who created snapshots using NewL method:- The client selects snapshot parameters calling PrepareSnapshotL(). It can then start and stop receiving notifications from the ECam implementation by calling StartSnapshot() and StopSnapshot(). The client application using this API should provide MCameraObserver2 interface to be signalled, with event KUidECamEventCameraSnapshot, when snapshot data is available to be retrieved from the ECam implementation. The client can then retrieve the snapshot data from the ECam implementation calling SnapshotDataL().

Note:

This class provides a standardised client interface for the camera snapshot. Classes cannot be derived from it.

If the class methods leave, the output type parameter value is not guaranteed to be valid.

Inherits from

  • CCamera::CCameraSnapshot
Public Member Functions
~CCameraSnapshot()
IMPORT_C CCamera::CCameraV2Histogram *CreateHistogramHandleL()
IMPORT_C voidDisableSnapshotL()
IMPORT_C voidEnableSnapshotL()
IMPORT_C voidGetSnapshotParametersL(TSnapshotParameters &)
IMPORT_C voidGetSnapshotStatusL(TSnapshotState &)
IMPORT_C TBoolIsSnapshotActive()
IMPORT_C CCameraSnapshot *NewL(CCamera &)
IMPORT_C voidPrepareSnapshotL(CCamera::TFormat, const TPoint &, const TSize &, const TRgb &, TBool)
IMPORT_C voidPrepareSnapshotL(CCamera::TFormat, const TSize &, TBool)
IMPORT_C voidPrepareSnapshotL(const TSnapshotParameters &)
IMPORT_C voidSelectSnapshotVideoFramesL(TSnapshotVideoFrames)
IMPORT_C voidSetBgColorL(const TRgb &)
IMPORT_C voidSetPositionL(const TPoint &)
IMPORT_C voidSetSnapshotParametersL(const TSnapshotParameters &)
IMPORT_C MCameraBuffer &SnapshotDataL(RArray< TInt > &)
IMPORT_C voidStartSnapshot()
IMPORT_C voidStopSnapshot()
IMPORT_C TUint32SupportedFormats()
Private Member Functions
CCameraSnapshot(CCamera &)
voidConstructL()
voidConstructL(const MImplementationFactory &, TInt)
IMPORT_C CCameraSnapshot *CreateL(CCamera &, MImplementationFactory &, TInt)
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()
Public Member Enumerations
enumTSnapshotState { ESnapshotNotCreated, ESnapshotInactive, ESnapshotActive, ESnapshotDisabled }
enumTSnapshotVideoFrames { ESnapshotVideoFirstFrame, ESnapshotVideoLastFrame, ESnapshotVideoFirstAndLastFrame, ESnapshotVideoEveryFrame }
Private Attributes
MCameraSnapshot *iImpl
MCameraSnapshot2 *iImpl2
CCamera &iOwner

Constructor & Destructor Documentation

CCameraSnapshot(CCamera &)

CCameraSnapshot(CCamera &aOwner)[private]

Parameters

CCamera & aOwner

~CCameraSnapshot()

IMPORT_C~CCameraSnapshot()

Member Functions Documentation

ConstructL()

voidConstructL()[private]

ConstructL(const MImplementationFactory &, TInt)

voidConstructL(const MImplementationFactory &aImplFactory,
TIntaClientViewFinderId
)[private]

Parameters

const MImplementationFactory & aImplFactory
TInt aClientViewFinderId

CreateHistogramHandleL()

IMPORT_C CCamera::CCameraV2Histogram *CreateHistogramHandleL()const

CreateL(CCamera &, MImplementationFactory &, TInt)

IMPORT_C CCameraSnapshot *CreateL(CCamera &aCamera,
MImplementationFactory &aImplFactory,
TIntaClientViewFinderId
)[private, static]

Parameters

CCamera & aCamera
MImplementationFactory & aImplFactory
TInt aClientViewFinderId

DisableSnapshotL()

IMPORT_C voidDisableSnapshotL()

EnableSnapshotL()

IMPORT_C voidEnableSnapshotL()

GetSnapshotParametersL(TSnapshotParameters &)

IMPORT_C voidGetSnapshotParametersL(TSnapshotParameters &aSnapshotParameters)

Parameters

TSnapshotParameters & aSnapshotParameters

GetSnapshotStatusL(TSnapshotState &)

IMPORT_C voidGetSnapshotStatusL(TSnapshotState &aSnapshotState)const

Parameters

TSnapshotState & aSnapshotState

IsSnapshotActive()

IMPORT_C TBoolIsSnapshotActive()const

NewL(CCamera &)

IMPORT_C CCameraSnapshot *NewL(CCamera &aCamera)[static]

Parameters

CCamera & aCamera

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

IMPORT_C voidPrepareSnapshotL(CCamera::TFormataFormat,
const TPoint &aPosition,
const TSize &aSize,
const TRgb &aBgColor,
TBoolaMaintainAspectRatio
)

Parameters

CCamera::TFormat aFormat
const TPoint & aPosition
const TSize & aSize
const TRgb & aBgColor
TBool aMaintainAspectRatio

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

IMPORT_C voidPrepareSnapshotL(CCamera::TFormataFormat,
const TSize &aSize,
TBoolaMaintainAspectRatio
)

Parameters

CCamera::TFormat aFormat
const TSize & aSize
TBool aMaintainAspectRatio

PrepareSnapshotL(const TSnapshotParameters &)

IMPORT_C voidPrepareSnapshotL(const TSnapshotParameters &aSnapshotParameters)

Parameters

const TSnapshotParameters & aSnapshotParameters

SelectSnapshotVideoFramesL(TSnapshotVideoFrames)

IMPORT_C voidSelectSnapshotVideoFramesL(TSnapshotVideoFramesaSnapshotVideoFrames)

Parameters

TSnapshotVideoFrames aSnapshotVideoFrames

SetBgColorL(const TRgb &)

IMPORT_C voidSetBgColorL(const TRgb &aBgColor)

Parameters

const TRgb & aBgColor

SetPositionL(const TPoint &)

IMPORT_C voidSetPositionL(const TPoint &aPosition)

Parameters

const TPoint & aPosition

SetSnapshotParametersL(const TSnapshotParameters &)

IMPORT_C voidSetSnapshotParametersL(const TSnapshotParameters &aSnapshotParameters)

Parameters

const TSnapshotParameters & aSnapshotParameters

SnapshotDataL(RArray< TInt > &)

IMPORT_C MCameraBuffer &SnapshotDataL(RArray< TInt > &aFrameIndexOrder)

Parameters

RArray< TInt > & aFrameIndexOrder

StartSnapshot()

IMPORT_C voidStartSnapshot()

StopSnapshot()

IMPORT_C voidStopSnapshot()

SupportedFormats()

IMPORT_C TUint32SupportedFormats()

Member Enumerations Documentation

Enum TSnapshotState

Describes the state of snapshot. The enumeration list may be extended in future.

Enumerators

ESnapshotNotCreated

Snapshot has not been prepared.

ESnapshotInactive

Snapshot has been prepared but not yet enabled.

ESnapshotActive

Snapshot has been prepared and enabled but not yet disabled.

ESnapshotDisabled

Snapshot has been disabled.

Enum TSnapshotVideoFrames

Specifies the video frames to be used in order to create snapshots fo video. The enumeration list may be extended in future.

Enumerators

ESnapshotVideoFirstFrame

Snapshot for video created from first video frame. Used by default.

ESnapshotVideoLastFrame

Snapshot for video created from last video frame.

ESnapshotVideoFirstAndLastFrame

Snapshot for video created from first and last video frame.

ESnapshotVideoEveryFrame

Snapshot for video created from every video frame.

Member Data Documentation

MCameraSnapshot * iImpl

MCameraSnapshot *iImpl[private]

MCameraSnapshot2 * iImpl2

MCameraSnapshot2 *iImpl2[private]

CCamera & iOwner

CCamera &iOwner[private]