Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <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:

Inherited from CBase:


Construction and destruction


~CMMFBuffer()

inline virtual ~CMMFBuffer();

Description

Destructor.


CMMFBuffer(TUid)

protected: inline CMMFBuffer(TUid aType);

Description

Parameters

TUid aType

[Top]


Member functions


IsSupportedDataBuffer(TUid)

IMPORT_C static 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(TUid)

IMPORT_C static 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()const

inline TUid Type() const;

Description

Returns the buffer type.

Return value

TUid

The buffer type.


SetStatus(TBufferStatus)

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

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

inline TTimeIntervalMicroSeconds TimeToPlay() const;

Description

Returns the buffer timestamp, in microseconds.

Return value

TTimeIntervalMicroSeconds

The buffer timestamp, in microseconds.


SetTimeToPlay(TTimeIntervalMicroSeconds)

inline void SetTimeToPlay(TTimeIntervalMicroSeconds aTime);

Description

Sets the buffer timestamp, in microseconds.

Parameters

TTimeIntervalMicroSeconds aTime

The buffer timestamp, in microseconds.


FrameNumber()const

inline TUint FrameNumber() const;

Description

Returns the frame number.

Return value

TUint

The frame number.


SetFrameNumber(TUint)

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

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

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

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

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

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.


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.