CCamera::CCameraV2DirectViewFinder Class Reference

class CCamera::CCameraV2DirectViewFinder : public CCameraViewFinder

CCamera direct view finder v2 class is used to provide support for multiple Direct View Finder. A new instance of this class will be created for every new direct viewfinder.

Note:

This class is not intended for sub-classing and used to standardise existing varieties of implementations.

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

Clients must implement an MDirectViewFinderObserver in order to use this CCameraV2DirectViewFinder API.

Inherits from

Public Member Functions
~CCameraV2DirectViewFinder ()
IMPORT_C CCamera::CCameraV2Histogram * CreateHistogramHandleL ()
IMPORT_C CCamera::CCameraDirectSnapshot * GetDirectSnapshotHandleL ()
IMPORT_C void GetDirectViewFinderPropertiesL ( TInt &, TRect &, TRect &)
IMPORT_C CCamera::CCameraImageProcessing * GetTransformationHandleL ()
IMPORT_C void GetViewFinderStateL ( TViewFinderState &)
IMPORT_C CCameraV2DirectViewFinder * NewL ( CCamera &, MDirectViewFinderObserver &)
IMPORT_C void PauseViewFinderDirect ()
IMPORT_C void ResumeViewFinderDirect ()
IMPORT_C void StartViewFinderDirectL (RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &)
IMPORT_C void StartViewFinderDirectL (RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &, TRect &)
IMPORT_C void StopDirectViewFinder ()
Private Member Functions
CCameraV2DirectViewFinder ( CCamera &)
void ConstructL ( MDirectViewFinderObserver &)
MCameraV2DirectViewFinder * Impl ()
void SetImplBaseHandle ()
void SetImplHandle ()
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()
CCameraViewFinder::CCameraViewFinder(CCamera &)
CCameraViewFinder::GetImageEnhancementL(TImageEnhancement &)const
CCameraViewFinder::GetSpotsPositionL(TUint,RArray< TRect > &)const
CCameraViewFinder::GetSupportedImageEnhancementL(TUint &)const
CCameraViewFinder::GetSupportedVFMagnificationL(RArray< TUint > &)const
CCameraViewFinder::GetViewFinderFadingCapabilitiesL(TViewFinderFadingCapabilities &)const
CCameraViewFinder::GetViewFinderFadingEffectL(TViewFinderFadingEffect &)const
CCameraViewFinder::GetViewFinderHandleL(TInt &)const
CCameraViewFinder::GetViewfinderMagnificationL(TUint &)const
CCameraViewFinder::SetImageEnhancementL(TImageEnhancement)
CCameraViewFinder::SetViewFinderFadingEffectL(const TViewFinderFadingEffect &)
CCameraViewFinder::SetViewfinderMagnificationL(TUint)
CCameraViewFinder::~CCameraViewFinder()
Public Member Enumerations
enum TViewFinderState { EViewFinderActive , EViewFinderPause , EViewFinderInActive }
Inherited Enumerations
CCameraViewFinder:TImageEnhancement
CCameraViewFinder:TViewFinderFadingControl
CCameraViewFinder:TViewFinderFadingDirection
CCameraViewFinder:TViewFinderFadingType
Private Attributes
MCameraV2DirectViewFinder * iImpl
Inherited Attributes
CCameraViewFinder::iImplBase
CCameraViewFinder::iOwner

Constructor & Destructor Documentation

CCameraV2DirectViewFinder(CCamera &)

CCameraV2DirectViewFinder ( CCamera & aOwner ) [private]

Parameters

CCamera & aOwner A reference to a CCamera object providing the settings.

~CCameraV2DirectViewFinder()

IMPORT_C ~CCameraV2DirectViewFinder ( )
Destructor
Note:

The child objects created out of this direct viewfinder class object shall be delete beforehand. Various child objects are snapshot and histograms.

Member Functions Documentation

ConstructL(MDirectViewFinderObserver &)

void ConstructL ( MDirectViewFinderObserver & aDirectViewFinderObserver ) [private]

Parameters

MDirectViewFinderObserver & aDirectViewFinderObserver

CreateHistogramHandleL()

IMPORT_C CCamera::CCameraV2Histogram * CreateHistogramHandleL ( ) const

Retrieve pointer to histogram API in order to use it specifically for a particular viewfinder.

leave
May leave with any error code.
Note:

Different types of histogram may be used for a specific viewfinder. Every time this method will be called on the CCameraV2DirectViewFinder class object, a new type of histogram will be created.

GetDirectSnapshotHandleL()

IMPORT_C CCamera::CCameraDirectSnapshot * GetDirectSnapshotHandleL ( ) const

Retrieve pointer to direct snapshot API in order to use it for displaying the snapshots for still images directly on the given direct viewfinder screen.

leave
May leave with any error code.
Note:

Direct snapshot API is not supposed to be used for snapshots for video.

GetDirectViewFinderPropertiesL(TInt &, TRect &, TRect &)

IMPORT_C void GetDirectViewFinderPropertiesL ( TInt & aScreenNumber,
TRect & aScreenRect,
TRect & aClipRect
) const

Retrieves the parameters associated with the direct viewfinder.

leave
May leave with any error code.

Parameters

TInt & aScreenNumber Retrieves the screen number on which the direct viewfinder is supposed to run.
TRect & aScreenRect Retrieves the TRect which identifies the portion of the screen to which view finder data is to be transferred.
TRect & aClipRect Retrieves the TRect which identifies the rectangle to which the screen will be clipped.

GetTransformationHandleL()

IMPORT_C CCamera::CCameraImageProcessing * GetTransformationHandleL ( ) const

Retrieve pointer to image processing API in order to use it specifically for a particular viewfinder.

leave
May leave with any error code.

GetViewFinderStateL(TViewFinderState &)

IMPORT_C void GetViewFinderStateL ( TViewFinderState & aViewFinderState ) const

Retrieves the state of the direct viewfinder.

leave
May leave with any error code.

Parameters

TViewFinderState & aViewFinderState Retrieves the state of the direct viewfinder.

Impl()

MCameraV2DirectViewFinder * Impl ( ) [private]

Provides the interface pointer for the MCameraV2DirectViewFinder implementation.

NewL(CCamera &, MDirectViewFinderObserver &)

IMPORT_C CCameraV2DirectViewFinder * NewL ( CCamera & aOwner,
MDirectViewFinderObserver & aDirectViewFinderObserver
) [static]

Factory function for creating the CCameraV2DirectViewFinder object.

leave
KErrNoMemory Out of memory Or any other system-wide error code.
leave
KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L.

Parameters

CCamera & aOwner A reference to a CCamera object providing the settings.
MDirectViewFinderObserver & aDirectViewFinderObserver Reference to the direct view finder observer.

PauseViewFinderDirect()

IMPORT_C void PauseViewFinderDirect ( )

Pauses the direct viewfinder.

ResumeViewFinderDirect()

IMPORT_C void ResumeViewFinderDirect ( )

Resumes the direct viewfinder

Note:

MDirectViewFinderObserver::DirectViewFinderFirstFrameDisplayed() will be used to notify clients that the first frame has been displayed.

SetImplBaseHandle()

void SetImplBaseHandle ( ) [private]

Gets the handle to the implementer's MCameraViewFinder derived class for v2 direct viewfinder.

SetImplHandle()

void SetImplHandle ( ) [private]

Gets the handle to the implementer's MCameraV2DirectViewFinder derived class.

StartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &)

IMPORT_C void StartViewFinderDirectL ( RWsSession & aWs,
CWsScreenDevice & aScreenDevice,
RWindowBase & aWindow,
TRect & aScreenRect
)

Creates a new viewfinder and starts transfer of view finder data to the given portion of the screen using direct screen access.

The aScreenRect parameter is in screen coordinates and may be modified if, for example, the camera requires the destination to have a certain byte alignment, and so on.

leave
KErrInUse if another direct viewfinder is running with the same set of window parameters. May leave with any other error code.
Note:

MDirectViewFinderObserver::DirectViewFinderFirstFrameDisplayed() will be used to notify clients that the first frame has been displayed.

Parameters

RWsSession & aWs Window server session.
CWsScreenDevice & aScreenDevice Screen device.
RWindowBase & aWindow Displayable window.
TRect & aScreenRect Portion of the screen to which view finder data is to be transferred. This is in screen co-ordinates and may be modified if, for example, the camera requires the destination to have a certain byte alignment.

StartViewFinderDirectL(RWsSession &, CWsScreenDevice &, RWindowBase &, TRect &, TRect &)

IMPORT_C void StartViewFinderDirectL ( RWsSession & aWs,
CWsScreenDevice & aScreenDevice,
RWindowBase & aWindow,
TRect & aScreenRect,
TRect & aClipRect
)

Creates a new viewfinder and 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.

leave
KErrInUse if another direct viewfinder is running with the same set of window parameters. May leave with any other error code.
Note:

MDirectViewFinderObserver::DirectViewFinderFirstFrameDisplayed() will be used to notify clients that the first frame has been displayed.

Parameters

RWsSession & aWs Window server session.
CWsScreenDevice & aScreenDevice Screen device.
RWindowBase & aWindow Displayable window.
TRect & aScreenRect Portion of the screen to which view finder data is to be transferred. This is in screen coordinates and may be modified if, for example, the camera requires the destination to have a certain byte alignment.
TRect & aClipRect The rectangle to which the screen will be clipped.

StopDirectViewFinder()

IMPORT_C void StopDirectViewFinder ( )

Stops the direct viewfinder.

Member Enumerations Documentation

Enum TViewFinderState

Specifies direct viewfinder state.

Enumerators

EViewFinderActive

View Finder is activated

EViewFinderPause

View Finder has been paused

EViewFinderInActive

View Finder has been stopped or hasn't yet started. Default state.

Member Data Documentation

MCameraV2DirectViewFinder * iImpl

MCameraV2DirectViewFinder * iImpl [private]