CImageDecoderPriv Class Reference

class CImageDecoderPriv : public CActive

Inherits from

Public Member Functions
~CImageDecoderPriv()
TBool AmInThread()
TInt AppendImageData(const TImageDataBlock *)
TInt AppendImageDataBuffer(const HBufC8 *)
voidBodyHandleCustomSyncL(TInt)
voidBodyInitCustomAsyncL(TInt)
voidBodyNotifyComplete()
voidCleanup()
voidContinueConvert(RThread &, TRequestStatus *)
voidContinueProcessingHeaderL()
voidConvert(RThread &, TRequestStatus *, CFbsBitmap &, TInt)
voidConvert(RThread &, TRequestStatus *, CFbsBitmap &, CFbsBitmap &, TInt)
voidCreateFrameInfoL()
voidCreatePluginL()
voidCustomAsync(RThread &, TRequestStatus *, TInt)
voidCustomSyncL(TInt)
TInt DataLength()
CImageDecoder::TOptions DecoderOptions()
voidDeleteFrameInfoL()
const CFbsBitmap &Destination()
const CFbsBitmap &DestinationMask()
voidDoConvert()
TInt FrameCount()
const CFrameImageData &FrameData(TInt)
const TFrameInfo &FrameInfo(TInt)
CFrameInfoStrings *FrameInfoStringsLC(TInt)
TInt GetDestinationSize(TSize &, TInt)
voidGetExtensionL(TUid, MImageConvExtension *&)
voidHandleNewlyOpenedImageL()
voidHandleProcessFrameResult(TInt, TFrameState)
const TImageDataBlock *ImageData(TInt)
TInt ImageDataCount()
const TFrameInfo &ImageInfo()
CImageReadCodec *ImageReadCodec()
TUid ImplementationUid()
voidInitConvertL()
TInt InsertImageData(const TImageDataBlock *, TInt)
TBool IsImageHeaderProcessingComplete()
CImageDecoderPriv *NewL(CImageDecodeConstruct *, MImageDecoderPrivSupport *)
TInt NumberOfFrames()
CImageDecoderPlugin *Plugin()
TInt Position()
voidPrepareForProcessFrameL()
voidReadDataL(TInt, TPtrC8 &, TInt)
voidReadFrameHeadersL()
TInt ReducedSize(const TSize &, TInt, TSize &)
TInt ReductionFactor(const TSize &, const TSize &)
voidRegisterClientRequestStatus(RThread &, TRequestStatus *)
voidRemoveImageData(TInt)
voidRequestComplete(TInt)
voidRequestInitL(TInt)
voidSelfComplete(TInt)
TInt SetAgentProperty(TAgentProperty, TInt)
voidSetClippingRectL(const TRect *)
voidSetDataL(RFs &, const TDesC8 &, const CImageDecoder::TOptions)
voidSetDataLength(TInt)
voidSetFileL(RFs &, const TDesC &, const CImageDecoder::TOptions)
voidSetFileL(RFile &, const CImageDecoder::TOptions)
voidSetImageInfo(const TFrameInfo &)
voidSetImageReadCodec(CImageReadCodec *)
voidSetImageTypeL(TInt)
voidSetIntent(TIntent)
voidSetPosition(const TInt)
voidSetSelfPending()
voidSetStartPosition(TInt)
voidSetThumbnailData(HBufC8 *)
voidSetUniqueIdL(const TDesC &)
TBool ShouldAbort()
TBufPtr8 &SourceData()
TInt SourceLength()
voidStartActivity()
TInt StartPosition()
TBool ValidDestination()
TBool ValidDestinationMask()
Protected Member Functions
voidCopyBufferToDescriptor(TDes8 &, const TDesC8 &, TInt, TInt)
TBool MustUseBufferWithDescriptor()
Private Member Functions
CImageDecoderPriv(CImageDecodeConstruct *, MImageDecoderPrivSupport *)
TInt DataSizeL()
voidDoCancel()
voidOpenExtraResourceFileLC(RFs &, const TUid, RResourceFile &)
voidRunL()
voidSeekReadL(TInt, TDes8 &, TInt)
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
TInt iBlockLength
TInt iCachedDataSize
CImageDecodeConstruct *iConstruct
CContent *iContent
TRequestStatus *iConvStatus
TInt iCurrentBlockLength
TInt iCurrentFrame
TBool iCurrentlyProcessingData
CData *iData
TInt iDataLength
CFbsBitmap *iDestination
TInt iDestinationHandle
CFbsBitmap *iDestinationMask
TInt iDestinationMaskHandle
TSize iDestinationSize
TFileName iFileName
RPointerArray< CFrameImageData >iFrameData
RPointerArray< TFrameInfo >iFrameInfo
RFs *iFs
TBool iHaveCompleteImageHeaders
CImageDataArray iImageData
TFrameInfo iImageInfo
TImageParameterData iImageParameterData
CImageReadCodec *iImageReadCodec
TInt iImageType
TIntent iIntent
TBool iIntentHasBeenExecuted
TInt iLastExtent
TInt iLastPos
TInt iNextFrameOffset
TInt iOldSrcDesLength
CImageDecoder::TOptions iOptions
CImageDecoderPlugin *iPlugin
TInt iPosition
TBool iProcessingFrameInfo
HBufC8 *iReadBuffer
TBool iReadOnly
RThread *iRequestThread
TBufPtr8 iSrcDes
TInt iSrcLength
TInt iStartPosition
MImageDecoderPrivSupport *iSupport
HBufC8 *iThumbnailData
HBufC *iUniqueId
TBool iUseBufferReadOptimization
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CImageDecoderPriv(CImageDecodeConstruct *, MImageDecoderPrivSupport *)

CImageDecoderPriv(CImageDecodeConstruct *aConstruct,
MImageDecoderPrivSupport *aSupport
)[private]

Parameters

CImageDecodeConstruct * aConstruct
MImageDecoderPrivSupport * aSupport

~CImageDecoderPriv()

~CImageDecoderPriv()[virtual]

Member Functions Documentation

AmInThread()

TBool AmInThread()const

Indicate if running in a separate thread

AppendImageData(const TImageDataBlock *)

TInt AppendImageData(const TImageDataBlock *aEntry)[inline]

Parameters

const TImageDataBlock * aEntry

AppendImageDataBuffer(const HBufC8 *)

TInt AppendImageDataBuffer(const HBufC8 *aImageBuffer)[inline]

Parameters

const HBufC8 * aImageBuffer

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()

ContinueConvert(RThread &, TRequestStatus *)

voidContinueConvert(RThread &aRequestThread,
TRequestStatus *aRequestStatus
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus

ContinueProcessingHeaderL()

voidContinueProcessingHeaderL()

Convert(RThread &, TRequestStatus *, CFbsBitmap &, TInt)

voidConvert(RThread &aRequestThread,
TRequestStatus *aRequestStatus,
CFbsBitmap &aDestination,
TIntaFrameNumber
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus
CFbsBitmap & aDestination
TInt aFrameNumber

Convert(RThread &, TRequestStatus *, CFbsBitmap &, CFbsBitmap &, TInt)

voidConvert(RThread &aRequestThread,
TRequestStatus *aRequestStatus,
CFbsBitmap &aDestination,
CFbsBitmap &aDestinationMask,
TIntaFrameNumber = 0
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus
CFbsBitmap & aDestination
CFbsBitmap & aDestinationMask
TInt aFrameNumber = 0

CopyBufferToDescriptor(TDes8 &, const TDesC8 &, TInt, TInt)

voidCopyBufferToDescriptor(TDes8 &aBuffer,
const TDesC8 &aSource,
TIntaPosition,
TIntaSize
)[protected, inline]

Parameters

TDes8 & aBuffer
const TDesC8 & aSource
TInt aPosition
TInt aSize

CreateFrameInfoL()

voidCreateFrameInfoL()

CreatePluginL()

voidCreatePluginL()

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

DataLength()

TInt DataLength()const [inline]

DataSizeL()

TInt DataSizeL()[private]

DecoderOptions()

CImageDecoder::TOptions DecoderOptions()const [inline]

DeleteFrameInfoL()

voidDeleteFrameInfoL()

Destination()

const CFbsBitmap &Destination()const [inline]

DestinationMask()

const CFbsBitmap &DestinationMask()const [inline]

DoCancel()

voidDoCancel()[private, 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()

FrameCount()

TInt FrameCount()const [inline]

Return the number of frames in the image being decoded. This function can be called immediately after the call to create the decoder, thus enabling the caller to know how many frames need to be converted.

FrameData(TInt)

const CFrameImageData &FrameData(TIntaFrameNumber)const

Parameters

TInt aFrameNumber

FrameInfo(TInt)

const TFrameInfo &FrameInfo(TIntaFrameNumber)const

Parameters

TInt aFrameNumber

FrameInfoStringsLC(TInt)

CFrameInfoStrings *FrameInfoStringsLC(TIntaFrameNumber)

Parameters

TInt aFrameNumber

GetDestinationSize(TSize &, TInt)

TInt GetDestinationSize(TSize &aSize,
TIntaFrameNumber = 0
)

Parameters

TSize & aSize
TInt aFrameNumber = 0

GetExtensionL(TUid, MImageConvExtension *&)

voidGetExtensionL(TUidaExtUid,
MImageConvExtension *&aExtPtr
)

Parameters

TUid aExtUid
MImageConvExtension *& aExtPtr

HandleNewlyOpenedImageL()

voidHandleNewlyOpenedImageL()

HandleProcessFrameResult(TInt, TFrameState)

voidHandleProcessFrameResult(TIntaErrCode,
TFrameStateaCodecState
)

Parameters

TInt aErrCode
TFrameState aCodecState

ImageData(TInt)

const TImageDataBlock *ImageData(TIntaIndex)const [inline]

Parameters

TInt aIndex

ImageDataCount()

TInt ImageDataCount()const [inline]

ImageInfo()

const TFrameInfo &ImageInfo()const [inline]

ImageReadCodec()

CImageReadCodec *ImageReadCodec()const [inline]

ImplementationUid()

TUid ImplementationUid()const

InitConvertL()

voidInitConvertL()

InsertImageData(const TImageDataBlock *, TInt)

TInt InsertImageData(const TImageDataBlock *aEntry,
TIntaPos
)[inline]

Parameters

const TImageDataBlock * aEntry
TInt aPos

IsImageHeaderProcessingComplete()

TBool IsImageHeaderProcessingComplete()const [inline]

Return the status of the image. If the image is incomplete or not terminated correctly EFalse will be returned

MustUseBufferWithDescriptor()

TBool MustUseBufferWithDescriptor()const [protected, inline]

NewL(CImageDecodeConstruct *, MImageDecoderPrivSupport *)

CImageDecoderPriv *NewL(CImageDecodeConstruct *aConstruct,
MImageDecoderPrivSupport *aSupport
)[static]

Parameters

CImageDecodeConstruct * aConstruct
MImageDecoderPrivSupport * aSupport

NumberOfFrames()

TInt NumberOfFrames()const [inline]

OpenExtraResourceFileLC(RFs &, const TUid, RResourceFile &)

voidOpenExtraResourceFileLC(RFs &aFs,
const TUidaUid,
RResourceFile &aResourceFile
)const [private]

Parameters

RFs & aFs
const TUid aUid
RResourceFile & aResourceFile

Plugin()

CImageDecoderPlugin *Plugin()const [inline]

Position()

TInt Position()const [inline]

PrepareForProcessFrameL()

voidPrepareForProcessFrameL()

ReadDataL(TInt, TPtrC8 &, TInt)

voidReadDataL(TIntaPosition,
TPtrC8 &aReadBuffer,
TIntaLength
)

Parameters

TInt aPosition
TPtrC8 & aReadBuffer
TInt aLength

ReadFrameHeadersL()

voidReadFrameHeadersL()

ReducedSize(const TSize &, TInt, TSize &)

TInt ReducedSize(const TSize &aOriginalSize,
TIntaReductionFactor,
TSize &aReducedSize
)const

Parameters

const TSize & aOriginalSize
TInt aReductionFactor
TSize & aReducedSize

ReductionFactor(const TSize &, const TSize &)

TInt ReductionFactor(const TSize &aOriginalSize,
const TSize &aReducedSize
)const

Parameters

const TSize & aOriginalSize
const TSize & aReducedSize

RegisterClientRequestStatus(RThread &, TRequestStatus *)

voidRegisterClientRequestStatus(RThread &aRequestThread,
TRequestStatus *aRequestStatus
)

Parameters

RThread & aRequestThread
TRequestStatus * aRequestStatus

RemoveImageData(TInt)

voidRemoveImageData(TIntaPos)[inline]

Parameters

TInt aPos

RequestComplete(TInt)

voidRequestComplete(TIntaReason)

Parameters

TInt aReason

RequestInitL(TInt)

voidRequestInitL(TIntaFrameNumber)

Parameters

TInt aFrameNumber

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

SeekReadL(TInt, TDes8 &, TInt)

voidSeekReadL(TIntaPosition,
TDes8 &aDest,
TIntaSize
)[private]

Issues a read operation by sending the start position along with the destination descriptor and size.

When this function is used to read data from a file, it can send the start position and length in one IPC operation, and so avoid having to issue a seek first.

Because ContentAccess::CData does not support a synchronous version of this API, this function takes care of waiting for the operation to complete, and leaves with any error code. This simplifies the calling code.

leave
Any Symbian OS error code.

Parameters

TInt aPositionPosition in source data to read from.
TDes8 & aDestThe data is written into this descriptor.
TInt aSizeAmount of data to read in bytes.

SelfComplete(TInt)

voidSelfComplete(TIntaReason)

Parameters

TInt aReason

SetAgentProperty(TAgentProperty, TInt)

TInt SetAgentProperty(TAgentPropertyaProperty,
TIntaValue
)

Parameters

TAgentProperty aProperty
TInt aValue

SetClippingRectL(const TRect *)

voidSetClippingRectL(const TRect *aClipRect)

Parameters

const TRect * aClipRect

SetDataL(RFs &, const TDesC8 &, const CImageDecoder::TOptions)

voidSetDataL(RFs &aFs,
const TDesC8 &aSourceData,
const CImageDecoder::TOptionsaOptions = CImageDecoder::EOptionNone
)

Parameters

RFs & aFs
const TDesC8 & aSourceData
const CImageDecoder::TOptions aOptions = CImageDecoder::EOptionNone

SetDataLength(TInt)

voidSetDataLength(TIntaDataLength)[inline]

Parameters

TInt aDataLength

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

voidSetFileL(RFs &aFs,
const TDesC &aSourceFilename,
const CImageDecoder::TOptionsaOptions = CImageDecoder::EOptionNone
)

Parameters

RFs & aFs
const TDesC & aSourceFilename
const CImageDecoder::TOptions aOptions = CImageDecoder::EOptionNone

SetFileL(RFile &, const CImageDecoder::TOptions)

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

Parameters

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

SetImageInfo(const TFrameInfo &)

voidSetImageInfo(const TFrameInfo &aImageInfo)[inline]

Parameters

const TFrameInfo & aImageInfo

SetImageReadCodec(CImageReadCodec *)

voidSetImageReadCodec(CImageReadCodec *aImageReadCodec)[inline]

Parameters

CImageReadCodec * aImageReadCodec

SetImageTypeL(TInt)

voidSetImageTypeL(TIntaImageType)

Parameters

TInt aImageType

SetIntent(TIntent)

voidSetIntent(TIntentaIntent)

Parameters

TIntent aIntent

SetPosition(const TInt)

voidSetPosition(const TIntaPosition)[inline]

Parameters

const TInt aPosition

SetSelfPending()

voidSetSelfPending()

SetStartPosition(TInt)

voidSetStartPosition(TIntaStartPosition)[inline]

Parameters

TInt aStartPosition

SetThumbnailData(HBufC8 *)

voidSetThumbnailData(HBufC8 *aThumbnailData)

Parameters

HBufC8 * aThumbnailData

SetUniqueIdL(const TDesC &)

voidSetUniqueIdL(const TDesC &aUniqueId)

Parameters

const TDesC & aUniqueId

ShouldAbort()

TBool ShouldAbort()const

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

SourceData()

TBufPtr8 &SourceData()

SourceLength()

TInt SourceLength()const [inline]

StartActivity()

voidStartActivity()

StartPosition()

TInt StartPosition()const [inline]

ValidDestination()

TBool ValidDestination()const [inline]

ValidDestinationMask()

TBool ValidDestinationMask()const [inline]

Member Data Documentation

TInt iBlockLength

TInt iBlockLength[private]

TInt iCachedDataSize

TInt iCachedDataSize[private]

Size of data source in bytes. Only valid if data source is read-only.

CImageDecodeConstruct * iConstruct

CImageDecodeConstruct *iConstruct[private]

CContent * iContent

CContent *iContent[private]

TRequestStatus * iConvStatus

TRequestStatus *iConvStatus[private]

TInt iCurrentBlockLength

TInt iCurrentBlockLength[private]

TInt iCurrentFrame

TInt iCurrentFrame[private]

TBool iCurrentlyProcessingData

TBool iCurrentlyProcessingData[private]

CData * iData

CData *iData[private]

TInt iDataLength

TInt iDataLength[private]

CFbsBitmap * iDestination

CFbsBitmap *iDestination[private]

TInt iDestinationHandle

TInt iDestinationHandle[private]

CFbsBitmap * iDestinationMask

CFbsBitmap *iDestinationMask[private]

TInt iDestinationMaskHandle

TInt iDestinationMaskHandle[private]

TSize iDestinationSize

TSize iDestinationSize[private]

TFileName iFileName

TFileName iFileName[private]

RPointerArray< CFrameImageData > iFrameData

RPointerArray< CFrameImageData >iFrameData[private]

RPointerArray< TFrameInfo > iFrameInfo

RPointerArray< TFrameInfo >iFrameInfo[private]

RFs * iFs

RFs *iFs[private]

TBool iHaveCompleteImageHeaders

TBool iHaveCompleteImageHeaders[private]

CImageDataArray iImageData

CImageDataArray iImageData[private]

TFrameInfo iImageInfo

TFrameInfo iImageInfo[private]

TImageParameterData iImageParameterData

TImageParameterData iImageParameterData[private]

CImageReadCodec * iImageReadCodec

CImageReadCodec *iImageReadCodec[private]

TInt iImageType

TInt iImageType[private]

TIntent iIntent

TIntent iIntent[private]

TBool iIntentHasBeenExecuted

TBool iIntentHasBeenExecuted[private]

TInt iLastExtent

TInt iLastExtent[private]

Byte after last data block which was read from data source.

TInt iLastPos

TInt iLastPos[private]

Start byte of last read from data file.

TInt iNextFrameOffset

TInt iNextFrameOffset[private]

TInt iOldSrcDesLength

TInt iOldSrcDesLength[private]

CImageDecoder::TOptions iOptions

CImageDecoder::TOptions iOptions[private]

CImageDecoderPlugin * iPlugin

CImageDecoderPlugin *iPlugin[private]

TInt iPosition

TInt iPosition[private]

TBool iProcessingFrameInfo

TBool iProcessingFrameInfo[private]

HBufC8 * iReadBuffer

HBufC8 *iReadBuffer[private]

TBool iReadOnly

TBool iReadOnly[private]

Flag to indicate if file input is read only or will grow

RThread * iRequestThread

RThread *iRequestThread[private]

TBufPtr8 iSrcDes

TBufPtr8 iSrcDes[private]

TInt iSrcLength

TInt iSrcLength[private]

TInt iStartPosition

TInt iStartPosition[private]

MImageDecoderPrivSupport * iSupport

MImageDecoderPrivSupport *iSupport[private]

HBufC8 * iThumbnailData

HBufC8 *iThumbnailData[private]

HBufC * iUniqueId

HBufC *iUniqueId[private]

TBool iUseBufferReadOptimization

TBool iUseBufferReadOptimization[private]

Flag to Check whether to Use Image buffer read optimization