MCameraObserver Class Reference

class MCameraObserver

Mixin base class for camera clients.

An application must implement an MCameraObserver or MCameraObserver2 (recommended) in order to use the camera API. This derived class is called when the camera is ready for use, an image has been captured or a buffer of video data is ready, including when errors occur.

Implementations of the camera API should use MCameraObserver::FrameBufferReady() and MFrameBuffer::Release() to co-ordinate the mapping of any special memory objects.

Public Member Functions
voidFrameBufferReady(MFrameBuffer *, TInt)
voidImageReady(CFbsBitmap *, HBufC8 *, TInt)
voidPowerOnComplete(TInt)
voidReserveComplete(TInt)
voidViewFinderFrameReady(CFbsBitmap &)

Member Functions Documentation

FrameBufferReady(MFrameBuffer *, TInt)

voidFrameBufferReady(MFrameBuffer *aFrameBuffer,
TIntaError
)[pure virtual]

Passes a filled frame buffer to the client.

Called asynchronously, when a buffer has been filled with the required number of video frames by CCamera::StartVideoCapture().

Parameters

MFrameBuffer * aFrameBufferOn return, a pointer to an MFrameBuffer if successful, or NULL if not successful.
TInt aErrorKErrNone if successful, or an error code if not successful.

ImageReady(CFbsBitmap *, HBufC8 *, TInt)

voidImageReady(CFbsBitmap *aBitmap,
HBufC8 *aData,
TIntaError
)[pure virtual]

Transfers the current image from the camera to the client.

Called asynchronously when CCamera::CaptureImage() completes.

Parameters

CFbsBitmap * aBitmapOn return, a pointer to an image held in CFbsBitmap form if this was the format specified in CCamera::PrepareImageCaptureL().
HBufC8 * aDataOn return, a pointer to an HBufC8 if this was the format specified in CCamera::PrepareImageCaptureL(). NULL if there was an error.
TInt aErrorKErrNone on success or an error code on failure.

PowerOnComplete(TInt)

voidPowerOnComplete(TIntaError)[pure virtual]

Indicates camera power on is complete.

Called on completion of CCamera:PowerOn().

Parameters

TInt aErrorKErrNone on success, KErrInUse if the camera is in use by another client or KErrNoMemory if insufficient system memory is available.

ReserveComplete(TInt)

voidReserveComplete(TIntaError)[pure virtual]

Camera reservation is complete.

Called asynchronously when CCamera::Reserve() completes.

Parameters

TInt aErrorAn error on failure and KErrNone on success.

ViewFinderFrameReady(CFbsBitmap &)

voidViewFinderFrameReady(CFbsBitmap &aFrame)[pure virtual]

Tests whether transfer of view finder data has completed.

Called periodically in response to the use of CCamera::StartViewFinderBitmapsL().

Parameters

CFbsBitmap & aFrameThe view finder frame.