Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: Mmfclip.h

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

Class CMMFClip

class CMMFClip : public CBase, public MDataSource, public MDataSink;

Description

Abstract class to represent a source or sink that contains a multimedia clip (i.e. not a stream or hardware device).

Typical examples are a file or an area of memory (descriptor).

Derivation

Members

Defined in CMMFClip:
BytesFree(), CMMFClip(), Delete(), ReadBufferL(), ReadBufferL(), ReadBufferL(), SetSize(), Size(), WriteBufferL(), WriteBufferL(), WriteBufferL()

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

Inherited from MDataSink:
BufferFilledL(), CanCreateSinkBuffer(), ConstructSinkL(), CreateSinkBufferL(), DataSinkType(), EmptyBufferL(), NegotiateL(), NewSinkL(), SetSinkDataTypeCode(), SetSinkPrioritySettings(), SinkCustomCommand(), SinkDataTypeCode(), SinkPauseL(), SinkPlayL(), SinkPrimeL(), SinkStopL(), SinkThreadLogoff(), SinkThreadLogon()

Inherited from MDataSource:
BufferEmptiedL(), CanCreateSourceBuffer(), ConstructSourceL(), CreateSourceBufferL(), DataSourceType(), FillBufferL(), NegotiateSourceL(), NewSourceL(), SetSourceDataTypeCode(), SetSourcePrioritySettings(), SourceCustomCommand(), SourceDataTypeCode(), SourcePauseL(), SourcePlayL(), SourcePrimeL(), SourceSampleConvert(), SourceStopL(), SourceThreadLogoff(), SourceThreadLogon()


Construction and destruction


CMMFClip()

protected: inline CMMFClip(TUid aSourceType, TUid aSinkType);

Description

Protected constructor.

Parameters

TUid aSourceType

The source type.

TUid aSinkType

The sink type.

[Top]


Member functions


ReadBufferL()

virtual void ReadBufferL(TInt aLength, CMMFBuffer *aBuffer, TInt aPosition, MDataSink *aConsumer)=0;

Description

Reads aLength number of bytes of data from the offset, aPosition into the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

Parameters

TInt aLength

The number of bytes to read.

CMMFBuffer *aBuffer

The buffer to read the data into.

TInt aPosition

The offset from which to start reading.

MDataSink *aConsumer

The sink of tha data read from the clip. Will be informed of read if not NULL.


WriteBufferL()

virtual void WriteBufferL(TInt aLength, CMMFBuffer *aBuffer, TInt aPosition, MDataSource *aSupplier)=0;

Description

Writes aLength number of bytes of data from the offset, aPosition from the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

Parameters

TInt aLength

The number of bytes to write.

CMMFBuffer *aBuffer

The buffer to write the data into.

TInt aPosition

The offset from which to start writing.

MDataSource *aSupplier

The source of the data writen to the clip. Will be informed of write if not NULL.


ReadBufferL()

virtual void ReadBufferL(CMMFBuffer *aBuffer, TInt aPosition, MDataSink *aConsumer)=0;

Description

Reads the maximum number of bytes of data from the offset, aPosition into the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

Parameters

CMMFBuffer *aBuffer

The buffer to read the data into.

TInt aPosition

The offset from which to start reading.

MDataSink *aConsumer

The sink of tha data read from the clip. Will be informed of read if not NULL.


WriteBufferL()

virtual void WriteBufferL(CMMFBuffer *aBuffer, TInt aPosition, MDataSource *aSupplier)=0;

Description

Writes the maximum number of bytes of data from the offset, aPosition from the buffer, aBuffer. Intended for asynchronous usage.

This is a virtual function that each derived class must implement.

Parameters

CMMFBuffer *aBuffer

The buffer to write the data into.

TInt aPosition

The offset from which to start writing.

MDataSource *aSupplier

The source of the data writen to the clip. Will be informed of write if not NULL.


ReadBufferL()

virtual void ReadBufferL(CMMFBuffer *aBuffer, TInt aPosition)=0;

Description

Reads the maximum number of bytes of data from the offset, aPosition into the buffer, aBuffer. Intended for synchronous usage.

This is a virtual function that each derived class must implement.

Parameters

CMMFBuffer *aBuffer

The buffer to read the data into.

TInt aPosition

The offset from which to start reading.


WriteBufferL()

virtual void WriteBufferL(CMMFBuffer *aBuffer, TInt aPosition)=0;

Description

Writes the maximum number of bytes of data from the offset, aPosition from the buffer, aBuffer. Intended for synchronous usage.

This is a virtual function that each derived class must implement.

Parameters

CMMFBuffer *aBuffer

The buffer to write the data into.

TInt aPosition

The offset from which to start writing.


BytesFree()

virtual TInt64 BytesFree()=0;

Description

Returns the amount of space available for the clip.

This is a virtual function that each derived class must implement.

Return value

TInt64

The amount of space available.


Size()

virtual TInt Size()=0;

Description

Returns the size of the clip in bytes.

This is a virtual function that each derived class must implement.

Return value

TInt

The size of the clip.


Delete()

inline virtual TInt Delete();

Description

Deletes the clip.

This should be overriden in the derived classes, the default version returns KErrNotSupported.

Return value

TInt

An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.


SetSize()

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