Location:
mmfdatabuffer.h
Link against: mmfserverbaseclasses.lib
class CMMFPtrBuffer : public CMMFDataBuffer;
This class is a wrapper class intended to provide support for shared I/O buffers under EKA2 This class, unlike other data buffers does not own memory - rather it contains a pointer to already allocated memory The purpose of this class is that components such as codecs can use CMMFDataBuffers transparently without having to be concerned with whether the buffer is a standard buffer or memory residing in shared I/O
Users of this class need to be very careful when using buffers of this type. It cannot be assumed that a buffer of this type can be written/read by any process other than the current one - example - handing CMMFPtrBuffer to the file server may not work since the file server's process may not have access to write data buffer.
CBase
- Base class for all classes to be instantiated on the heap
CMMFBuffer
- Abstract representation of a buffer to contain multimedia data
CMMFDataBuffer
- This class is an abstract class for databuffers that can be presented in the form of a descriptor
CMMFPtrBuffer
- This class is a wrapper class intended to provide support for shared I/O buffers under EKA2 This class, unlike other data
buffers does not own memory - rather it contains a pointer to already allocated memory The purpose of this class is that components
such as codecs can use CMMFDataBuffers transparently without having to be concerned with whether the buffer is a standard
buffer or memory residing in shared I/O
Defined in CMMFPtrBuffer
:
BufferSize()
, Data()
, Data()
, NewL()
, NewL()
, SetPosition()
, SetPtr()
, SetRequestSizeL()
, SetStatus()
, ~CMMFPtrBuffer()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CMMFBuffer
:
FrameNumber()
,
IsFileServerSafe()
,
IsSupportedDataBuffer()
,
LastBuffer()
,
NextFrame()
,
Position()
,
RequestSize()
,
SetFrameNumber()
,
SetLastBuffer()
,
SetTimeToPlay()
,
Status()
,
TimeToPlay()
,
Type()
,
iFrameNumber
,
iLastBuffer
,
iPosition
,
iRequestSize
,
iStatus
,
iTimeToPlay
,
iType
static IMPORT_C CMMFPtrBuffer *NewL();
Function to instantiate a CMMFPtrBuffer. This NewL creates an unititalised CMMFPtrBuffer.
|
static IMPORT_C CMMFPtrBuffer *NewL(const TPtr8 &aPtr);
Function to instantiate a CMMFPtrBuffer. This NewL creates a CMMFPtrBuffer which owns a TPtr8
.
|
|
IMPORT_C ~CMMFPtrBuffer();
Destructor.
Destructor does no deletion, as this buffer class does not own the memory.
IMPORT_C void SetPtr(const TPtr8 &aPtr);
Takes a TPtr8
to pre-allocated memory.
|
virtual TDes8 &Data();
Returns a descriptor to the data contained in the CMMFPtrBuffer.
|
virtual const TDesC8 &Data() const;
Returns a descriptor to the data contained in the CMMFPtrBuffer.
|
virtual void SetStatus(TBufferStatus aStatus);
Overriden method to set the status. Resets the data size to 0 when the buffer becomes available.
|
virtual void SetRequestSizeL(TInt aSize);
Sets the request size.
This method is used in cases where a component (eg. a data source) may not be able or be desirable to write to the entire
max length of the buffer (eg. variable bit rate codecs). In this case, the SetRequestSizeL()
can be set which can be read by the RequestSize()
function in the component so that it knows to only write data upto the requested size and not fill the buffer up to its maximum
length.
|
virtual TUint BufferSize() const;
Returns the actual data size (ie. not the max length) of the data contained in the CMMFPtrBuffer.
|
virtual void SetPosition(TUint aPosition);
Sets the position.
This function is used by components (eg. codecs) which read data from a buffer and wish to store a read position marker for further reads.
Note: The position cannot exceed the size of the actual data not the maximum length.
|