Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: MdaImageConverter.h
Link against: MediaClientImage.lib

Class CMdaImageUtility

CMdaImageUtility

Support

Supported from 5.0

Description

The abstract base class for the image conversion utilities.

Clients of the concrete conversion classes call the functions provided by this interface to perform the conversion. The implementation of these functions is provided either by the concrete conversion classes themselves or by private implementation classes.

Derivation

CActiveThe core class of the active object abstraction
CBaseBase class for all classes to be instantiated on the heap
CMdaImageUtilityThe abstract base class for the image conversion utilities
CMdaResourceBase class used in the derivation of CMdaImageUtility
MMdaObjectStateChangeObserverAn interface class for handling the change of state of an audio data sample object

Defined in CMdaImageUtility:
CancelConvertL(), Close(), ConvertL(), FrameCount(), FrameInfo()

Inherited from CActive:
Cancel(), Deque(), DoCancel(), EPriorityHigh, EPriorityIdle, EPriorityLow, EPriorityStandard, EPriorityUserInput, IsActive(), IsAdded(), Priority(), RunError(), RunL(), SetActive(), SetPriority(), TPriority, iStatus

Inherited from CBase:
operator new()

Inherited from MMdaObjectStateChangeObserver:
MoscoStateChangeEvent()


Conversion


ConvertL()

virtual void ConvertL(CFbsBitmap& aBitmap,TInt aFrameNumber = 0) = 0;
virtual void ConvertL(CFbsBitmap& aBitmap,CFbsBitmap& aMaskBitmap,TInt aFrameNumber = 0) = 0;

Description

Begins the image conversion operation for the specified frame — overloaded function.

The operation is asynchronous. When the conversion operation is complete, successfully or otherwise, the callback function MMdaImageUtilObserver::MiuoConvertComplete() is called.

When converting from a file or descriptor to a bitmap, the operation can complete with KErrUnderflow, if there is insufficient information in the file or descriptor. Typically, this occurs when using the file or descriptor as a cache. In this situation, the conversion operation should be performed repeatedly until the file or descriptor has accumulated enough information for the operation to complete with KErrNone. As much of the image as is present is converted and written to the target bitmap at each call to this function.

Parameters

CFbsBitmap& aBitmap

A reference to a bitmap. This may be a source or a target for the conversion process, depending on the concrete conversion class utility being used.

CFbsBitmap& aMaskBitmap

A masking bitmap.

TInt aFrameNumber = 0

The frame number. This value is relative to zero. For those concrete conversion classes which perform conversion from a bitmap, this value must always be zero. For those concrete conversion classes which perform conversion to a bitmap, this value must be less than the number of frames in the image.

Leave codes

 

The function always attempts to allocate a cell to contain the new element and may also attempt to expand the array buffer. If there is insufficient memory available, the function leaves. The leave code is one of the system wide error codes. If the function leaves, the array is left in the state it was in before the call.


CancelConvertL()

virtual void CancelConvertL() = 0;

Description

Cancels the conversion operation. The callback function MMdaImageUtilObserver::MiuoConvertComplete() is not called.

[Top]


Closing


Close()

virtual void Close();

Description

Closes the open file-based or descriptor-based image.

Any conversion operation in progress is cancelled.

[Top]


Information


FrameInfo()

virtual void FrameInfo(TInt aFrame,TFrameInfo& aInfo) const;

Description

Retrieves information about the specified frame.

This function should only be called after an existing image has been successfully opened or a new image successfully created.

Parameters

TInt aFrame

The frame number. This value is relative to zero. The value must be less than the total number of frames in the image, otherwise the function raises a USER 0 panic

TFrameInfo& aInfo

Frame information.


FrameCount()

virtual TInt FrameCount() const;

Description

Returns the number of frames, counting from the first frame in the image, to the next frame to be decoded.

For example, if 5 frames in the image have been decoded, this function returns 5 if there are no more frames to decode, otherwise 6, regardless of how many more frames there are in the image.

Return value

TInt

The number of the next frame to be decoded.

Notes: