RMMFController Class Reference

class RMMFController

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
Public Member Functions
RMMFController ()
IMPORT_C TInt AddDataSink ( TUid , const TDesC8 &)
IMPORT_C TInt AddDataSink ( TUid , const TDesC8 &, TMMFMessageDestination &)
IMPORT_C void AddDataSink (const TMMFUidPckg &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C TInt AddDataSource ( TUid , const TDesC8 &)
IMPORT_C TInt AddDataSource ( TUid , const TDesC8 &, TMMFMessageDestination &)
IMPORT_C void AddDataSource (const TMMFUidPckg &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C void AddFileHandleDataSink (const RFile &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C void AddFileHandleDataSink (const RFile &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C void AddFileHandleDataSource (const RFile &, const TDesC8 &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C void AddFileHandleDataSource (const RFile &, TMMFMessageDestinationPckg &, TRequestStatus &)
IMPORT_C void CancelAddDataSink ()
IMPORT_C void CancelAddDataSource ()
IMPORT_C TInt CancelReceiveEvents ()
IMPORT_C void Close ()
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &, TRequestStatus &)
IMPORT_C void CustomCommandAsync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TRequestStatus &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &, TDes8 &)
IMPORT_C TInt CustomCommandSync (const TMMFMessageDestinationPckg &, TInt , const TDesC8 &, const TDesC8 &)
IMPORT_C TInt GetDuration ( TTimeIntervalMicroSeconds &)
IMPORT_C CMMFMetaDataEntry * GetMetaDataEntryL ( TInt )
IMPORT_C TInt GetNumberOfMetaDataEntries ( TInt &)
IMPORT_C TInt GetPosition ( TTimeIntervalMicroSeconds &)
IMPORT_C TInt Open ( TUid , const TMMFPrioritySettings &)
IMPORT_C TInt Open (const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &)
IMPORT_C TInt Open ( TUid , const TMMFPrioritySettings &, TBool )
IMPORT_C TInt Open (const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &, TBool )
IMPORT_C TInt OpenInSecureDRMProcess ( TUid , const TMMFPrioritySettings &)
IMPORT_C TInt OpenInSecureDRMProcess (const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &)
IMPORT_C TInt OpenInSecureDRMProcess ( TUid , const TMMFPrioritySettings &, TBool )
IMPORT_C TInt OpenInSecureDRMProcess (const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &, TBool )
IMPORT_C TInt Pause ()
IMPORT_C TInt Play ()
IMPORT_C TInt Prime ()
IMPORT_C void ReceiveEvents ( TMMFEventPckg &, TRequestStatus &)
IMPORT_C TInt RemoveDataSink (const TMMFMessageDestination &)
IMPORT_C TInt RemoveDataSource (const TMMFMessageDestination &)
IMPORT_C TInt Reset ()
IMPORT_C TInt SetPosition (const TTimeIntervalMicroSeconds &)
IMPORT_C TInt SetPrioritySettings (const TMMFPrioritySettings &)
IMPORT_C TInt SetThreadPriority (const TThreadPriority &)
IMPORT_C TInt Stop ()
Private Attributes
RMMFControllerProxy iControllerProxy
TMMFMessageDestinationPckg iDestinationPckg

Constructor & Destructor Documentation

RMMFController()

IMPORT_C RMMFController ( )

Constructor.

Since
7.0s

Member Functions Documentation

AddDataSink(TUid, const TDesC8 &)

IMPORT_C TInt AddDataSink ( TUid aSinkUid,
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

TUid aSinkUid The UID of the data sink to be added. For more information, see the documentation for the data sink you wish to add.
const TDesC8 & aSinkInitData The 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.

AddDataSink(TUid, const TDesC8 &, TMMFMessageDestination &)

IMPORT_C TInt AddDataSink ( TUid aSinkUid,
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

TUid aSinkUid The UID of the data sink to be added. For more information, see the documentation for the data sink you wish to add.
const TDesC8 & aSinkInitData 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.
TMMFMessageDestination & aHandleInfo 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.

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

IMPORT_C void AddDataSink ( 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

const TMMFUidPckg & 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."
const TDesC8 & aSinkInitData
TMMFMessageDestinationPckg & aHandleInfoPckg
TRequestStatus & aStatus

AddDataSource(TUid, const TDesC8 &)

IMPORT_C TInt AddDataSource ( TUid aSourceUid,
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

TUid aSourceUid The uid of the data source to be added. For more information, see the documentation for the data source you wish to add.
const TDesC8 & aSourceInitData The 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.

AddDataSource(TUid, const TDesC8 &, TMMFMessageDestination &)

IMPORT_C TInt AddDataSource ( TUid aSourceUid,
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

TUid aSourceUid The uid of the data source to be added. For more information, see the documentation for the data source you wish to add.
const TDesC8 & aSourceInitData Data 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.
TMMFMessageDestination & aHandleInfo 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.

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

IMPORT_C void AddDataSource ( 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

const TMMFUidPckg & 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."
const TDesC8 & aSourceInitData
TMMFMessageDestinationPckg & aHandleInfoPckg
TRequestStatus & aStatus

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

IMPORT_C void AddFileHandleDataSink ( 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

const RFile & aFile The shared session file handle sink to be added.
const TDesC8 & aSinkInitData 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.
TMMFMessageDestinationPckg & aHandleInfoPckg
TRequestStatus & aStatus TRequestStatus of the active object to be signalled on completion of this request.

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

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

Parameters

const RFile & aFile
TMMFMessageDestinationPckg & aHandleInfoPckg
TRequestStatus & aStatus

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

IMPORT_C void AddFileHandleDataSource ( 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

const RFile & aFile "The shared session file handle source to be added."
const TDesC8 & 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."
TMMFMessageDestinationPckg & aHandleInfoPckg
TRequestStatus & aStatus

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

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

Parameters

const RFile & aFile
TMMFMessageDestinationPckg & aHandleInfoPckg
TRequestStatus & aStatus

CancelAddDataSink()

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

CancelAddDataSource()

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

CancelReceiveEvents()

IMPORT_C TInt CancelReceiveEvents ( )

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.

TMMFEvent
Since
7.0s

Close()

IMPORT_C void Close ( )

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 void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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

const TMMFMessageDestinationPckg & aDestination The 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.
TInt aFunction The function number to indicate which function is to be called on the controller's custom command interface.
const TDesC8 & aDataTo1 A 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.
const TDesC8 & aDataTo2 A 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.
TDes8 & aDataFrom A reference to an area of memory to which the controller plugin will write any data to be passed back to the client.
TRequestStatus & aStatus The 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 void CustomCommandAsync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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

const TMMFMessageDestinationPckg & aDestination The 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.
TInt aFunction The function number to indicate which function is to be called on the controller's custom command interface.
const TDesC8 & aDataTo1 A 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.
const TDesC8 & aDataTo2 A 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.
TRequestStatus & aStatus The 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 TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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

const TMMFMessageDestinationPckg & aDestination The 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.
TInt aFunction The function number to indicate which function is to be called on the controller's custom command interface.
const TDesC8 & aDataTo1 A 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.
const TDesC8 & aDataTo2 A 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.
TDes8 & aDataFrom A reference to an area of memory to which the controller plugin will write any data to be passed back to the client.

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

IMPORT_C TInt CustomCommandSync ( const TMMFMessageDestinationPckg & aDestination,
TInt aFunction,
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

const TMMFMessageDestinationPckg & aDestination The 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.
TInt aFunction The function number to indicate which function is to be called on the controller's custom command interface.
const TDesC8 & aDataTo1 A 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.
const TDesC8 & aDataTo2 A 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.

GetDuration(TTimeIntervalMicroSeconds &)

IMPORT_C TInt GetDuration ( 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

TTimeIntervalMicroSeconds & aDuration The duration of the clip in microseconds, filled in by the controller framework.

GetMetaDataEntryL(TInt)

IMPORT_C CMMFMetaDataEntry * GetMetaDataEntryL ( TInt aIndex ) 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() .

Parameters

TInt aIndex The index of the meta data entry to retrieve.

GetNumberOfMetaDataEntries(TInt &)

IMPORT_C TInt GetNumberOfMetaDataEntries ( 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

TInt & aNumberOfEntries The number of meta data entries in the clip, filled in by the controller framework.

GetPosition(TTimeIntervalMicroSeconds &)

IMPORT_C TInt GetPosition ( 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

TTimeIntervalMicroSeconds & aPosition The current position in microseconds, filled in by the controller framework.

Open(TUid, const TMMFPrioritySettings &)

IMPORT_C TInt Open ( TUid aControllerUid,
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.

CMMFControllerPluginSelectionParamters
Since
7.0s

Parameters

TUid aControllerUid The UID of the controller plugin to be loaded.
const TMMFPrioritySettings & aPrioritySettings The 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.

Open(const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &)

IMPORT_C TInt Open ( 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.

CMMFControllerPluginSelectionParamters
Since
7.0s

Parameters

const CMMFControllerImplementationInformation & aControllerInfo A reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
const TMMFPrioritySettings & aPrioritySettings The 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.

Open(TUid, const TMMFPrioritySettings &, TBool)

IMPORT_C TInt Open ( TUid aControllerUid,
const TMMFPrioritySettings & aPrioritySettings,
TBool aUseSharedHeap
)

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.

CMMFControllerPluginSelectionParamters
Since
7.0s

Parameters

TUid aControllerUid The UID of the controller plugin to be loaded.
const TMMFPrioritySettings & aPrioritySettings The 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.
TBool aUseSharedHeap If 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.

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

IMPORT_C TInt Open ( const CMMFControllerImplementationInformation & aControllerInfo,
const TMMFPrioritySettings & aPrioritySettings,
TBool aUseSharedHeap
)

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.

CMMFControllerPluginSelectionParamters
Since
7.0s

Parameters

const CMMFControllerImplementationInformation & aControllerInfo A reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
const TMMFPrioritySettings & aPrioritySettings The 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.
TBool aUseSharedHeap If 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.

OpenInSecureDRMProcess(TUid, const TMMFPrioritySettings &)

IMPORT_C TInt OpenInSecureDRMProcess ( TUid aControllerUid,
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.

CMMFControllerPluginSelectionParamters

Parameters

TUid aControllerUid The UID of the controller plugin to be loaded.
const TMMFPrioritySettings & aPrioritySettings The 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.

OpenInSecureDRMProcess(const CMMFControllerImplementationInformation &, const TMMFPrioritySettings &)

IMPORT_C TInt OpenInSecureDRMProcess ( 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.

CMMFControllerPluginSelectionParamters

Parameters

const CMMFControllerImplementationInformation & aControllerInfo A reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
const TMMFPrioritySettings & aPrioritySettings The 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.

OpenInSecureDRMProcess(TUid, const TMMFPrioritySettings &, TBool)

IMPORT_C TInt OpenInSecureDRMProcess ( TUid aControllerUid,
const TMMFPrioritySettings & aPrioritySettings,
TBool aUseSharedHeap
)

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.

CMMFControllerPluginSelectionParamters

Parameters

TUid aControllerUid The UID of the controller plugin to be loaded.
const TMMFPrioritySettings & aPrioritySettings The 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.
TBool aUseSharedHeap If 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.

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

IMPORT_C TInt OpenInSecureDRMProcess ( const CMMFControllerImplementationInformation & aControllerInfo,
const TMMFPrioritySettings & aPrioritySettings,
TBool aUseSharedHeap
)

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.

CMMFControllerPluginSelectionParamters

Parameters

const CMMFControllerImplementationInformation & aControllerInfo A reference to a CMMFControllerImplementationInformation object used for determining the controller's UID & heap size
const TMMFPrioritySettings & aPrioritySettings The 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.
TBool aUseSharedHeap If 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.

Pause()

IMPORT_C TInt Pause ( )

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

Play()

IMPORT_C TInt Play ( )

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

Prime()

IMPORT_C TInt Prime ( )

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

ReceiveEvents(TMMFEventPckg &, TRequestStatus &)

IMPORT_C void ReceiveEvents ( 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.

Parameters

TMMFEventPckg & aEventPckg A 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.
TRequestStatus & aStatus The TRequestStatus of the active object calling this method.

RemoveDataSink(const TMMFMessageDestination &)

IMPORT_C TInt RemoveDataSink ( 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

const TMMFMessageDestination & aSinkHandleInfo The handle object returned by the controller framework when the data sink was added.

RemoveDataSource(const TMMFMessageDestination &)

IMPORT_C TInt RemoveDataSource ( 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

const TMMFMessageDestination & aSourceHandleInfo The handle object returned by the controller framework when the data source was added.

Reset()

IMPORT_C TInt Reset ( )

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

SetPosition(const TTimeIntervalMicroSeconds &)

IMPORT_C TInt SetPosition ( 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

const TTimeIntervalMicroSeconds & aPosition The new transfer position in microseconds.

SetPrioritySettings(const TMMFPrioritySettings &)

IMPORT_C TInt SetPrioritySettings ( const TMMFPrioritySettings & aPrioritySettings ) const

Sets the priority settings for this controller.

Since
7.0s

Parameters

const TMMFPrioritySettings & aPrioritySettings The 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.

SetThreadPriority(const TThreadPriority &)

IMPORT_C TInt SetThreadPriority ( 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

const TThreadPriority & aPriority The TThreadPriority that the thread should run under. The default is EPriorityNormal.

Stop()

IMPORT_C TInt Stop ( )

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

Member Data Documentation

RMMFControllerProxy iControllerProxy

RMMFControllerProxy iControllerProxy [private]

The controller proxy. Used to pass messages to the controller thread.

TMMFMessageDestinationPckg iDestinationPckg

TMMFMessageDestinationPckg iDestinationPckg [private]

Used to hold the destination information for messages for the standard controller plugin interface.