Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <Mmfclip.h>
This item is not part of the S60 5th Edition SDK

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:

Inherited from CBase:

Inherited from MDataSink:

Inherited from MDataSource:


Construction and destruction


CMMFClip(TUid,TUid)

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(TInt,CMMFBuffer *,TInt,MDataSink *)

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(TInt,CMMFBuffer *,TInt,MDataSource *)

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(CMMFBuffer *,TInt,MDataSink *)

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(CMMFBuffer *,TInt,MDataSource *)

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(CMMFBuffer *,TInt)

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(CMMFBuffer *,TInt)

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

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.