Symbian
Symbian OS Library

SYMBIAN OS V9.3

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



Location: mmfcontroller.h
Link against: mmfcontrollerframework.lib

Class RMMFController

class RMMFController;

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.

Members

Defined in RMMFController:
AddDataSink(), AddDataSink(), AddDataSink(), AddDataSource(), AddDataSource(), AddDataSource(), AddFileHandleDataSink(), AddFileHandleDataSource(), CancelAddDataSink(), CancelAddDataSource(), CancelReceiveEvents(), Close(), CustomCommandAsync(), CustomCommandAsync(), CustomCommandSync(), CustomCommandSync(), GetDuration(), GetMetaDataEntryL(), GetNumberOfMetaDataEntries(), GetPosition(), Open(), Open(), Open(), Open(), Pause(), Play(), Prime(), RMMFController(), ReceiveEvents(), RemoveDataSink(), RemoveDataSource(), Reset(), SetPosition(), SetPrioritySettings(), SetThreadPriority(), Stop()


Construction and destruction


RMMFController()

IMPORT_C RMMFController();

Description

Constructor.

[Top]


Member functions


Open()

Capability: MultimediaDD A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD.

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

Description

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.

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.

Return value

TInt

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


Open()

Capability: MultimediaDD A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD.

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

Description

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.

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.

Return value

TInt

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


Open()

Capability: MultimediaDD A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD.

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

Description

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.

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.

Return value

TInt

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


Open()

Capability: MultimediaDD A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD.

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

Description

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.

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.

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

Closes the controller plugin.

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


SetPrioritySettings()

Capability: MultimediaDD A process requesting or using this method that has MultimediaDD capability will always have precedence over a process that does not have MultimediaDD.

IMPORT_C TInt SetPrioritySettings(const TMMFPrioritySettings &aPrioritySettings) const;

Description

Sets the priority settings for this controller.

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.

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(TUid aSourceUid, const TDesC8 &aSourceInitData);

Description

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.

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.

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(TUid aSinkUid, const TDesC8 &aSinkInitData);

Description

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.

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.

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(TUid aSourceUid, const TDesC8 &aSourceInitData, TMMFMessageDestination &aHandleInfo);

Description

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.

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.

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(TUid aSinkUid, const TDesC8 &aSinkInitData, TMMFMessageDestination &aHandleInfo);

Description

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.

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.

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 void AddDataSource(const TMMFUidPckg &aSourceUid, const TDesC8 &aSourceInitData, TMMFMessageDestinationPckg &aHandleInfoPckg, TRequestStatus &aStatus);

Description

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.

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

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

TMMFMessageDestinationPckg &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."

TRequestStatus &aStatus

"TRequestStatus of the active object to be signalled on completion of this request."


AddFileHandleDataSource()

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

Description

Parameters

const RFile &aFile

TMMFMessageDestinationPckg &aHandleInfoPckg

TRequestStatus &aStatus


CancelAddDataSource()

IMPORT_C void CancelAddDataSource();

Description

Cancels an outstanding call to the asynchronous version of AddDataSource().


AddDataSink()

IMPORT_C void AddDataSink(const TMMFUidPckg &aSinkUid, const TDesC8 &aSinkInitData, TMMFMessageDestinationPckg &aHandleInfoPckg, TRequestStatus &aStatus);

Description

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.

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

const TDesC8 &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."

TMMFMessageDestinationPckg &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."

TRequestStatus &aStatus

"TRequestStatus of the active object to be signalled on completion of this request."


AddFileHandleDataSink()

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

Description

Parameters

const RFile &aFile

TMMFMessageDestinationPckg &aHandleInfoPckg

TRequestStatus &aStatus


CancelAddDataSink()

IMPORT_C void CancelAddDataSink();

Description

Cancels an outstanding call to the asynchronous version of AddDataSink().


RemoveDataSource()

IMPORT_C TInt RemoveDataSource(const TMMFMessageDestination &aSourceHandleInfo);

Description

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.

Parameters

const TMMFMessageDestination &aSourceHandleInfo

The handle object returned by the controller framework when the data source was added.

Return value

TInt

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


RemoveDataSink()

IMPORT_C TInt RemoveDataSink(const TMMFMessageDestination &aSinkHandleInfo);

Description

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.

Parameters

const TMMFMessageDestination &aSinkHandleInfo

The handle object returned by the controller framework when the data sink was added.

Return value

TInt

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


Reset()

IMPORT_C TInt Reset();

Description

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.

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

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.

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

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

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

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

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

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

Parameters

TTimeIntervalMicroSeconds &aPosition

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

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) const;

Description

Sets the current position microseconds.

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

Parameters

const TTimeIntervalMicroSeconds &aPosition

The new transfer position in microseconds.

Return value

TInt

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


GetDuration()

IMPORT_C TInt GetDuration(TTimeIntervalMicroSeconds &aDuration) const;

Description

Gets the duration of the clip in microseconds.

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

Parameters

TTimeIntervalMicroSeconds &aDuration

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

Return value

TInt

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


GetNumberOfMetaDataEntries()

IMPORT_C TInt GetNumberOfMetaDataEntries(TInt &aNumberOfEntries) const;

Description

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.

Parameters

TInt &aNumberOfEntries

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

Return value

TInt

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


GetMetaDataEntryL()

IMPORT_C CMMFMetaDataEntry *GetMetaDataEntryL(TInt aIndex) const;

Description

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.

Return value

CMMFMetaDataEntry *

The meta data entry retrieved from the controller plugin. Ownership of the entry is passed to the caller.

See also:


CustomCommandSync()

IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const TDesC8 &aDataTo2, TDes8 &aDataFrom);

Description

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.

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.

Return value

TInt

The result of the custom command. Exact range of values is dependent on the custom command interface.


CustomCommandSync()

IMPORT_C TInt CustomCommandSync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const TDesC8 &aDataTo2);

Description

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.

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.

Return value

TInt

The result of the custom command. Exact range of values is dependent on the custom command interface.


CustomCommandAsync()

IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const TDesC8 &aDataTo2, TDes8 &aDataFrom, TRequestStatus &aStatus);

Description

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.

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

IMPORT_C void CustomCommandAsync(const TMMFMessageDestinationPckg &aDestination, TInt aFunction, const TDesC8 &aDataTo1, const TDesC8 &aDataTo2, TRequestStatus &aStatus);

Description

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.

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.


ReceiveEvents()

IMPORT_C void ReceiveEvents(TMMFEventPckg &aEventPckg, TRequestStatus &aStatus);

Description

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.

See also:


CancelReceiveEvents()

IMPORT_C TInt CancelReceiveEvents();

Description

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.

Return value

TInt

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

See also:


SetThreadPriority()

IMPORT_C TInt SetThreadPriority(const TThreadPriority &aPriority) const;

Description

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.

Return value

TInt

TInt A standard error code: KErrNone if successful, KErrNotReady if the thread does not have a valid handle.