Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

MMF Controller API

From Wiki
Jump to: navigation, search
Article Metadata
Created: vvsnaresh (14 Apr 2007)
Last edited: hamishwillee (30 May 2013)

MMF Controller API

The MMF controller plug-in API is represented by the CMMFController interface. It is responsible for receiving client requests passed via the application’s side APIs identified in the RMMFController class and then dispatching them further to the lower layers. When instantiated, CMMFController allocates all of the internal plug-in factory objects such as data sources and sinks, format classes, and codecs.

In addition, it establishes a session with the sound device. Every MMF plug-in is implemented as a derivation of CMMFController and must provide implementations to all of its virtual functions.

The declaration of the CMMFController class is found in MMFController.h.

Another important difference marks the existence of synchronous and asynchronous versions of the state-changing methods: PlayL(), PauseL(), and StopL(). The significance of this is such that these requests should be processed asynchronously in the controller while maintaining a synchronous client API.

For example, the Play request must return once playing has commenced and not wait until playing is complete.

virtual void CMMFController::PlayL() = 0;
virtual CMMFController::void PlayL(
TMMFMessage& aMessage); //async
virtual void CMMFController::PauseL() = 0;
virtual void CMMFController::PauseL(
TMMFMessage& aMessage); //async
virtual void CMMFController::StopL() = 0;
virtual void CMMFController::StopL(
TMMFMessage& aMessage); //async

Custom command support at the controller API level is represented by the CustomCommand() handler. A method is also provided that allows adding of custom command parsers. Symbian provides default implementation for the custom command handler to ensure completion of all client/server messages even in the case of an unrecognized request.

virtual void CMMFController::CustomCommand(
TMMFMessage& aMessage)
{aMessage.Complete(KErrNotSupported);};//default implementation
void CMMFController::AddCustomCommandParserL(
CMMFCustomCommandParserBase& aParser);


This page was last modified on 30 May 2013, at 04:39.
84 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.