|
||
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.
Defined in RMMFController
:
AddDataSink(TUid,const TDesC8 &)
Adds a data sink to the controller.AddDataSink(TUid,const TDesC8 &,TMMFMessageDestination &)
Adds a data sink to the controller, and receives a handle to allow removal and d...AddDataSink(const TMMFUidPckg &,const TDesC8 &,TMMFMessageDestinationPckg &,TRequestStatus &)
Add a data sink to the controller asynchronously, and receive a handle to allow ...AddDataSource(TUid,const TDesC8 &)
Adds a data source to the controller.AddDataSource(TUid,const TDesC8 &,TMMFMessageDestination &)
Adds a data source to the controller, and receive a handle to allow removal and ...AddDataSource(const TMMFUidPckg &,const TDesC8 &,TMMFMessageDestinationPckg &,TRequestStatus &)
Add a data source to the controller asynchronously, and receive a handle to allo...AddFileHandleDataSink(const RFile &,TMMFMessageDestinationPckg &,TRequestStatus &)
AddFileHandleDataSource(const RFile &,TMMFMessageDestinationPckg &,TRequestStatus &)
CancelAddDataSink()
Cancels an outstanding call to the asynchronous version of RMMFController::AddDa...CancelAddDataSource()
Cancels an outstanding call to the asynchronous version of RMMFController::AddDa...CancelReceiveEvents()
Cancels a previous registration to receive events from the controller plugin.Close()
Closes the controller plugin.CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &,TRequestStatus &)
Sends a custom command asynchronously to the controller plugin.CustomCommandAsync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TRequestStatus &)
Sends a custom command asynchronously to the controller plugin.CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &)
Sends a custom command synchronously to the controller plugin.CustomCommandSync(const TMMFMessageDestinationPckg &,TInt,const TDesC8 &,const TDesC8 &,TDes8 &)
Sends a custom command synchronously to the controller plugin.GetDuration(TTimeIntervalMicroSeconds &)const
Gets the duration of the clip in microseconds.GetMetaDataEntryL(TInt)const
Returns a particular meta data entry from the clip.GetNumberOfMetaDataEntries(TInt &)const
Gets the number a meta data entries in the clip.GetPosition(TTimeIntervalMicroSeconds &)const
Gets the current position microseconds.Open(TUid,const TMMFPrioritySettings &)
Loads a controller plugin by specifying the UID of the plugin to load.Open(TUid,const TMMFPrioritySettings &,TBool)
Loads a controller plugin by specifying the UID of the plugin to load.Open(const CMMFControllerImplementationInformation &,const TMMFPrioritySettings &)
Loads a controller plugin by specifying a CMMFControllerImplementationInformatio...Open(const CMMFControllerImplementationInformation &,const TMMFPrioritySettings &,TBool)
Loads a controller plugin by specifying a CMMFControllerImplementationInformatio...Pause()
Pauses the controller.Play()
Starts the controller playing. The controller will begin transferring data from ...Prime()
Prepares the controller to start playing.RMMFController()
Constructor.ReceiveEvents(TMMFEventPckg &,TRequestStatus &)
Registers to receive events from the controller plugin.RemoveDataSink(const TMMFMessageDestination &)
Removes a data sink from the controller.RemoveDataSource(const TMMFMessageDestination &)
Removes a data source from the controller.Reset()
Reverts the controller plugin back to the state it was in just after it had been...SetPosition(const TTimeIntervalMicroSeconds &)const
Sets the current position microseconds.SetPrioritySettings(const TMMFPrioritySettings &)const
Sets the priority settings for this controller.SetThreadPriority(const TThreadPriority &)const
Set the priority of the controller's sub thread.Stop()
Stops the controller.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);
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 RMMFController::Open(TUid,const TMMFPrioritySettings &)
will give each controller its own heap which will consume one chunk. Use the overloaded version of RMMFController::Open(TUid,const TMMFPrioritySettings &)
to create controllers that share a single heap.
|
|
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);
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 RMMFController::Open(TUid,const TMMFPrioritySettings &)
will give each controller its own heap which will consume one chunk. Use the overloaded version of RMMFController::Open(TUid,const TMMFPrioritySettings &)
to create controllers that share a single heap.
|
|
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);
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.
|
|
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);
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.
|
|
IMPORT_C void Close();
Closes the controller plugin.
Calling this method will unload the controller plugin and close down the controller thread.
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;
Sets the priority settings for this controller.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
IMPORT_C void AddFileHandleDataSource(const RFile &aFile, TMMFMessageDestinationPckg &aHandleInfoPckg, TRequestStatus &aStatus);
|
IMPORT_C void CancelAddDataSource();
Cancels an outstanding call to the asynchronous version of RMMFController::AddDataSource(TUid,const TDesC8 &)
.
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.
|
IMPORT_C void AddFileHandleDataSink(const RFile &aFile, TMMFMessageDestinationPckg &aHandleInfoPckg, TRequestStatus &aStatus);
|
IMPORT_C void CancelAddDataSink();
Cancels an outstanding call to the asynchronous version of RMMFController::AddDataSink(TUid,const TDesC8 &)
.
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.
|
|
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.
|
|
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.
|
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.
|
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.
RMMFController::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 RMMFController::ReceiveEvents(TMMFEventPckg &,TRequestStatus &)
interface.
Note: RMMFController::Prime()
must have been called prior to calling RMMFController::Play()
.
|
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 RMMFController::Play()
will result in the data transfer resuming from the same place as when the RMMFController::Pause()
was called.
This moves the controller from the PLAYING back to the PRIMED state.
Note: RMMFController::Play()
must have been called prior to calling RMMFController::Pause()
.
|
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 RMMFController::Stop()
undoes any actions performed by the controller during the call to RMMFController::Prime()
.
This moves the controller from the PRIMED back to the STOPPED state.
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
RMMFController::GetNumberOfMetaDataEntries(TInt &)const
.
|
|
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.
|
|
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.
|
|
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.
|
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.
|
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.
|
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 RMMFController::ReceiveEvents(TMMFEventPckg &,TRequestStatus &)
API function.
|
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.
|
|