RMMFController Class Reference

#include <mmf/common/mmfcontroller.h>

Link against: mmfcontrollerframework.lib

class RMMFController
Public Member Functions
RMMFController()
IMPORT_C TIntAddDataSink(TUid, const TDesC8 &)
IMPORT_C TIntAddDataSink(TUid, const TDesC8 &, TMMFMessageDestination &)
IMPORT_C voidAddDataSink(const TMMFUidPckg &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C TIntAddDataSource(TUid, const TDesC8 &)
IMPORT_C TIntAddDataSource(TUid, const TDesC8 &, TMMFMessageDestination &)
IMPORT_C voidAddDataSource(const TMMFUidPckg &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C voidAddFileHandleDataSink(const RFile &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C voidAddFileHandleDataSink(const RFile &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C voidAddFileHandleDataSource(const RFile &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C voidAddFileHandleDataSource(const RFile &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C voidCancelAddDataSink()
IMPORT_C voidCancelAddDataSource()
IMPORT_C TIntCancelReceiveEvents()
IMPORT_C voidClose()
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &)
IMPORT_C TIntGetDuration(TTimeIntervalMicroSeconds &)
IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TInt)
IMPORT_C TIntGetNumberOfMetaDataEntries(TInt &)
IMPORT_C TIntGetPosition(TTimeIntervalMicroSeconds &)
IMPORT_C TIntOpen(TUid, const TMMFPrioritySettings &)
IMPORT_C TIntOpen(const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &)
IMPORT_C TIntOpen(TUid, const TMMFPrioritySettings &, TBool)
IMPORT_C TIntOpen(const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &, TBool)
IMPORT_C TIntOpenInSecureDRMProcess(TUid, const TMMFPrioritySettings &)
IMPORT_C TIntOpenInSecureDRMProcess(const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &)
IMPORT_C TIntOpenInSecureDRMProcess(TUid, const TMMFPrioritySettings &, TBool)
IMPORT_C TIntOpenInSecureDRMProcess(const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &, TBool)
IMPORT_C TIntPause()
IMPORT_C TIntPlay()
IMPORT_C TIntPrime()
IMPORT_C voidReceiveEvents(TMMFEventPckg &, TRequestStatus &)
IMPORT_C TIntRemoveDataSink(const TMMFMessageDestination &)
IMPORT_C TIntRemoveDataSource(const TMMFMessageDestination &)
IMPORT_C TIntReset()
IMPORT_C TIntSetPosition(const TTimeIntervalMicroSeconds &)
IMPORT_C TIntSetPrioritySettings(const TMMFPrioritySettings &)
IMPORT_C TIntSetThreadPriority(const TThreadPriority &)
IMPORT_C TIntStop()

Detailed Description

Client representation of a controller plugin for the Multimedia Framework.

This class allows a client to load a controller plugin into a new thread and access the

functionality provided by that plugin.

Since
7.0s

Constructor & Destructor Documentation

RMMFController ( )

IMPORT_CRMMFController()

Constructor.

Since
7.0s

Member Function Documentation

AddDataSink ( TUid, const TDesC8 & )

IMPORT_C TIntAddDataSink(TUidaSinkUid,
const TDesC8 &aSinkInitData
)

Adds a data sink to the controller.

A typical data sink would be a file, descriptor, audio output (speaker) or display. A controller plugin may require multiple data sinks to be added (for example a video playing controller would require two); the exact number is plugin-specific. Data sinks are plugins themselves, and are loaded by the controller framework inside the controller thread.

Since
7.0s
Parameters
aSinkUidThe UID of the data sink to be added. For more information, see the documentation for the data sink you wish to add.
aSinkInitDataThe data used to initialise the data sink. The exact contents of this data are dependent on the type of data sink. For more information, see the documentation for the data sink you wish to add.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

AddDataSink ( TUid, const TDesC8 &, TMMFMessageDestination & )

IMPORT_C TIntAddDataSink(TUidaSinkUid,
const TDesC8 &aSinkInitData,
TMMFMessageDestination &aHandleInfo
)

Adds a data sink to the controller, and receives a handle to allow removal and direct communication with that data sink.

A typical data sink would be a file, descriptor, audio output (speaker) or display. A controller plugin may require multiple data sinks to be added (for example a video playing controller would require two); the exact number is plugin-specific. Data sinks are plugins themselves, and are loaded by the controller framework inside the controller thread.

Since
7.0s
Parameters
aSinkUidThe UID of the data sink to be added. For more information, see the documentation for the data sink you wish to add.
aSinkInitDataData used to initialise the data sink. The exact contents of this data are dependent on the type of data sink. For more information, see the documentation for the data sink you wish to add.
aHandleInfoThis object is filled in by the controller framework, and identifies the data sink inside the controller framework. This allows the caller to send custom commands directly to the data sink, and to also remove the data sink from the controller. Note that not all data sinks support custom commands, and not all controller plugins support the removal of a data sink.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

AddDataSink ( const TMMFUidPckg &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus & )

IMPORT_C voidAddDataSink(const TMMFUidPckg &aSinkUid,
const TDesC8 &aSinkInitData,
TMMFMessageDestinationPckg &aHandleInfoPckg,
TRequestStatus &aStatus
)

Add a data sink to the controller asynchronously, and receive a handle to allow removal and direct communication with that data sink.

A typical data sink would be a file, descriptor, audio output (speaker) or display. A controller plugin may require multiple data sinks to be added (for example a video playing controller would require two); the exact number is plugin-specific. Data sinks are plugins themselves, and are loaded by the controller framework inside the controller thread.

Since
8.0
Parameters
aSinkUid"The uid of the data sink to be added, packaged for async data transfer. The reference must remain valid until the command has been completed or cancelled." @param "aSinkInitData" "Data used to initialise the data sink. The reference must remain valid until the command has been completed or cancelled. The exact contents of this data are dependent on the type of data sink. For more information, see the documentation for the data sink you wish to add." @param "aHandleInfoPckg" "This object is filled in by the controller framework, and identifies the data sink inside the controller framework. This allows the caller to send custom commands directly to the data sink, and to also remove the data sink from the controller. Note that not all data sinks support custom commands, and not all controller plugins support the removal of a data sink." @param "aStatus" "TRequestStatus of the active object to be signalled on completion of this request."

AddDataSource ( TUid, const TDesC8 & )

IMPORT_C TIntAddDataSource(TUidaSourceUid,
const TDesC8 &aSourceInitData
)

Adds a data source to the controller.

A typical data source would be a file, descriptor, audio input (microphone) or camera. A controller plugin may require multiple data sources to be added (for example a video recorder controller would require two); the exact number is plugin-specific. Data sources are plugins themselves, and are loaded by the controller framework inside the controller thread.

Since
7.0s
Parameters
aSourceUidThe uid of the data source to be added. For more information, see the documentation for the data source you wish to add.
aSourceInitDataThe data used to initialise the data source. The exact contents of this data are dependent on the type of data source. For more information, see the documentation for the data source you wish to add.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

AddDataSource ( TUid, const TDesC8 &, TMMFMessageDestination & )

IMPORT_C TIntAddDataSource(TUidaSourceUid,
const TDesC8 &aSourceInitData,
TMMFMessageDestination &aHandleInfo
)

Adds a data source to the controller, and receive a handle to allow removal and direct communication with that data source.

A typical data source would be a file, descriptor, audio input (microphone) or camera. A controller plugin may require multiple data sources to be added (for example a video recorder controller would require two); the exact number is plugin-specific. Data sources are plugins themselves, and are loaded by the controller framework inside the controller thread.

Since
7.0s
Parameters
aSourceUidThe uid of the data source to be added. For more information, see the documentation for the data source you wish to add.
aSourceInitDataData used to initialise the data source. The exact contents of this data is dependent on the type of data source. For more information, see the documentation for the data source you wish to add.
aHandleInfoThis object is filled in by the controller framework, and identifies the data source inside the controller framework. This allows the caller to send custom commands directly to the data source, and to also remove the data source from the controller. Note that not all data sources support custom commands, and not all controller plugins support the removal of a data source.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

AddDataSource ( const TMMFUidPckg &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus & )

IMPORT_C voidAddDataSource(const TMMFUidPckg &aSourceUid,
const TDesC8 &aSourceInitData,
TMMFMessageDestinationPckg &aHandleInfoPckg,
TRequestStatus &aStatus
)

Add a data source to the controller asynchronously, and receive a handle to allow removal and direct communication with that data source.

Note: only one call to this method can be outstanding at any time.

A typical data source would be a file, descriptor, audio input (microphone) or camera. A controller plugin may require multiple data sources to be added (for example a video recorder controller would require two); the exact number is plugin-specific. Data sources are plugins themselves, and are loaded by the controller framework inside the controller thread.

Since
8.0
Parameters
aSourceUid"The uid of the data source to be added, packaged for async data transfer. The reference must remain valid until the command has been completed or cancelled." @param "aSourceInitData" "Data used to initialise the data source. The reference must remain valid until the command has been completed or cancelled. The exact contents of this data is dependent on the type of data source. For more information, see the documentation for the data source you wish to add." @param "aHandleInfoPckg" "This object is filled in by the controller framework, and identifies the data source inside the controller framework. This allows the caller to send custom commands directly to the data source, and to also remove the data source from the controller. Note that not all data sources support custom commands, and not all controller plugins support the removal of a data source." @param "aStatus" "TRequestStatus of the active object to be signalled on completion of this request."

AddFileHandleDataSink ( const RFile &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus & )

IMPORT_C voidAddFileHandleDataSink(const RFile &aFile,
const TDesC8 &aSinkInitData,
TMMFMessageDestinationPckg &aHandleInfoPckg,
TRequestStatus &aStatus
)

Adds a file handle data sink, together with its source info, to the controller, and receives a handle to allow removal and direct communication with that data sink.

Note: only one call to this method can be outstanding at any time.

The data sink would be a file for this API. A controller plugin may require multiple data sinks to be added (for example a video playing controller would require two); the exact number is plugin-specific. Data sinks are plugins themselves, and are loaded by the controller framework inside the controller thread.

Parameters
aFileThe shared session file handle sink to be added.
aSinkInitDataData used to initialise the data sink. The exact contents of this data are dependent on the type of data sink. For more information, see the documentation for the data sink you wish to add.
aStatusTRequestStatus of the active object to be signalled on completion of this request.
Return Value
An error code indicating if the function call was successful. KErrBadHandle if the file handle is not shared through the call RFs::ShareProtected(). KErrNone on success, otherwise another of the system-wide error codes.

AddFileHandleDataSink ( const RFile &, TMMFMessageDestinationPckg &, TRequestStatus & )

IMPORT_C voidAddFileHandleDataSink(const RFile &aFile,
TMMFMessageDestinationPckg &aHandleInfoPckg,
TRequestStatus &aStatus
)

Adds a file handle data sink, together with its source info, to the controller, and receives a handle to allow removal and direct communication with that data sink.

Note: only one call to this method can be outstanding at any time.

The data sink would be a file for this API. A controller plugin may require multiple data sinks to be added (for example a video playing controller would require two); the exact number is plugin-specific. Data sinks are plugins themselves, and are loaded by the controller framework inside the controller thread.

Parameters
aFileThe shared session file handle sink to be added.
aHandleInfoPckgThis object is filled in by the controller framework, and identifies the data sink inside the controller framework. This allows the caller to send custom commands directly to the data sink, and to also remove the data sink from the controller. Note that not all data sinks support custom commands, and not all controller plugins support the removal of a data sink.
aStatusTRequestStatus of the active object to be signalled on completion of this request.
Return Value
An error code indicating if the function call was successful. KErrBadHandle if the file handle is not shared through the call RFs::ShareProtected(). KErrNone on success, otherwise another of the system-wide error codes.

AddFileHandleDataSource ( const RFile &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus & )

IMPORT_C voidAddFileHandleDataSource(const RFile &aFile,
const TDesC8 &aSourceInitData,
TMMFMessageDestinationPckg &aHandleInfoPckg,
TRequestStatus &aStatus
)

Add a file handle data source, together with its source info, to the controller asynchronously, and receive a handle to allow removal and directcommunication with that data source.

Note: only one call to this method can be outstanding at any time.

The data source would be a file for this API. A controller plugin may require multiple data sources to be added (for example a video recorder controller would require two); the exact number is plugin-specific. Data sources are plugins themselves, and are loaded by the controller framework inside the controller thread.

Parameters
aFile"The shared session file handle source to be added."
aSourceInitData"Data used to initialise the data source. The reference must remain valid until the command has been completed or cancelled. The exact contents of this data is dependent on the type of data source. For more information, see the documentation for the data source you wish to add." @param "aHandleInfoPckg" "This object is filled in by the controller framework, and identifies the data source inside the controller framework. This allows the caller to send custom commands directly to the data source, and to also remove the data source from the controller. Note that not all data sources support custom commands, and not all controller plugins support the removal of a data source." @param "aStatus" "TRequestStatus of the active object to be signalled on completion of this request."
Return Value
An error code indicating if the function call was successful. KErrBadHandle if the file handle is not shared through the call RFs::ShareProtected(). KErrNone on success, otherwise another of the system-wide error codes.

AddFileHandleDataSource ( const RFile &, TMMFMessageDestinationPckg &, TRequestStatus & )

IMPORT_C voidAddFileHandleDataSource(const RFile &aFile,
TMMFMessageDestinationPckg &aHandleInfoPckg,
TRequestStatus &aStatus
)

Add a file handle data source to the controller asynchronously, and receive a handle to allow removal and directcommunication with that data source.

Note: only one call to this method can be outstanding at any time.

The data source would be a file for this API. A controller plugin may require multiple data sources to be added (for example a video recorder controller would require two); the exact number is plugin-specific. Data sources are plugins themselves, and are loaded by the controller framework inside the controller thread.

Parameters
aFile"The shared session file handle source to be added."
aHandleInfoPckg"This object is filled in by the controller framework, and identifies the data source inside the controller framework. This allows the caller to send custom commands directly to the data source, and to also remove the data source from the controller. Note that not all data sources support custom commands, and not all controller plugins support the removal of a data source." @param "aStatus" "TRequestStatus of the active object to be signalled on completion of this request."
Return Value
An error code indicating if the function call was successful. KErrBadHandle if the file handle is not shared through the call RFs::ShareProtected(). KErrNone on success, otherwise another of the system-wide error codes.

CancelAddDataSink ( )

IMPORT_C voidCancelAddDataSink()
Cancels an outstanding call to the asynchronous version of AddDataSink().
Since
8.0

CancelAddDataSource ( )

IMPORT_C voidCancelAddDataSource()
Cancels an outstanding call to the asynchronous version of AddDataSource().
Since
8.0

CancelReceiveEvents ( )

IMPORT_C TIntCancelReceiveEvents()

Cancels a previous registration to receive events from the controller plugin.

This must be called from the DoCancel() method of the active object using the ReceiveEvents() API function.

See also: TMMFEvent

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

Close ( )

IMPORT_C voidClose()

Closes the controller plugin.

Calling this method will unload the controller plugin and close down the controller thread.

Since
7.0s

CustomCommandAsync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus & )

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom,
TRequestStatus &aStatus
)

Sends a custom command asynchronously to the controller plugin.

Custom commands allow controller plugins to extend the standard API.

Note: This method will return immediately. The RunL of the active object owning the aStatus parameter will be called when the command is completed by the controller plugin.

Since
7.0s
Parameters
aDestinationThe destination of the custom command, consisting of the UID of the interface of this custom command and a special handle ID, KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin.
aFunctionThe function number to indicate which function is to be called on the controller's custom command interface.
aDataTo1A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
aDataTo2A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
aDataFromA reference to an area of memory to which the controller plugin will write any data to be passed back to the client.
aStatusThe TRequestStatus of an active object. This will contain the result of the custom command on completion. The exact range of result values is dependent on the custom command interface.

CustomCommandAsync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TRequestStatus & )

IMPORT_C voidCustomCommandAsync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TRequestStatus &aStatus
)

Sends a custom command asynchronously to the controller plugin.

Custom commands allow controller plugins to extend the standard API.

Note: This method will return immediately. The RunL() of the active object owning the aStatus parameter will be called when the command is completed by the controller plugin.

Since
7.0s
Parameters
aDestinationThe destination of the custom command, consisting of the UID of the interface of this custom command and a special handle ID, KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin.
aFunctionThe function number to indicate which function is to be called on the controller's custom command interface.
aDataTo1A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
aDataTo2A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
aStatusThe TRequestStatus of an active object. This will contain the result of the custom command on completion. The exact range of result values is dependent on the custom command interface.

CustomCommandSync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 &, TDes8 & )

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2,
TDes8 &aDataFrom
)

Sends a custom command synchronously to the controller plugin.

Custom commands allow controller plugins to extend the standard API.

Note: This method will not return until the controller plugin has serviced the command.

Since
7.0s
Parameters
aDestinationThe destination of the custom command, consisting of the UID of the interface of this custom command and a special handle ID, KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin.
aFunctionThe function number to indicate which function is to be called on the controller's custom command interface.
aDataTo1A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
aDataTo2A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
aDataFromA reference to an area of memory to which the controller plugin will write any data to be passed back to the client.
Return Value
The result of the custom command. Exact range of values is dependent on the custom command interface.

CustomCommandSync ( const TMMFMessageDestinationPckg &, TInt, const TDesC8 &, const TDesC8 & )

IMPORT_C TIntCustomCommandSync(const TMMFMessageDestinationPckg &aDestination,
TIntaFunction,
const TDesC8 &aDataTo1,
const TDesC8 &aDataTo2
)

Sends a custom command synchronously to the controller plugin.

Custom commands allow controller plugins to extend the standard API.

Note: This method will not return until the controller plugin has serviced the command.

Since
7.0s
Parameters
aDestinationThe destination of the custom command, consisting of the UID of the interface of this custom command and a special handle ID, KMMFObjectHandleController to indicate that the custom command is to be handled by the controller plugin.
aFunctionThe function number to indicate which function is to be called on the controller's custom command interface.
aDataTo1A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
aDataTo2A reference to data to be copied to the controller plugin. The exact contents of the data are dependent on the custom command interface of the controller. Use a value of KNullDesC8 if you have no data to send.
Return Value
The result of the custom command. Exact range of values is dependent on the custom command interface.

GetDuration ( TTimeIntervalMicroSeconds & )

IMPORT_C TIntGetDuration(TTimeIntervalMicroSeconds &aDuration)const

Gets the duration of the clip in microseconds.

Note: The controller must be in the PRIMED or PLAYING state before this can be called.

Since
7.0s
Parameters
aDurationThe duration of the clip in microseconds, filled in by the controller framework.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

GetMetaDataEntryL ( TInt )

IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TIntaIndex)const

Returns a particular meta data entry from the clip.

All meta data entries can be retrieved by multiple calls to this method, iterating aIndex from 0 to the value returned by GetNumberOfMetaDataEntries().

See also: CMMFMetaDataEntry

Since
7.0s
Parameters
aIndexThe index of the meta data entry to retrieve.
Return Value
The meta data entry retrieved from the controller plugin. Ownership of the entry is passed to the caller.

GetNumberOfMetaDataEntries ( TInt & )

IMPORT_C TIntGetNumberOfMetaDataEntries(TInt &aNumberOfEntries)const

Gets the number a meta data entries in the clip.

A clip may contain zero or more entries of meta data, e.g Author, Copyright etc.

Since
7.0s
Parameters
aNumberOfEntriesThe number of meta data entries in the clip, filled in by the controller framework.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

GetPosition ( TTimeIntervalMicroSeconds & )

IMPORT_C TIntGetPosition(TTimeIntervalMicroSeconds &aPosition)const

Gets the current position microseconds.

Note: The controller must be in the PRIMED or PLAYING state before this can be called.

Since
7.0s
Parameters
aPositionThe current position in microseconds, filled in by the controller framework.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

Open ( TUid, const TMMFPrioritySettings & )

IMPORT_C TIntOpen(TUidaControllerUid,
const TMMFPrioritySettings &aPrioritySettings
)

Loads a controller plugin by specifying the UID of the plugin to load.

Creates a new thread and loads the specified controller into the new thread. Use the classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters to find the uid of the controller to load. This version of Open() will give each controller its own heap which will consume one chunk. Use the overloaded version of Open() to create controllers that share a single heap.

See also: CMMFControllerPluginSelectionParamters

Since
7.0s
Parameters
aControllerUidThe UID of the controller plugin to be loaded.
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

Open ( const CMMFControllerImplementationInformation &, const TMMFPrioritySettings & )

IMPORT_C TIntOpen(const CMMFControllerImplementationInformation &aControllerInfo,
const TMMFPrioritySettings &aPrioritySettings
)

Loads a controller plugin by specifying a CMMFControllerImplementationInformation object.

CMMFControllerImplementationInformation is passed as a parameter to allow the controller thread's heap size to be determined without a further query to ECOM.

The function creates a new thread and loads the specified controller into the new thread. The classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters are used to find the UID of the controller to load. This version of Open() will give each controller its own heap which will consume one chunk. Use the overloaded version of Open() to create controllers that share a single heap.

See also: CMMFControllerPluginSelectionParamters

Since
7.0s
Parameters
aControllerInfoA reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

Open ( TUid, const TMMFPrioritySettings &, TBool )

IMPORT_C TIntOpen(TUidaControllerUid,
const TMMFPrioritySettings &aPrioritySettings,
TBoolaUseSharedHeap
)

Loads a controller plugin by specifying the UID of the plugin to load.

Creates a new thread and loads the specified controller into the new thread. Use the classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters to find the uid of the controller to load.

See also: CMMFControllerPluginSelectionParamters

Since
7.0s
Parameters
aControllerUidThe UID of the controller plugin to be loaded.
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
aUseSharedHeapIf this value is EFalse each controller is created with its own heap. The alternative, if the value is ETrue, is that controllers share a special heap with other controllers created the same way. Each heap uses a chunk, so this avoids situations where the number of chunks per process is limited. The default behaviour is generally to be preferred, and should give lower overall memory usage. However, if many controllers are to be created for a particular thread, then ETrue should be provided to prevent running out of heaps or chunks.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

Open ( const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &, TBool )

IMPORT_C TIntOpen(const CMMFControllerImplementationInformation &aControllerInfo,
const TMMFPrioritySettings &aPrioritySettings,
TBoolaUseSharedHeap
)

Loads a controller plugin by specifying a CMMFControllerImplementationInformation object.

CMMFControllerImplementationInformation is passed as a parameter to allow the controller thread's heap size to be determined without a further query to ECOM.

The function creates a new thread and loads the specified controller into the new thread. The classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters are used to find the UID of the controller to load.

See also: CMMFControllerPluginSelectionParamters

Since
7.0s
Parameters
aControllerInfoA reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
aUseSharedHeapIf this value is EFalse each controller is created with its own heap. The alternative, if the value is ETrue, is that controllers share a special heap with other controllers created the same way. Each heap uses a chunk, so this avoids situations where the number of chunks per process is limited. The default behaviour is generally to be preferred, and should give lower overall memory usage. However, if many controllers are to be created for a particular thread, then ETrue should be provided to prevent running out of heaps or chunks.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

OpenInSecureDRMProcess ( TUid, const TMMFPrioritySettings & )

IMPORT_C TIntOpenInSecureDRMProcess(TUidaControllerUid,
const TMMFPrioritySettings &aPrioritySettings
)

Same as RMMFController::Open(TUid, const TMMFPrioritySettings&) which loads a controller plugin by specifying the UID of the plugin to load, except that this is expected to be called by user thread without DRM Capability.

Creates a new thread through DRM Plugin Server and loads the specified controller into the new thread. Use the classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters to find the uid of the controller to load. This version of Open() will give each controller its own heap which will consume one chunk. Use the overloaded version of Open() to create controllers that share a single heap.

See also: CMMFControllerPluginSelectionParamters

Parameters
aControllerUidThe UID of the controller plugin to be loaded.
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

OpenInSecureDRMProcess ( const CMMFControllerImplementationInformation &, const TMMFPrioritySettings & )

IMPORT_C TIntOpenInSecureDRMProcess(const CMMFControllerImplementationInformation &aControllerInfo,
const TMMFPrioritySettings &aPrioritySettings
)

Same as Open(const CMMFControllerImplementationInformation&, const TMMFPrioritySettings&) which loads a controller plugin by specifying a CMMFControllerImplementationInformation object.

CMMFControllerImplementationInformation is passed as a parameter to allow the controller thread's heap size to be determined without a further query to ECOM.

The function creates a new thread through DRM Plugin server and loads the specified controller into the new thread. The classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters are used to find the UID of the controller to load. This version of Open() will give each controller its own heap which will consume one chunk. Use the overloaded version of Open() to create controllers that share a single heap.

See also: CMMFControllerPluginSelectionParamters

Parameters
aControllerInfoA reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

OpenInSecureDRMProcess ( TUid, const TMMFPrioritySettings &, TBool )

IMPORT_C TIntOpenInSecureDRMProcess(TUidaControllerUid,
const TMMFPrioritySettings &aPrioritySettings,
TBoolaUseSharedHeap
)

Same as RMMFController::Open(TUid, const TMMFPrioritySettings&, TBool) which loads a controller plugin by specifying the UID of the plugin to load, except that this is expected to be called by user thread without DRM Capability.

Creates a new thread through DRM Plugin server and loads the specified controller into the new thread. Use the classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters to find the uid of the controller to load.

See also: CMMFControllerPluginSelectionParamters

Parameters
aControllerUidThe UID of the controller plugin to be loaded.
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
aUseSharedHeapIf this value is EFalse each controller is created with its own heap. The alternative, if the value is ETrue, is that controllers share a special heap with other controllers created the same way. Each heap uses a chunk, so this avoids situations where the number of chunks per process is limited. The default behaviour is generally to be preferred, and should give lower overall memory usage. However, if many controllers are to be created for a particular thread, then ETrue should be provided to prevent running out of heaps or chunks.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

OpenInSecureDRMProcess ( const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &, TBool )

IMPORT_C TIntOpenInSecureDRMProcess(const CMMFControllerImplementationInformation &aControllerInfo,
const TMMFPrioritySettings &aPrioritySettings,
TBoolaUseSharedHeap
)

Same as Open(const CMMFControllerImplementationInformation&, const TMMFPrioritySettings&, TBool) which loads a controller plugin by specifying a CMMFControllerImplementationInformation object.

CMMFControllerImplementationInformation is passed as a parameter to allow the controller thread's heap size to be determined without a further query to ECOM.

The function creates a new thread through DRM Plugin Server and loads the specified controller into the new thread. The classes CMMFControllerPluginSelectionParameters and CMMFFormatSelectionParamters are used to find the UID of the controller to load.

See also: CMMFControllerPluginSelectionParamters

Parameters
aControllerInfoA reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
aUseSharedHeapIf this value is EFalse each controller is created with its own heap. The alternative, if the value is ETrue, is that controllers share a special heap with other controllers created the same way. Each heap uses a chunk, so this avoids situations where the number of chunks per process is limited. The default behaviour is generally to be preferred, and should give lower overall memory usage. However, if many controllers are to be created for a particular thread, then ETrue should be provided to prevent running out of heaps or chunks.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

Pause ( )

IMPORT_C TIntPause()

Pauses the controller.

The controller will cease transferring data from its data source(s) to its data sink(s). A subsequent call to Play() will result in the data transfer resuming from the same place as when the Pause() was called.

This moves the controller from the PLAYING back to the PRIMED state.

Note: Play() must have been called prior to calling Pause().

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

Play ( )

IMPORT_C TIntPlay()

Starts the controller playing. The controller will begin transferring data from its data source(s) to its data sink(s).

This moves the controller from the PRIMED to the PLAYING state.

Play() means "Start Playing" - i.e. this method will return as soon as playback has begun.

If the data transfer comes to an end due to an internal event (e.g. source runs out of data), the caller will be notified via the ReceiveEvents() interface.

Note: Prime() must have been called prior to calling Play().

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

Prime ( )

IMPORT_C TIntPrime()

Prepares the controller to start playing.

The controller should initialise its sources, sinks and buffers. This moves the controller from the STOPPED to the PRIMED state.

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

ReceiveEvents ( TMMFEventPckg &, TRequestStatus & )

IMPORT_C voidReceiveEvents(TMMFEventPckg &aEventPckg,
TRequestStatus &aStatus
)

Registers to receive events from the controller plugin.

Events can be generated at any time, and are generally associated with things that occur due to something happening internally within the controller. For example, an event will be generated if the controller stops playing due to reaching the end of a file.

See also: TMMFEvent CMMFControllerEventMonitor

Since
7.0s
Parameters
aEventPckgA reference to a TMMFEventPckg object that must be member data of the active object calling this method. The details of the event will be copied into this object when an event occurs.
aStatusThe TRequestStatus of the active object calling this method.

RemoveDataSink ( const TMMFMessageDestination & )

IMPORT_C TIntRemoveDataSink(const TMMFMessageDestination &aSinkHandleInfo)

Removes a data sink from the controller.

In certain situations, it may be necessary to remove a data sink from a controller, for example when you need change output devices on the fly.

It should be noted that not all controller plugins will support the removal of a data sink.

Since
7.0s
Parameters
aSinkHandleInfoThe handle object returned by the controller framework when the data sink was added.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

RemoveDataSource ( const TMMFMessageDestination & )

IMPORT_C TIntRemoveDataSource(const TMMFMessageDestination &aSourceHandleInfo)

Removes a data source from the controller.

In certain situations, it may be necessary to remove a data source from a controller, for example when you need to play a different file of the same format as the current one.

It should be noted that not all controller plugins will support the removal of a data source.

Since
7.0s
Parameters
aSourceHandleInfoThe handle object returned by the controller framework when the data source was added.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

Reset ( )

IMPORT_C TIntReset()

Reverts the controller plugin back to the state it was in just after it had been Opened.

Note: All sources and sinks will be removed from the controller.

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

SetPosition ( const TTimeIntervalMicroSeconds & )

IMPORT_C TIntSetPosition(const TTimeIntervalMicroSeconds &aPosition)const

Sets the current position microseconds.

Note: The controller must be in the PRIMED or PLAYING state before this can be called.

Since
7.0s
Parameters
aPositionThe new transfer position in microseconds.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

SetPrioritySettings ( const TMMFPrioritySettings & )

IMPORT_C TIntSetPrioritySettings(const TMMFPrioritySettings &aPrioritySettings)const

Sets the priority settings for this controller.

Since
7.0s
Parameters
aPrioritySettingsThe priority settings for this plugin, used by the policy component to arbitrate between different controllers that are attempting to use the same hardware resource simultaneously.
Return Value
An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

SetThreadPriority ( const TThreadPriority & )

IMPORT_C TIntSetThreadPriority(const TThreadPriority &aPriority)const

Set the priority of the controller's sub thread.

This can be used to increase the responsiveness of the audio plugin to minimise any lag in processing. This function should be used with care as it may have knock-on effects elsewhere in the system.

Parameters
aPriorityThe TThreadPriority that the thread should run under. The default is EPriorityNormal.
Return Value
TInt A standard error code: KErrNone if successful, KErrNotReady if the thread does not have a valid handle.

Stop ( )

IMPORT_C TIntStop()

Stops the controller.

The controller will cease transferring data from its data source(s) to its data sink(s), reset its position and delete any allocated buffers. In effect, calling Stop() undoes any actions performed by the controller during the call to Prime().

This moves the controller from the PRIMED back to the STOPPED state.

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