class CMMFDescriptorBuffer : public CMMFDataBuffer |
This class is a wrapper class to give a descriptor the same API as a CMMFDataBuffer .
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 descriptor buffer or a transfer buffer.
Public Member Functions | |
---|---|
~CMMFDescriptorBuffer () | |
TUint | BufferSize () |
TDes8 & | Data () |
const TDesC8 & | Data () |
IMPORT_C CMMFDescriptorBuffer * | NewL () |
IMPORT_C CMMFDescriptorBuffer * | NewL ( TInt ) |
IMPORT_C void | ReAllocBufferL ( TInt ) |
void | SetPosition ( TUint ) |
void | SetRequestSizeL ( TInt ) |
void | SetStatus ( TBufferStatus ) |
Private Member Functions | |
---|---|
CMMFDescriptorBuffer () | |
void | ConstructL ( TInt ) |
Private Attributes | |
---|---|
TUint8 * | iData |
TPtr8 | iPtr |
Inherited Attributes | |
---|---|
CMMFBuffer::iFrameNumber | |
CMMFBuffer::iLastBuffer | |
CMMFBuffer::iPosition | |
CMMFBuffer::iRequestSize | |
CMMFBuffer::iStatus | |
CMMFBuffer::iTimeToPlay | |
CMMFBuffer::iType |
IMPORT_C | ~CMMFDescriptorBuffer | ( | ) |
Destructor.
Destructor also deletes the buffer contained in the CMMFDescriptorBuffer .
TUint | BufferSize | ( | ) | const [virtual] |
Returns the actual data size (ie. not the maximum length) of the data contained in the CMMFDescriptorBuffer .
void | ConstructL | ( | TInt | aMaxBufferSize | ) | [private] |
Internal.
TInt aMaxBufferSize | The size in bytes of the descriptor buffer to be created. |
TDes8 & | Data | ( | ) | [virtual] |
Returns a descriptor to the data contained in the CMMFDescriptorBuffer .
const TDesC8 & | Data | ( | ) | const [virtual] |
Returns a descriptor to the data contained in the CMMFDescriptorBuffer .
IMPORT_C CMMFDescriptorBuffer * | NewL | ( | ) | [static] |
Method to instantiate a CMMFDescriptorBuffer .
Defaults to a CMMFDescriptorBuffer automatically. This NewL creates a CMMFDescriptorBuffer with a default size of 32 bytes.
IMPORT_C CMMFDescriptorBuffer * | NewL | ( | TInt | aMaxBufferSize | ) | [static] |
Method to instantiate a CMMFDescriptorBuffer . This NewL creates a CMMFDescriptorBuffer with a size of aMaxBufferSize bytes.
TInt aMaxBufferSize | The size in bytes of the descriptor buffer to be created. |
IMPORT_C void | ReAllocBufferL | ( | TInt | aMaxBufferSize | ) |
Reallocates the max size in bytes of a CMMFDescriptorBuffer .
TInt aMaxBufferSize | The new size in bytes of the descriptor buffer. |
void | SetPosition | ( | TUint | aPosition | ) | [virtual] |
Sets the position.
This method 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 max length.
TUint aPosition | The position. |
void | SetRequestSizeL | ( | TInt | aSize | ) | [virtual] |
Sets the request size.
This function 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 which 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 request size and not fill the buffer up to its max length.
TInt aSize | The request size. |
void | SetStatus | ( | TBufferStatus | aStatus | ) | [virtual] |
Overriden method to set the status and resets the data size to 0 when the buffer becomes available.
TBufferStatus aStatus | The buffer status. See TBufferStatus for possible options. |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.