CImageEncoderPriv Class Reference

class CImageEncoderPriv : public CActive

Inherits from

Public Member Functions
~CImageEncoderPriv()
TBool AmInThread()
voidBodyHandleCustomSyncL(TInt)
voidBodyInitCustomAsyncL(TInt)
voidBodyNotifyComplete()
voidCleanup()
voidConvert(RThread &, TRequestStatus *, const CFbsBitmap &, const CFrameImageData *)
voidCreatePluginL()
TInt CurrentImageSizeL()
voidCustomAsync(RThread &, TRequestStatus *, TInt)
voidCustomSyncL(TInt)
TBufPtr8 &DestinationData()
voidDoCancel()
voidDoConvert()
CImageEncoder::TOptions EncoderOptions()
voidFinishConvertL()
const TSize &FrameInfoOverallSizeInPixels()
voidGetExtensionL(TUid, MImageConvExtension *&)
voidHandleProcessFrameResult(TInt, TFrameState)
CImageWriteCodec *ImageWriteCodec()
TUid ImplementationUid()
voidInitConvertL()
CImageEncoderPriv *NewL(CImageEncodeConstruct *, MImageEncoderPrivSupport *)
CImageEncoderPlugin *Plugin()
TInt &Position()
voidRegisterClientRequestStatus(RThread &, TRequestStatus *)
voidRequestComplete(TInt)
voidRequestInitL()
voidSelfComplete(TInt)
voidSetDataL(HBufC8 *&, const CImageEncoder::TOptions)
voidSetFileL(RFs &, const TDesC &, const CImageEncoder::TOptions)
voidSetFileL(RFile &, const CImageEncoder::TOptions)
voidSetImageWriteCodec(CImageWriteCodec *)
voidSetSelfPending()
voidSetThumbnail(TBool)
TBool ShouldAbort()
const CFbsBitmap &Source()
voidStartActivity()
TInt &StartPosition()
TBool ValidSource()
voidWriteDataL(TInt, const TDesC8 &)
voidWriteDataPositionIncL(TInt, const TDesC8 &)
Private Member Functions
CImageEncoderPriv(CImageEncodeConstruct *, MImageEncoderPrivSupport *)
voidRunL()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
Inherited Enumerations
CActive:TPriority
Private Attributes
CImageEncodeConstruct *iConstruct
TRequestStatus *iConvStatus
TBool iConvertStarted
HBufC8 **iDestination
HBufC8 *iDstBuffer
TBufPtr8 iDstDes
RFile iFile
TFileName iFileName
HBufC8 *iFinalDstBuffer
TFrameInfo iFrameInfo
RFs *iFs
TBool iHeaderWritten
TImageParameterData iImageParameterData
CImageWriteCodec *iImageWriteCodec
TBool iLastBuffer
CImageEncoder::TOptions iOptions
CImageEncoderPlugin *iPlugin
TInt iPosition
RThread *iRequestThread
const CFbsBitmap *iSource
TInt iStartPosition
MImageEncoderPrivSupport *iSupport
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CImageEncoderPriv(CImageEncodeConstruct *, MImageEncoderPrivSupport *)

CImageEncoderPriv(CImageEncodeConstruct *aConstruct,
MImageEncoderPrivSupport *aSupport
)[private]

Parameters

CImageEncodeConstruct * aConstruct
MImageEncoderPrivSupport * aSupport

~CImageEncoderPriv()

~CImageEncoderPriv()[virtual]

Member Functions Documentation

AmInThread()

TBool AmInThread()const

Indicate if running in a separate thread

BodyHandleCustomSyncL(TInt)

voidBodyHandleCustomSyncL(TIntaParam)[inline]

Default version of HandleCustomSyncL - always leaves with KErrNotSupported

Parameters

TInt aParam

BodyInitCustomAsyncL(TInt)

voidBodyInitCustomAsyncL(TIntaParam)[inline]

Default version of InitCustomAsyncL - always leaves with KErrNotSupported

Parameters

TInt aParam

BodyNotifyComplete()

voidBodyNotifyComplete()[inline]

Default version of NotifyComplete - NO-OP

Cleanup()

voidCleanup()

Convert(RThread &, TRequestStatus *, const CFbsBitmap &, const CFrameImageData *)

voidConvert(RThread &aRequestThread,
TRequestStatus *aRequestStatus,
const CFbsBitmap &aSource,
const CFrameImageData *aFrameImageData
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus
const CFbsBitmap & aSource
const CFrameImageData * aFrameImageData

CreatePluginL()

voidCreatePluginL()

CurrentImageSizeL()

TInt CurrentImageSizeL()const

CustomAsync(RThread &, TRequestStatus *, TInt)

voidCustomAsync(RThread &aRequestThread,
TRequestStatus *aRequestStatus,
TIntaParam
)

Plugin is interrogated with InitCustomAsyncL. If this works, then set internal Convert() cycle going

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus
TInt aParam

CustomSyncL(TInt)

voidCustomSyncL(TIntaParam)

Passes on CustomSyncL to plugin

Parameters

TInt aParam

DestinationData()

TBufPtr8 &DestinationData()

DoCancel()

voidDoCancel()[virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel().

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel().

CActive::Cancel

DoConvert()

voidDoConvert()

EncoderOptions()

CImageEncoder::TOptions EncoderOptions()const [inline]

FinishConvertL()

voidFinishConvertL()

FrameInfoOverallSizeInPixels()

const TSize &FrameInfoOverallSizeInPixels()const [inline]

GetExtensionL(TUid, MImageConvExtension *&)

voidGetExtensionL(TUidaExtUid,
MImageConvExtension *&aExtPtr
)

Parameters

TUid aExtUid
MImageConvExtension *& aExtPtr

HandleProcessFrameResult(TInt, TFrameState)

voidHandleProcessFrameResult(TIntaErrCode,
TFrameStateaCodecState
)

Parameters

TInt aErrCode
TFrameState aCodecState

ImageWriteCodec()

CImageWriteCodec *ImageWriteCodec()const [inline]

ImplementationUid()

TUid ImplementationUid()const

InitConvertL()

voidInitConvertL()

NewL(CImageEncodeConstruct *, MImageEncoderPrivSupport *)

CImageEncoderPriv *NewL(CImageEncodeConstruct *aConstruct,
MImageEncoderPrivSupport *aSupport
)[static]

Parameters

CImageEncodeConstruct * aConstruct
MImageEncoderPrivSupport * aSupport

Plugin()

CImageEncoderPlugin *Plugin()const [inline]

Position()

TInt &Position()[inline]

RegisterClientRequestStatus(RThread &, TRequestStatus *)

voidRegisterClientRequestStatus(RThread &aRequestThread,
TRequestStatus *aRequestStatus
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus

RequestComplete(TInt)

voidRequestComplete(TIntaReason)

Parameters

TInt aReason

RequestInitL()

voidRequestInitL()

RunL()

voidRunL()[private, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

SelfComplete(TInt)

voidSelfComplete(TIntaReason)

Parameters

TInt aReason

SetDataL(HBufC8 *&, const CImageEncoder::TOptions)

voidSetDataL(HBufC8 *&aDestinationData,
const CImageEncoder::TOptionsaOptions = CImageEncoder::EOptionNone
)

Parameters

HBufC8 *& aDestinationData
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone

SetFileL(RFs &, const TDesC &, const CImageEncoder::TOptions)

voidSetFileL(RFs &aFs,
const TDesC &aDestinationFilename,
const CImageEncoder::TOptionsaOptions = CImageEncoder::EOptionNone
)

Parameters

RFs & aFs
const TDesC & aDestinationFilename
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone

SetFileL(RFile &, const CImageEncoder::TOptions)

voidSetFileL(RFile &aFile,
const CImageEncoder::TOptionsaOptions = CImageEncoder::EOptionNone
)

Parameters

RFile & aFile
const CImageEncoder::TOptions aOptions = CImageEncoder::EOptionNone

SetImageWriteCodec(CImageWriteCodec *)

voidSetImageWriteCodec(CImageWriteCodec *aImageWriteCodec)[inline]

Parameters

CImageWriteCodec * aImageWriteCodec

SetSelfPending()

voidSetSelfPending()

SetThumbnail(TBool)

voidSetThumbnail(TBoolaDoGenerateThumbnail)

Parameters

TBool aDoGenerateThumbnail

ShouldAbort()

TBool ShouldAbort()const

Indicate if a decode should abort early (ie. following a Cancel). Always false unless in a thread.

Source()

const CFbsBitmap &Source()const [inline]

StartActivity()

voidStartActivity()

StartPosition()

TInt &StartPosition()[inline]

ValidSource()

TBool ValidSource()const [inline]

WriteDataL(TInt, const TDesC8 &)

voidWriteDataL(TIntaPosition,
const TDesC8 &aDes
)

Parameters

TInt aPosition
const TDesC8 & aDes

WriteDataPositionIncL(TInt, const TDesC8 &)

voidWriteDataPositionIncL(TIntaPosition,
const TDesC8 &aDes
)

Parameters

TInt aPosition
const TDesC8 & aDes

Member Data Documentation

CImageEncodeConstruct * iConstruct

CImageEncodeConstruct *iConstruct[private]

TRequestStatus * iConvStatus

TRequestStatus *iConvStatus[private]

TBool iConvertStarted

TBool iConvertStarted[private]

HBufC8 ** iDestination

HBufC8 **iDestination[private]

HBufC8 * iDstBuffer

HBufC8 *iDstBuffer[private]

TBufPtr8 iDstDes

TBufPtr8 iDstDes[private]

RFile iFile

RFile iFile[private]

TFileName iFileName

TFileName iFileName[private]

HBufC8 * iFinalDstBuffer

HBufC8 *iFinalDstBuffer[private]

TFrameInfo iFrameInfo

TFrameInfo iFrameInfo[private]

RFs * iFs

RFs *iFs[private]

TBool iHeaderWritten

TBool iHeaderWritten[private]

TImageParameterData iImageParameterData

TImageParameterData iImageParameterData[private]

CImageWriteCodec * iImageWriteCodec

CImageWriteCodec *iImageWriteCodec[private]

TBool iLastBuffer

TBool iLastBuffer[private]

CImageEncoder::TOptions iOptions

CImageEncoder::TOptions iOptions[private]

CImageEncoderPlugin * iPlugin

CImageEncoderPlugin *iPlugin[private]

TInt iPosition

TInt iPosition[private]

RThread * iRequestThread

RThread *iRequestThread[private]

const CFbsBitmap * iSource

const CFbsBitmap *iSource[private]

TInt iStartPosition

TInt iStartPosition[private]

MImageEncoderPrivSupport * iSupport

MImageEncoderPrivSupport *iSupport[private]