CImageDecoderPlugin Class Reference

class CImageDecoderPlugin : public CBase

The PluginAPI for Image Converter Library decoder plugins.

Intended for use by plugin writers only.

Inherits from

Public Member Functions
~CImageDecoderPlugin()
IMPORT_C HBufC *FrameCommentL(TInt, TInt)
IMPORT_C TIntGetDestinationSize(TSize &, TInt)
IMPORT_C voidGetExtensionL(TUid, MImageConvExtension *&)
IMPORT_C HBufC *ImageCommentL(TInt)
voidImageType(TInt, TUid &, TUid &)
IMPORT_C TIntNumberOfFrameComments(TInt)
IMPORT_C TIntNumberOfImageComments()
IMPORT_C voidSetClippingRectL(const TRect *)
Protected Member Functions
CImageDecoderPlugin()
IMPORT_C TBoolAmInThread()
IMPORT_C TIntAppendImageData(const TImageDataBlock *)
IMPORT_C TIntAppendImageDataBuffer(const HBufC8 *)
IMPORT_C voidCleanup()
IMPORT_C TIntDataLength()
IMPORT_C CImageDecoder::TOptionsDecoderOptions()
IMPORT_C const CFbsBitmap &Destination()
IMPORT_C const CFbsBitmap &DestinationMask()
IMPORT_C voidDoConvert()
IMPORT_C TIntFrameBlockSize(TInt)
IMPORT_C const CFrameImageData &FrameData(TInt)
IMPORT_C TIntFrameHeaderBlockSize(TInt)
IMPORT_C const TFrameInfo &FrameInfo(TInt)
IMPORT_C CFrameInfoStrings *FrameInfoStringsL(RFs &, TInt)
IMPORT_C voidHandleCustomSyncL(TInt)
IMPORT_C voidHandleProcessFrameResult(TInt, TFrameState)
IMPORT_C const TImageDataBlock *ImageData(TInt)
IMPORT_C TIntImageDataCount()
IMPORT_C const TFrameInfo &ImageInfo()
IMPORT_C CImageReadCodec *ImageReadCodec()
IMPORT_C voidInitConvertL()
IMPORT_C voidInitCustomAsyncL(TInt)
IMPORT_C TIntInsertImageData(const TImageDataBlock *, TInt)
IMPORT_C TBoolIsImageHeaderProcessingComplete()
IMPORT_C voidNotifyComplete()
IMPORT_C TIntNumberOfFrames()
IMPORT_C voidOpenExtraResourceFileLC(RFs &, const TUid, RResourceFile &)
IMPORT_C TIntPosition()
IMPORT_C voidPrepareForProcessFrameL()
IMPORT_C voidReadDataL(TInt, TPtrC8 &, TInt)
IMPORT_C voidReadFrameHeadersL()
IMPORT_C voidRemoveImageData(TInt)
IMPORT_C voidRequestComplete(TInt)
IMPORT_C voidRequestInitL(TInt)
voidScanDataL()
IMPORT_C voidSelfComplete(TInt)
IMPORT_C voidSetDataLength(TInt)
IMPORT_C voidSetImageInfo(const TFrameInfo &)
IMPORT_C voidSetImageReadCodec(CImageReadCodec *)
IMPORT_C voidSetPosition(const TInt)
IMPORT_C voidSetSelfPending()
IMPORT_C voidSetStartPosition(TInt)
IMPORT_C voidSetThumbnailData(HBufC8 *)
IMPORT_C TBoolShouldAbort()
IMPORT_C TBufPtr8 &SourceData()
IMPORT_C TIntSourceLength()
IMPORT_C TIntStartPosition()
IMPORT_C TBoolValidDestination()
IMPORT_C TBoolValidDestinationMask()
Private Member Functions
IMPORT_C voidEnableMaskGeneration()
IMPORT_C voidNotifyImageTypeChangeL(TInt)
IMPORT_C voidReservedVirtual1()
TBool ValidProperties()
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()
Private Attributes
CImageDecoderPriv *iProperties

Constructor & Destructor Documentation

CImageDecoderPlugin()

IMPORT_CCImageDecoderPlugin()[protected]

~CImageDecoderPlugin()

IMPORT_C~CImageDecoderPlugin()

Member Functions Documentation

AmInThread()

IMPORT_C TBoolAmInThread()const [protected]

AppendImageData(const TImageDataBlock *)

IMPORT_C TIntAppendImageData(const TImageDataBlock *aEntry)[protected]

Parameters

const TImageDataBlock * aEntry

AppendImageDataBuffer(const HBufC8 *)

IMPORT_C TIntAppendImageDataBuffer(const HBufC8 *aImageBuffer)[protected]

Parameters

const HBufC8 * aImageBuffer

Cleanup()

IMPORT_C voidCleanup()[protected, virtual]

DataLength()

IMPORT_C TIntDataLength()const [protected]

DecoderOptions()

IMPORT_C CImageDecoder::TOptionsDecoderOptions()const [protected]

Destination()

IMPORT_C const CFbsBitmap &Destination()const [protected]

DestinationMask()

IMPORT_C const CFbsBitmap &DestinationMask()const [protected]

DoConvert()

IMPORT_C voidDoConvert()[protected, virtual]

EnableMaskGeneration()

IMPORT_C voidEnableMaskGeneration()[private, virtual]

FrameBlockSize(TInt)

IMPORT_C TIntFrameBlockSize(TIntaFrameNumber)const [protected, virtual]

Parameters

TInt aFrameNumber

FrameCommentL(TInt, TInt)

IMPORT_C HBufC *FrameCommentL(TIntaFrameNumber,
TIntaCommentNumber
)const [virtual]

Parameters

TInt aFrameNumber
TInt aCommentNumber

FrameData(TInt)

IMPORT_C const CFrameImageData &FrameData(TIntaFrameNumber = 0)const [protected]

Parameters

TInt aFrameNumber = 0

FrameHeaderBlockSize(TInt)

IMPORT_C TIntFrameHeaderBlockSize(TIntaFrameNumber)const [protected, virtual]

Parameters

TInt aFrameNumber

FrameInfo(TInt)

IMPORT_C const TFrameInfo &FrameInfo(TIntaFrameNumber = 0)const [protected]

Parameters

TInt aFrameNumber = 0

FrameInfoStringsL(RFs &, TInt)

IMPORT_C CFrameInfoStrings *FrameInfoStringsL(RFs &aFs,
TIntaFrameNumber = 0
)[protected, pure virtual]

Returns the codec specific frame information stored in resource files.

This is a virtual function that each individual plugin must implement.

A pointer to a newly allocated CFrameInfoStrings object. Ownership is transferred to the caller.

Parameters

RFs & aFsA handle to a file server session.
TInt aFrameNumber = 0The frame number to which the codec specific frame information applies (optional, defaults to zero).

GetDestinationSize(TSize &, TInt)

IMPORT_C TIntGetDestinationSize(TSize &aSize,
TIntaFrameNumber = 0
)[virtual]

Called by framework on plugin to get the size of decoded image.

Get the size of the decoded image for the given frame. The calculation will account for any clipping rectangle set, scaling applied through the TImageConvScaler extension and any operation applied through TImageConvOperation. If TImageConvScaler::SetScalingL(.. has been called then the size of the bitmap passed to CImageDecoder::Convert must match the size returned from this function.

KErrArgument if an error in calculation is detected e.g. if clipping rectangle is outside of the overall frame boundary.

Other system wide errors.

Parameters

TSize & aSizeReturns the size of the decoded image.
TInt aFrameNumber = 0The frame number.

GetExtensionL(TUid, MImageConvExtension *&)

IMPORT_C voidGetExtensionL(TUidaExtUid,
MImageConvExtension *&aExtPtr
)[virtual]

Called by the framework to obtain a pointer to a codec implemented extension.

icl_uids.hrh .

Parameters

TUid aExtUidExtension UID normally prefixed KUidImageConv.
MImageConvExtension *& aExtPtrReturns a ptr to the extension implemented by the codec plugin.

HandleCustomSyncL(TInt)

IMPORT_C voidHandleCustomSyncL(TIntaParam)[protected, virtual]

Parameters

TInt aParam

HandleProcessFrameResult(TInt, TFrameState)

IMPORT_C voidHandleProcessFrameResult(TIntaErrCode,
TFrameStateaCodecState
)[protected]

Parameters

TInt aErrCode
TFrameState aCodecState

ImageCommentL(TInt)

IMPORT_C HBufC *ImageCommentL(TIntaCommentNumber)const [virtual]

Parameters

TInt aCommentNumber

ImageData(TInt)

IMPORT_C const TImageDataBlock *ImageData(TIntaIndex)const [protected]

Parameters

TInt aIndex

ImageDataCount()

IMPORT_C TIntImageDataCount()const [protected]

ImageInfo()

IMPORT_C const TFrameInfo &ImageInfo()const [protected]

ImageReadCodec()

IMPORT_C CImageReadCodec *ImageReadCodec()const [protected]

ImageType(TInt, TUid &, TUid &)

voidImageType(TIntaFrameNumber,
TUid &aImageType,
TUid &aImageSubType
)const [pure virtual]

Returns the image type and sub-type for a given frame of the image that has just been opened.

This is a virtual function that each individual plugin must implement.

Parameters

TInt aFrameNumberThe frame index for type and sub-type information should be returned.
TUid & aImageTypeOn return contains the image type UID for the specified frame.
TUid & aImageSubTypeOn return contains the image sub-type UID for the specified frame. If the sub-type does not exist KNullUid is returned.

InitConvertL()

IMPORT_C voidInitConvertL()[protected, virtual]

InitCustomAsyncL(TInt)

IMPORT_C voidInitCustomAsyncL(TIntaParam)[protected, virtual]

Parameters

TInt aParam

InsertImageData(const TImageDataBlock *, TInt)

IMPORT_C TIntInsertImageData(const TImageDataBlock *aEntry,
TIntaPos
)[protected]

Parameters

const TImageDataBlock * aEntry
TInt aPos

IsImageHeaderProcessingComplete()

IMPORT_C TBoolIsImageHeaderProcessingComplete()const [protected]

NotifyComplete()

IMPORT_C voidNotifyComplete()[protected, virtual]

NotifyImageTypeChangeL(TInt)

IMPORT_C voidNotifyImageTypeChangeL(TIntaImageType)[private, virtual]

Parameters

TInt aImageType

NumberOfFrameComments(TInt)

IMPORT_C TIntNumberOfFrameComments(TIntaFrameNumber)const [virtual]

Parameters

TInt aFrameNumber

NumberOfFrames()

IMPORT_C TIntNumberOfFrames()const [protected]

NumberOfImageComments()

IMPORT_C TIntNumberOfImageComments()const [virtual]

OpenExtraResourceFileLC(RFs &, const TUid, RResourceFile &)

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

Parameters

RFs & aFs
const TUid aUid
RResourceFile & aResourceFile

Position()

IMPORT_C TIntPosition()const [protected]

PrepareForProcessFrameL()

IMPORT_C voidPrepareForProcessFrameL()[protected]

ReadDataL(TInt, TPtrC8 &, TInt)

IMPORT_C voidReadDataL(TIntaPosition,
TPtrC8 &aReadBuffer,
TIntaLength
)[protected]

Parameters

TInt aPosition
TPtrC8 & aReadBuffer
TInt aLength

ReadFrameHeadersL()

IMPORT_C voidReadFrameHeadersL()[protected, virtual]

RemoveImageData(TInt)

IMPORT_C voidRemoveImageData(TIntaPos)[protected]

Parameters

TInt aPos

RequestComplete(TInt)

IMPORT_C voidRequestComplete(TIntaReason)[protected]

Parameters

TInt aReason

RequestInitL(TInt)

IMPORT_C voidRequestInitL(TIntaFrameNumber)[protected]

Parameters

TInt aFrameNumber

ReservedVirtual1()

IMPORT_C voidReservedVirtual1()[private, virtual]

ScanDataL()

voidScanDataL()[protected, pure virtual]

Invokes the ReadFrameHeadersL() method of the supplied plugin.

The plugin's version of ReadFrameHeadersL() should read the image header information, create the required codec and read the frame headers.

This is a virtual function that each individual plugin must implement.

SelfComplete(TInt)

IMPORT_C voidSelfComplete(TIntaReason)[protected]

Parameters

TInt aReason

SetClippingRectL(const TRect *)

IMPORT_C voidSetClippingRectL(const TRect *aClipRect)[virtual]

Called by the framework on the plugin to apply a clipping rectangle to the image.

Sets the area of interest of the image to be decoded.

leave

KErrNotSupported if clipping is not supported by the codec plugin.

leave

Other system-wide error codes.

Parameters

const TRect * aClipRectA pointer to a TRect that specifies the location and size of the region to be decoded. This rectangle must have positive width and height values as per TRect::IsNormalized() and TRect::Normalize(). Passing in a NULL value will clear the clipping rectangle. Note that a clipping rectangle may not be valid for all frames of an image.

SetDataLength(TInt)

IMPORT_C voidSetDataLength(TIntaDataLength)[protected]

Parameters

TInt aDataLength

SetImageInfo(const TFrameInfo &)

IMPORT_C voidSetImageInfo(const TFrameInfo &aImageInfo)[protected]

Parameters

const TFrameInfo & aImageInfo

SetImageReadCodec(CImageReadCodec *)

IMPORT_C voidSetImageReadCodec(CImageReadCodec *aImageReadCodec)[protected]

Parameters

CImageReadCodec * aImageReadCodec

SetPosition(const TInt)

IMPORT_C voidSetPosition(const TIntaPosition)[protected]

Parameters

const TInt aPosition

SetSelfPending()

IMPORT_C voidSetSelfPending()[protected]

SetStartPosition(TInt)

IMPORT_C voidSetStartPosition(TIntaDataLength)[protected]

Parameters

TInt aDataLength

SetThumbnailData(HBufC8 *)

IMPORT_C voidSetThumbnailData(HBufC8 *aThumbnailData)[protected]

Parameters

HBufC8 * aThumbnailData

ShouldAbort()

IMPORT_C TBoolShouldAbort()const [protected]

SourceData()

IMPORT_C TBufPtr8 &SourceData()[protected]

SourceLength()

IMPORT_C TIntSourceLength()const [protected]

StartPosition()

IMPORT_C TIntStartPosition()const [protected]

ValidDestination()

IMPORT_C TBoolValidDestination()const [protected]

ValidDestinationMask()

IMPORT_C TBoolValidDestinationMask()const [protected]

ValidProperties()

TBool ValidProperties()const [private]

Member Data Documentation

CImageDecoderPriv * iProperties

CImageDecoderPriv *iProperties[private]