![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
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
- ...
CMMFPtrBuffer
- ...
Defined in CMMFPtrBuffer
:
BufferSize()const
Returns the actual data size (ie. not the max length) of the data contained in t...Data()
Returns a descriptor to the data contained in the CMMFPtrBuffer.Data()const
Returns a descriptor to the data contained in the CMMFPtrBuffer.NewL()
Function to instantiate a CMMFPtrBuffer. This NewL creates an unititalised CMMFP...NewL(const TPtr8 &)
Function to instantiate a CMMFPtrBuffer. This NewL creates a CMMFPtrBuffer which...SetPosition(TUint)
Sets the position.SetPtr(const TPtr8 &)
Takes a TPtr8 to pre-allocated memory.SetRequestSizeL(TInt)
Sets the request size.SetStatus(TBufferStatus)
Overriden method to set the status. Resets the data size to 0 when the buffer be...~CMMFPtrBuffer()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...Inherited from CMMFBuffer
:
CMMFBuffer(TUid)
FrameNumber()const
Returns the frame number.IsFileServerSafe(TUid)
Static method which returns ETrue if the buffer UID is a buffer that is safe to ...IsSupportedDataBuffer(TUid)
Static method which returns ETrue if the buffer UID is a supported CMMFDataBuffe...LastBuffer()const
Tests whether the buffer is the last buffer.NextFrame()
Sets the buffer as the next frame. Position()const
Returns the current buffer read/write position. Used as read/write position on a...RequestSize()const
Returns the size of data processed by sink or data needed by source.SetFrameNumber(TUint)
Sets the frame number. This is used for repositioning.SetLastBuffer(TBool)
Sets the buffer as the last buffer.SetTimeToPlay(TTimeIntervalMicroSeconds)
Sets the buffer timestamp, in microseconds.Status()
Returns the buffer's status.TimeToPlay()const
Returns the buffer timestamp, in microseconds.Type()const
Returns the buffer type.iFrameNumber
The frame number.iLastBuffer
Indicates if this is the last buffer. ETrue if it is.iPosition
Used to store the current read/write position. Required when the codec and data ...iRequestSize
Stores Request size, needed for dynamic buffer length.iStatus
The current buffer status.iTimeToPlay
The buffer timestamp, in microseconds.iType
The buffer type.Inherited from CMMFDataBuffer
:
CMMFDataBuffer(TUid)
Protected constructor.NewL(TInt)
Method to instantiate a CMMFDataBuffer defaults to a CMMFDescriptorBuffer by def...IMPORT_C static CMMFPtrBuffer* NewL();
Function to instantiate a CMMFPtrBuffer. This NewL creates an unititalised CMMFPtrBuffer.
|
IMPORT_C static 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 CMMFPtrBuffer::SetRequestSizeL(TInt)
can be set which can be read by the CMMFBuffer::RequestSize()const
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.
|