#include <MmfDes.h>
Link against:
mmfstdsourceandsinkplugin.lib
This item is not part of the S60 5th Edition SDK
class CMMFDescriptor : public CMMFClip;
Description
MultiMedia framework class. Represents a client side descriptor. May be source descriptor from which data is read or destination
to which data is written
Derivation
MDataSink
-
Abstract class representing a data sink.
MDataSource
-
Abstract class representing a data source.
CBase
-
Base class for all classes to be instantiated on the heap.
Members
Defined in CMMFDescriptor
:
BufferEmptiedL(CMMFBuffer *)
CMMFDescriptor as a source is always passive so this function is not supported.
BufferFilledL(CMMFBuffer *)
CMMFDescriptor as a sink is always passive so this function is not supported.
BytesFree()
Returns the amount of space available for the clip.
CanCreateSinkBuffer()
Tests whether a sink buffer can be created.
CanCreateSourceBuffer()
Tests whether a source buffer can be created.
ConstructSinkL(const TDesC8 &)
Performs sink construction dependant on the sink construction initialisation dat...
ConstructSourceL(const TDesC8 &)
Performs source construction dependant on the source construction initialisation...
CreateSinkBufferL(TMediaId,TBool &)
Creates a sink buffer.
CreateSourceBufferL(TMediaId,TBool &)
Creates a source buffer.
EmptyBufferL(CMMFBuffer *,MDataSource *,TMediaId)
Empties aBuffer into iDes.
FillBufferL(CMMFBuffer *,MDataSink *,TMediaId)
Loads aBuffer from iDes.
ReadBufferL(CMMFBuffer *,TInt)
Loads aBuffer from specified point in iDes. Note that this is a synchronous read...
ReadBufferL(CMMFBuffer *,TInt,MDataSink *)
Loads aBuffer from specified point in iDes
ReadBufferL(TInt,CMMFBuffer *,TInt,MDataSink *)
Loads aLength number of bytes into aBuffer from specified point in iDes.
SetSize(TInt)
Sets the size of the clip. This should be overriden in the derived classes, the ...
SinkDataTypeCode(TMediaId)
Returns the data type as a fourCC code of the CMMFDescriptor data sink.
Size()
Returns the length of the clip.
SourceDataTypeCode(TMediaId)
Returns the data type as a fourCC code for the CMMFDescriptor data source.
WriteBufferL(CMMFBuffer *,TInt)
Empties aBuffer into iFile at specified location. Note that this is a synchronou...
WriteBufferL(CMMFBuffer *,TInt,MDataSource *)
Empties aBuffer into iDes at specified location.
WriteBufferL(TInt,CMMFBuffer *,TInt,MDataSource *)
Empties aLength bytes from aBuffer into iDes at specified location.
~CMMFDescriptor()
Destructor.
Inherited from CBase
:
Inherited from CMMFClip
:
Inherited from MDataSink
:
Inherited from MDataSource
:
Construction and destruction
virtual ~CMMFDescriptor();
Description
Destructor.
The default implementation closes the descriptor thread.
SourceDataTypeCode(TMediaId)
virtual TFourCC SourceDataTypeCode(TMediaId aMediaId);
Description
Returns the data type as a fourCC code for the CMMFDescriptor data source.
Parameters
TMediaId aMediaId |
The ID of the media for which the codec is obtained.
|
|
Return value
FillBufferL(CMMFBuffer *,MDataSink *,TMediaId)
virtual void FillBufferL(CMMFBuffer *aBuffer, MDataSink *aConsumer, TMediaId aMediaId);
Description
Loads aBuffer from iDes.
File read is asynchronous. CReadRequest
is created to respond to completion.
Parameters
CMMFBuffer *aBuffer |
The buffer to be filled from the descriptor.
|
MDataSink *aConsumer |
The data sink consumer of the buffer.
|
TMediaId aMediaId |
Not used.
|
|
BufferEmptiedL(CMMFBuffer *)
virtual void BufferEmptiedL(CMMFBuffer *aBuffer);
Description
CMMFDescriptor as a source is always passive so this function is not supported.
Parameters
virtual TBool CanCreateSourceBuffer();
Description
Tests whether a source buffer can be created.
Return value
TBool
|
A boolean indicating if the buffer can be created. EFalse if a CMMFDescriptor cannot create it's own buffer
|
|
CreateSourceBufferL(TMediaId,TBool &)
virtual CMMFBuffer* CreateSourceBufferL(TMediaId aMediaId, TBool &aReference);
Description
Creates a source buffer.
Parameters
TMediaId aMediaId |
The Media ID.
|
TBool &aReference |
A boolean indicating if MDataSource owns the buffer. ETrue if MDataSource owns the buffer, EFalse if the caller owns the buffer.
|
|
Return value
SinkDataTypeCode(TMediaId)
virtual TFourCC SinkDataTypeCode(TMediaId aMediaId);
Description
Returns the data type as a fourCC code of the CMMFDescriptor data sink.
Used by MDataSource
and MDataSink
.
Parameters
Return value
EmptyBufferL(CMMFBuffer *,MDataSource *,TMediaId)
virtual void EmptyBufferL(CMMFBuffer *aBuffer, MDataSource *aSupplier, TMediaId aMediaId);
Description
Empties aBuffer into iDes.
Parameters
CMMFBuffer *aBuffer |
The buffer to be written to the descriptor.
|
MDataSource *aSupplier |
The data source supplier of the buffer.
|
TMediaId aMediaId |
The Media ID.
|
|
BufferFilledL(CMMFBuffer *)
virtual void BufferFilledL(CMMFBuffer *aBuffer);
Description
CMMFDescriptor as a sink is always passive so this function is not supported.
Parameters
virtual TBool CanCreateSinkBuffer();
Description
Tests whether a sink buffer can be created.
Return value
TBool
|
A boolean indicating if the sink buffer can be created. EFalse if a CMMFDescriptor cannot create it's own buffer.
|
|
CreateSinkBufferL(TMediaId,TBool &)
virtual CMMFBuffer* CreateSinkBufferL(TMediaId aMediaId, TBool &aReference);
Description
Creates a sink buffer.
Parameters
TMediaId aMediaId |
The Media ID.
|
TBool &aReference |
A boolean indicating if MDataSource owns the buffer. ETrue if MDataSource owns the buffer, EFalse if the caller owns the buffer.
|
|
Return value
CMMFBuffer *
|
NULL as a CMMFDescriptor cannot create it's own buffer
|
|
ReadBufferL(TInt,CMMFBuffer *,TInt,MDataSink *)
virtual void ReadBufferL(TInt aLength, CMMFBuffer *aBuffer, TInt aPosition, MDataSink *aConsumer);
Description
Loads aLength number of bytes into aBuffer from specified point in iDes.
Parameters
TInt aLength |
The number of bytes to be read into buffer.
|
CMMFBuffer *aBuffer |
The buffer to be filled from the descriptor.
|
TInt aPosition |
The offset into the descriptor at which to start reading.
|
MDataSink *aConsumer |
The data sink consumer of the buffer
|
|
WriteBufferL(TInt,CMMFBuffer *,TInt,MDataSource *)
virtual void WriteBufferL(TInt aLength, CMMFBuffer *aBuffer, TInt aPosition, MDataSource *aSupplier);
Description
Empties aLength bytes from aBuffer into iDes at specified location.
Parameters
TInt aLength |
The number of bytes to be emptied from buffer.
|
CMMFBuffer *aBuffer |
The data buffer containing bytes to be written.
|
TInt aPosition |
The offset into the descriptor at which to start writing.
|
MDataSource *aSupplier |
The data source to be notified when the write has been completed.
|
|
Leave codes
KErrNotReady |
If SinkPrimeL() and SinkThreadLogon() have not been called.
|
KErrArgument |
If aLength<0 or aPosition<0 or aSupplier is NULL.
|
KErrNotSupported |
If aBuffer is not of type KMMFDataBuffer.
|
|
ReadBufferL(CMMFBuffer *,TInt,MDataSink *)
virtual void ReadBufferL(CMMFBuffer *aBuffer, TInt aPosition, MDataSink *aConsumer);
Description
Loads aBuffer from specified point in iDes
Parameters
CMMFBuffer *aBuffer |
The buffer to be filled from the descriptor.
|
TInt aPosition |
The offset into the descriptor at which to start reading.
|
MDataSink *aConsumer |
The data sink consumer of the buffer.
|
|
WriteBufferL(CMMFBuffer *,TInt,MDataSource *)
virtual void WriteBufferL(CMMFBuffer *aBuffer, TInt aPosition, MDataSource *aSupplier);
Description
Empties aBuffer into iDes at specified location.
Parameters
CMMFBuffer *aBuffer |
The data buffer containing bytes to be written.
|
TInt aPosition |
The offset into the descriptor at which to start writing.
|
MDataSource *aSupplier |
The data source to be notified when the write has been completed.
|
|
ReadBufferL(CMMFBuffer *,TInt)
virtual void ReadBufferL(CMMFBuffer *aBuffer, TInt aPosition);
Description
Loads aBuffer from specified point in iDes. Note that this is a synchronous read.
Parameters
CMMFBuffer *aBuffer |
The buffer to be filled from the descriptor.
|
TInt aPosition |
The offset into the descriptor at which to start reading.
|
|
WriteBufferL(CMMFBuffer *,TInt)
virtual void WriteBufferL(CMMFBuffer *aBuffer, TInt aPosition);
Description
Empties aBuffer into iFile at specified location. Note that this is a synchronous write
Parameters
CMMFBuffer *aBuffer |
The data buffer containing bytes to be written.
|
TInt aPosition |
The offset into file at which to start writing.
|
|
virtual TInt64 BytesFree();
Description
Returns the amount of space available for the clip.
Return value
TInt64
|
The space available in descriptor (difference between length and maxlength).
|
|
virtual TInt Size();
Description
Returns the length of the clip.
Return value
TInt
|
The length (not max length) of the descriptor.
|
|
virtual TInt SetSize(TInt aSize);
Description
Sets the size of the clip. This should be overriden in the derived classes, the default version returns KErrNotSupported.
Parameters
TInt aSize |
The size of the clip.
|
|
Return value
TInt
|
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error
codes.
|
|
ConstructSinkL(const TDesC8 &)
protected: virtual void ConstructSinkL(const TDesC8 &aInitData);
Description
Performs sink construction dependant on the sink construction initialisation data aInitData.
Parameters
const TDesC8 &aInitData |
The TPckgC<TMMFDescriptorParams> descriptor package containing the descriptor and the thread ID for the descriptor.
|
|
ConstructSourceL(const TDesC8 &)
protected: virtual void ConstructSourceL(const TDesC8 &aInitData);
Description
Performs source construction dependant on the source construction initialisation data aInitData.
Parameters
const TDesC8 &aInitData |
The TPckgC<TMMFDescriptorParams> descriptor package containing the descriptor and the thread ID for the descriptor.
|
|