Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: MmfDes.h
Link against: mmfstdsourceandsinkplugin.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

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:
BufferEmptiedL(), BufferFilledL(), BytesFree(), CanCreateSinkBuffer(), CanCreateSourceBuffer(), ConstructSinkL(), ConstructSourceL(), CreateSinkBufferL(), CreateSourceBufferL(), EmptyBufferL(), FillBufferL(), ReadBufferL(), ReadBufferL(), ReadBufferL(), SetSize(), SinkDataTypeCode(), Size(), SourceDataTypeCode(), WriteBufferL(), WriteBufferL(), WriteBufferL(), ~CMMFDescriptor()

Inherited from CBase:
Extension_(), operator new()

Inherited from CMMFClip:
Delete()

Inherited from MDataSink:
DataSinkType(), NegotiateL(), NewSinkL(), SetSinkDataTypeCode(), SetSinkPrioritySettings(), SinkCustomCommand(), SinkPauseL(), SinkPlayL(), SinkPrimeL(), SinkStopL(), SinkThreadLogoff(), SinkThreadLogon()

Inherited from MDataSource:
DataSourceType(), NegotiateSourceL(), NewSourceL(), SetSourceDataTypeCode(), SetSourcePrioritySettings(), SourceCustomCommand(), SourcePauseL(), SourcePlayL(), SourcePrimeL(), SourceSampleConvert(), SourceStopL(), SourceThreadLogoff(), SourceThreadLogon()


Construction and destruction


~CMMFDescriptor()

virtual ~CMMFDescriptor();

Description

Destructor.

The default implementation closes the descriptor thread.

[Top]


Member functions


SourceDataTypeCode()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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.