Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <MmfDes.h>
Link against: mmfstdsourceandsinkplugin.lib
This item is not part of the S60 5th Edition SDK

Class CMMFDescriptor

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

Members

Defined in CMMFDescriptor:

Inherited from CBase:

Inherited from CMMFClip:

Inherited from MDataSink:

Inherited from MDataSource:


Construction and destruction


~CMMFDescriptor()

virtual ~CMMFDescriptor();

Description

Destructor.

The default implementation closes the descriptor thread.

[Top]


Member functions


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

TFourCC

The data type fourCC code.


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

CMMFBuffer *aBuffer

The emptied buffer.


CanCreateSourceBuffer()

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

CMMFBuffer *

NULL as a CMMFFile cannot create it's own buffer


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

TMediaId aMediaId

Return value

TFourCC

The data type fourCC code.


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

CMMFBuffer *aBuffer

The filled buffer.


CanCreateSinkBuffer()

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.


BytesFree()

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).


Size()

virtual TInt Size();

Description

Returns the length of the clip.

Return value

TInt

The length (not max length) of the descriptor.


SetSize(TInt)

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.