Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: mmfbuffer.h
Link against: mmfserverbaseclasses.lib

Class CMMFBuffer

class CMMFBuffer : public CBase;

Description

Abstract representation of a buffer to contain multimedia data.

Derivation

Members

Defined in CMMFBuffer:
BufferSize(), CMMFBuffer(), FrameNumber(), IsFileServerSafe(), IsSupportedDataBuffer(), LastBuffer(), NextFrame(), Position(), RequestSize(), SetFrameNumber(), SetLastBuffer(), SetPosition(), SetStatus(), SetTimeToPlay(), Status(), TimeToPlay(), Type(), iFrameNumber, iLastBuffer, iPosition, iRequestSize, iStatus, iTimeToPlay, iType, ~CMMFBuffer()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


~CMMFBuffer()

inline virtual ~CMMFBuffer();

Description

Destructor.


CMMFBuffer()

protected: inline CMMFBuffer(TUid aType);

Description

Parameters

TUid aType

[Top]


Member functions


IsSupportedDataBuffer()

static IMPORT_C TBool IsSupportedDataBuffer(TUid aUid);

Description

Static method which returns ETrue if the buffer UID is a supported CMMFDataBuffer type.

Note: If the buffer is not a CMMFDataBuffer this method should return EFalse.

Parameters

TUid aUid

The UID of the CMMFBuffer to be checked for support.

Return value

TBool

The buffer size.


IsFileServerSafe()

static IMPORT_C TBool IsFileServerSafe(TUid aUid);

Description

Static method which returns ETrue if the buffer UID is a buffer that is safe to be used with the file server. If the buffer type is not safe to be used with the file server, then the client would need to copy the contents of the buffer, prior to passing it onto the file server.

This implementation assumes the CMMFPtrBuffer is safe for file server copy. If this is not the case then remove the PtrBuffer set to ETrue.

Parameters

TUid aUid

The UID of the CMMFBuffer to be checked for support.

Return value

TBool

The buffer size.


Type()

inline TUid Type() const;

Description

Returns the buffer type.

Return value

TUid

The buffer type.


SetStatus()

inline virtual void SetStatus(TBufferStatus aStatus);

Description

Sets the buffer's status.

Parameters

TBufferStatus aStatus

The buffer's status.


Status()

inline TBufferStatus Status();

Description

Returns the buffer's status.

Return value

TBufferStatus

The buffer's status.


BufferSize()

virtual TUint BufferSize() const=0;

Description

Returns the size of the data in the buffer.

This is a virtual function that each derived class must implement.

Return value

TUint

The buffer size.


TimeToPlay()

inline TTimeIntervalMicroSeconds TimeToPlay() const;

Description

Returns the buffer timestamp, in microseconds.

Return value

TTimeIntervalMicroSeconds

The buffer timestamp, in microseconds.


SetTimeToPlay()

inline void SetTimeToPlay(TTimeIntervalMicroSeconds aTime);

Description

Sets the buffer timestamp, in microseconds.

Parameters

TTimeIntervalMicroSeconds aTime

The buffer timestamp, in microseconds.


FrameNumber()

inline TUint FrameNumber() const;

Description

Returns the frame number.

Return value

TUint

The frame number.


SetFrameNumber()

inline void SetFrameNumber(TUint aFrame);

Description

Sets the frame number. This is used for repositioning.

Parameters

TUint aFrame

The frame number.


NextFrame()

inline void NextFrame();

Description

Sets the buffer as the next frame.


SetPosition()

inline virtual void SetPosition(TUint aPosition);

Description

Sets the current buffer read/write position. Used as read/write position on a buffer where a codec may need several passes on the same buffer.

Parameters

TUint aPosition

The buffer's number.


Position()

inline virtual TUint Position() const;

Description

Returns the current buffer read/write position. Used as read/write position on a buffer where a codec may need several passes on the same buffer.

Return value

TUint

The buffer's number.


RequestSize()

inline virtual TInt RequestSize() const;

Description

Returns the size of data processed by sink or data needed by source.

Return value

TInt

The size of data


SetLastBuffer()

inline void SetLastBuffer(TBool aLastBuffer);

Description

Sets the buffer as the last buffer.

Parameters

TBool aLastBuffer

A boolean indicating if the buffer is the last buffer. ETrue if it is the last buffer, EFalse otherwise.


LastBuffer()

inline TBool LastBuffer() const;

Description

Tests whether the buffer is the last buffer.

Return value

TBool

A boolean indicating if the buffer is the last one. ETrue if it is the last buffer, EFalse otherwise.

[Top]


Member data


iType

protected: TUid iType;

Description

The buffer type.


iStatus

protected: TBufferStatus iStatus;

Description

The current buffer status.

See also:


iTimeToPlay

protected: TTimeIntervalMicroSeconds iTimeToPlay;

Description

The buffer timestamp, in microseconds.


iPosition

protected: TUint iPosition;

Description

Used to store the current read/write position. Required when the codec and data path may have to read and write the buffer in more than one pass.


iFrameNumber

protected: TUint iFrameNumber;

Description

The frame number.


iRequestSize

protected: TInt iRequestSize;

Description

Stores Request size, needed for dynamic buffer length.


iLastBuffer

protected: TBool iLastBuffer;

Description

Indicates if this is the last buffer. ETrue if it is.