|
||
class CMMFController : public CBase;
Base class for controller plugins.
A controller plugin for the multimedia framework must derive from this class and implement all the pure virtual functions.
Controller plugins control the flow of multimedia data from one or more sources to one or more sinks. For example, an audio controller plugin might take data from a file source and output it to a speaker sink, or take data from a microphone source and save it to a file sink. A controller plugin typically supports one or more multimedia formats, for example WAV or MPEG4.
CBase
-
Base class for all classes to be instantiated on the heap.
CMMFController
-
Base class for controller plugins.
Defined in CMMFController
:
AddCustomCommandParserL(CMMFCustomCommandParserBase &)
Adds a custom command parser to the controller framework.AddDataSinkL(MDataSink &)
Adds a data sink to the controller plugin.AddDataSourceL(MDataSource &)
Add a data source to the controller plugin.CMMFController()
Constructor.CustomCommand(TMMFMessage &)
Handles a custom command.DoSendEventToClient(const TMMFEvent &)
Sends an event to the client.DurationL()const
Gets the duration of the clip.GetMetaDataEntryL(TInt)
Retrieves a meta data entry from the clip.GetNumberOfMetaDataEntriesL(TInt &)
RetrieveS the number of meta data entries in the clip.HandleRequestL(TMMFMessage &)
Handles a message from the client.MMFObjectContainerL()
Gets a reference to the multimedia framework object container.PauseL()
Pauses the controller plugin.PauseL(TMMFMessage &)
A partner to the CMMFController::PauseL() method that is overridable to allow As...PlayL()
Commences playback.PlayL(TMMFMessage &)
A partner to the CMMFController::PlayL() method that is overridable to allow Asy...PositionL()const
Gets the current position.PrimeL()
Primes the controller plugin.PrimeL(TMMFMessage &)
A partner to the CMMFController::PrimeL() method that is overridable to allow As...RemoveDataSinkL(MDataSink &)
Removes a data sink from the controller plugin.RemoveDataSourceL(MDataSource &)
Removes a data source from the controller plugin.ResetL()
Resets the controller plugin.SetPositionL(const TTimeIntervalMicroSeconds &)
Sets the current position.SetPrioritySettings(const TMMFPrioritySettings &)
Sets the priority settings.StopL()
Stops the controller plugin.StopL(TMMFMessage &)
A partner to the CMMFController::StopL() method that is overridable to allow Asy...~CMMFController()
Default destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...IMPORT_C virtual void HandleRequestL(TMMFMessage &aMessage);
Handles a message from the client.
Decodes the message and calls one of the private DoXxx methods to unpackaged the parameters.
|
protected: virtual void AddDataSourceL(MDataSource &aDataSource)=0;
Add a data source to the controller plugin.
NOTE: The data source is owned by the controller framework, NOT by the controller plugin. Under no circumstances should the controller plugin delete the data source.
|
|
protected: virtual void AddDataSinkL(MDataSink &aDataSink)=0;
Adds a data sink to the controller plugin.
NOTE: The data sink is owned by the controller framework, NOT by the controller plugin. Under no circumstances should the controller plugin delete the data sink.
|
|
protected: virtual void RemoveDataSourceL(MDataSource &aDataSource)=0;
Removes a data source from the controller plugin.
Note: The data source is owned by the controller framework, NOT by the controller plugin. Under no circumstances should the controller plugin delete the data source.
|
|
protected: virtual void RemoveDataSinkL(MDataSink &aDataSink)=0;
Removes a data sink from the controller plugin.
Note: The data sink is owned by the controller framework, NOT by the controller plugin. Under no circumstances should the controller plugin delete the data sink.
|
|
protected: virtual void ResetL()=0;
Resets the controller plugin.
The controller should revert back to its newly constructed state. If the Reset is successful (i.e. it doesn't leave), the controller framework will delete all objects added to the MMFObjectManager including any sources and sinks.
|
protected: virtual void PrimeL()=0;
Primes the controller plugin.
The controller must prepare to start playing, by initialising its sources, sinks and buffers. This moves the controller from the STOPPED to the PRIMED state.
protected: IMPORT_C virtual void PrimeL(TMMFMessage &aMessage);
A partner to the CMMFController::PrimeL()
method that is overridable to allow Asynchronous completion in the controller whilst maintaining a Synchronous client API.
The default implementation of this is to call CMMFController::PrimeL()
and complete the message with KErrNone.
|
protected: virtual void PlayL()=0;
Commences playback.
The controller must now begin transferring data from its source(s) to its sink(s). This moves the controller from the PRIMED to the PLAYING state.
Note: This method must return once playing has commenced, and not wait until playing is complete.
protected: IMPORT_C virtual void PlayL(TMMFMessage &aMessage);
A partner to the CMMFController::PlayL()
method that is overridable to allow Asynchronous completion in the controller whilst maintaining a Synchronous client API.
The default implementation of this is to call CMMFController::PlayL()
and complete the message with KErrNone.
|
protected: virtual void PauseL()=0;
Pauses the controller plugin.
The controller must now cease transferring data from its source(s) to its sink(s). This moves the controller from the PLAYING back to the PRIMED state.
A subsequent call to Play() will cause the controller plugin to resume playback from the point it was paused (unless there has been a call to SetPosition() in the meantime.
protected: IMPORT_C virtual void PauseL(TMMFMessage &aMessage);
A partner to the CMMFController::PauseL()
method that is overridable to allow Asynchronous completion in the controller whilst maintaining a Synchronous client API.
The default implementation of this is to call CMMFController::PauseL()
and complete the message with KErrNone.
|
protected: virtual void StopL()=0;
Stops the controller plugin.
The controller must now undo anything that occurred during the call to Prime(). This moves the controller from the PRIMED back to the STOPPED state.
protected: IMPORT_C virtual void StopL(TMMFMessage &aMessage);
A partner to the CMMFController::StopL()
method that is overridable to allow Asynchronous completion in the controller whilst maintaining a Synchronous client API.
The default implementation of this is to call CMMFController::StopL()
and complete the message with KErrNone.
|
protected: virtual TTimeIntervalMicroSeconds PositionL() const=0;
Gets the current position.
The controller plugin should calculate the current position in microseconds.
|
protected: virtual void SetPositionL(const TTimeIntervalMicroSeconds &aPosition)=0;
Sets the current position.
The controller plugin should reposition itself to the position provided.
|
protected: virtual TTimeIntervalMicroSeconds DurationL() const=0;
Gets the duration of the clip.
The controller plugin should calculate the clip duration in microseconds.
|
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. |
protected: virtual void SetPrioritySettings(const TMMFPrioritySettings &aPrioritySettings)=0;
Sets the priority settings.
The new priority settings must be applied to any resource being used by the controller plugin that requires priority settings (for example the sound device).
|
protected: inline virtual void CustomCommand(TMMFMessage &aMessage);
Handles a custom command.
Custom commands allow a controller plugin to define its own API. If the controller framework does not understand a message from the client, it is assumed this is a custom command for the plugin and passed into this interface.
The more common custom commands can be handled by Custom Command Parsers on behalf of the controller plugin. This allows the
controller plugin to implement a concrete interface (defined by mixin classes) rather than having to decode the command itself.
For more information, see CMMFCustomCommandParserBase
.
The controller plugin must always complete the message passed into this method, even if it does not support the interface required by the message.
|
protected: virtual void GetNumberOfMetaDataEntriesL(TInt &aNumberOfEntries)=0;
RetrieveS the number of meta data entries in the clip.
|
protected: virtual CMMFMetaDataEntry* GetMetaDataEntryL(TInt aIndex)=0;
Retrieves a meta data entry from the clip.
|
|
protected: IMPORT_C TInt DoSendEventToClient(const TMMFEvent &aEvent);
Sends an event to the client.
The controller plugin can use this method to send an event to the client.
|
|
protected: IMPORT_C CMMFObjectContainer& MMFObjectContainerL();
Gets a reference to the multimedia framework object container.
The controller plugin may add CMMFObject-derived objects to the container to allow them to receive messages directly from the client.
|
protected: IMPORT_C void AddCustomCommandParserL(CMMFCustomCommandParserBase &aParser);
Adds a custom command parser to the controller framework.
If the controller framework receives a request it does not understand, it will search through its list of custom command parsers before passing the request on to the controller plugin as a custom command.
By using the custom command parsers, the controller plugin can implement a concrete API rather than having to decode the common custom commands itself.
|