Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: mmfdatapathproxy.h
Link against: mmfserverbaseclasses.lib

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

Class RMMFDataPathProxy

class RMMFDataPathProxy : public RMMFSubThreadBase;

Description

Proxy class used to create a datapath in a new subthread.

Derivation

Members

Defined in RMMFDataPathProxy:
AddDataSink(), AddDataSource(), ClearPlayWindow(), Close(), CreateSubThread(), GetPosition(), LoadDataPath(), LoadDataPath(), LoadDataPath(), LoadDataPath(), Pause(), Play(), Prime(), RMMFDataPathProxy(), SetPlayWindow(), SetPosition(), State(), Stop()


Construction and destruction


RMMFDataPathProxy()

inline RMMFDataPathProxy();

Description

Constuctor.

[Top]


Member functions


CreateSubThread()

IMPORT_C TInt CreateSubThread();

Description

Creates a subthread that will contain the datapath.

Return value

TInt

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


LoadDataPath()

IMPORT_C TInt LoadDataPath();

Description

Load the datapath in the new thread. Use this method if the codec UID is not known and there is no datapath ambiguity, ie. only one datapath is possible.

Return value

TInt

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


LoadDataPath()

IMPORT_C TInt LoadDataPath(TMediaId aMediaId);

Description

Load the datapath in the new thread.

Use this method if the codec UID is not known but the TMediaId can be used to select which codec to use.

Parameters

TMediaId aMediaId

The type of media to be handled by this datapath.

Return value

TInt

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


LoadDataPath()

IMPORT_C TInt LoadDataPath(TUid aCodecUid);

Description

Load the datapath in the new thread.

Use this method if the codec UID is known and there is no datapath ambiguity, ie. only one datapath is possible.

Parameters

TUid aCodecUid

The UID of the codec plugin to be used by the datapath.

Return value

TInt

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


LoadDataPath()

IMPORT_C TInt LoadDataPath(TUid aCodecUid, TMediaId aMediaId);

Description

Loads the datapath in the new thread.

Use this method if the codec UID is known and there is datapath ambiguity. The TMediaId will be used to choose the correct path.

Parameters

TUid aCodecUid

The UID of the codec plugin to be used by the datapath.

TMediaId aMediaId

The type of media to be handled by this datapath.

Return value

TInt

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


AddDataSource()

IMPORT_C TInt AddDataSource(MDataSource *aSource);

Description

Specify the data source for this datapath.

If the sink already exists, this function tries to establish a connection between the source and sink. Note that only one data source can be added to the datapath.

Parameters

MDataSource *aSource

A pointer to the data source.

Return value

TInt

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


AddDataSink()

IMPORT_C TInt AddDataSink(MDataSink *aSink);

Description

Specify the data sink for this datapath.

If the source already exists, this function tries to establish a connection between the source and the sink. Note that only one data sink can be added to the datapath.

Parameters

MDataSink *aSink

A pointer to the data sink.

Return value

TInt

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


Prime()

IMPORT_C TInt Prime();

Description

Transfer the datapath from the stopped into the primed state.

This function allocates buffers in preparation to play and must be called before calling PlayL().

Return value

TInt

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


Play()

IMPORT_C TInt Play();

Description

Transfer the datapath from the primed into the playing state.

This function starts an active scheduler play loop and can only play from the primed state.

Return value

TInt

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


Pause()

IMPORT_C TInt Pause();

Description

Pauses playing.

This function transfers the datapath from the playing into the primed state and sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.

Return value

TInt

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


Stop()

IMPORT_C TInt Stop();

Description

Stops playing.

This function transfers the datapath from the primed into the stopped state and resets the data path position, but does not clean up buffers. It also sends KMMFErrorCategoryDataPathGeneralError to the client if an error occurs.

Return value

TInt

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


GetPosition()

IMPORT_C TInt GetPosition(TTimeIntervalMicroSeconds &aPosition) const;

Description

Gets the current position of the datapath in units of time.

Parameters

TTimeIntervalMicroSeconds &aPosition

The current position in micro seconds will be copied into this variable.

Return value

TInt

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


SetPosition()

IMPORT_C TInt SetPosition(const TTimeIntervalMicroSeconds &aPosition);

Description

Sets the current position of the datapath in units of time.

Parameters

const TTimeIntervalMicroSeconds &aPosition

The required position in micro seconds.

Return value

TInt

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


SetPlayWindow()

IMPORT_C TInt SetPlayWindow(const TTimeIntervalMicroSeconds &aStart, const TTimeIntervalMicroSeconds &aEnd);

Description

Sets the play window relative to the start of the entire clip.

Parameters

const TTimeIntervalMicroSeconds &aStart

The start position in micro seconds relative to the start of the clip.

const TTimeIntervalMicroSeconds &aEnd

The end position in micro seconds relative to the start 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.


ClearPlayWindow()

IMPORT_C TInt ClearPlayWindow();

Description

Removes a previously defined play window.

Return value

TInt

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


State()

IMPORT_C TInt State(TInt &aState);

Description

Gets the current datapath state.

Parameters

TInt &aState

The current state of the datapath will be copied into this variable.

Return value

TInt

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


Close()

IMPORT_C void Close();

Description

Deletes the datapath and shuts down the datapath proxy thread.

Calls RMMFSubThreadBase::Shutdown(). This function will not return until the subthread has exited, or a timeout has occurred.