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.
7.0s
Public Member Functions | |
---|---|
~CMMFController() | |
IMPORT_C void | HandleRequestL(TMMFMessage &) |
CMMFController * | NewL(TUid, MAsyncEventHandler &, TThreadId) |
Protected Member Functions | |
---|---|
CMMFController() | |
IMPORT_C void | AddCustomCommandParserL(CMMFCustomCommandParserBase &) |
void | AddDataSinkL(MDataSink &) |
void | AddDataSourceL(MDataSource &) |
IMPORT_C TThreadId | ClientThreadIdL() |
void | CustomCommand(TMMFMessage &) |
IMPORT_C TInt | DoSendEventToClient(const TMMFEvent &) |
TTimeIntervalMicroSeconds | DurationL() |
CMMFMetaDataEntry * | GetMetaDataEntryL(TInt) |
void | GetNumberOfMetaDataEntriesL(TInt &) |
IMPORT_C TBool | IsSecureDrmModeL() |
IMPORT_C CMMFObjectContainer & | MMFObjectContainerL() |
void | PauseL() |
IMPORT_C void | PauseL(TMMFMessage &) |
void | PlayL() |
IMPORT_C void | PlayL(TMMFMessage &) |
TTimeIntervalMicroSeconds | PositionL() |
void | PrimeL() |
IMPORT_C void | PrimeL(TMMFMessage &) |
void | RemoveDataSinkL(MDataSink &) |
void | RemoveDataSourceL(MDataSource &) |
void | ResetL() |
void | SetPositionL(const TTimeIntervalMicroSeconds &) |
void | SetPrioritySettings(const TMMFPrioritySettings &) |
void | StopL() |
IMPORT_C void | StopL(TMMFMessage &) |
IMPORT_C void | AddCustomCommandParserL | ( | CMMFCustomCommandParserBase & | aParser | ) | [protected] |
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.
7.0s
CMMFCustomCommandParserBase & aParser | The parser to be added to the controller framework. The controller framework takes ownership of the parser if the call does not leave. |
void | AddDataSinkL | ( | MDataSink & | aDataSink | ) | [protected, pure virtual] |
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.
leave
KErrNotSupported If the controller plugin does not support the data sink, it should leave with this.
7.0s
MDataSink & aDataSink | A reference to the data sink to be added. The controller plugin may call aDatasink.DatasinkType() to find out exactly what type of sink it is. |
void | AddDataSourceL | ( | MDataSource & | aDataSource | ) | [protected, pure virtual] |
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.
leave
KErrNotSupported If the controller plugin does not support the data source, it should leave with this.
7.0s
MDataSource & aDataSource | A reference to the data source to be added. The controller plugin may call aDataSource.DataSourceType() to find out exactly what type of source it is. |
void | AddMDataSinkAndRepondClientL | ( | MDataSink * | aSink, |
TMMFMessage & | aMessage | |||
) | [private] |
MDataSink * aSink | |
TMMFMessage & aMessage |
void | AddMDataSourceAndRepondClientL | ( | MDataSource * | aSource, |
TMMFMessage & | aMessage | |||
) | [private] |
MDataSource * aSource | |
TMMFMessage & aMessage |
IMPORT_C TThreadId | ClientThreadIdL | ( | ) | [protected] |
Retrieves the client thread Id of this controller.
Thread Id of the controller's client
void | ConstructL | ( | MAsyncEventHandler & | aEventHandler, |
TThreadId | aClientTid | |||
) | [private] |
This is internal and not intended for use.
MAsyncEventHandler & aEventHandler | |
TThreadId aClientTid |
CMMFControllerExtendedData * | CreateExtendedDataL | ( | TThreadId | aClientTid | ) | [private, static] |
TThreadId aClientTid |
void | CustomCommand | ( | TMMFMessage & | aMessage | ) | [protected, inline, virtual] |
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.
7.0s
TMMFMessage & aMessage | The message to be handled by the controller plugin. |
TBool | DoAddDataSinkL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoAddDataSourceL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoAddFileHandleDataSinkL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoAddFileHandleDataSinkWithInitDataL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoAddFileHandleDataSourceL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoAddFileHandleDataSourceWithInitDataL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
void | DoCustomCommand | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoGetDurationL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoGetMetaDataEntryL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoGetNumberOfMetaDataEntriesL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoGetPositionL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoGetSizeOfMetaDataEntryL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoPauseL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoPlayL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoPreloadSourceSinkInitDataL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoPrimeL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoRemoveDataSinkL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoRemoveDataSourceL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoResetL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
IMPORT_C TInt | DoSendEventToClient | ( | const TMMFEvent & | aEvent | ) | [protected] |
Sends an event to the client.
The controller plugin can use this method to send an event to the client.
One of the system-wide error codes.
7.0s
const TMMFEvent & aEvent | The event to be sent to the client. |
TBool | DoSetPositionL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoSetPrioritySettingsL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TBool | DoStopL | ( | TMMFMessage & | aMessage | ) | [private] |
TMMFMessage & aMessage |
TTimeIntervalMicroSeconds | DurationL | ( | ) | const [protected, pure virtual] |
Gets the duration of the clip.
The controller plugin should calculate the clip duration in microseconds.
The clips duration in microseconds.
7.0s
CMMFMetaDataEntry * | GetMetaDataEntryL | ( | TInt | aIndex | ) | [protected, pure virtual] |
Retrieves a meta data entry from the clip.
A pointer to a newly created CMMFMetaDataEntry object containing the meta information. The controller framework will take ownership of the object when this method returns.
7.0s
TInt aIndex | The index of the meta data entry to retrieve. |
void | GetNumberOfMetaDataEntriesL | ( | TInt & | aNumberOfEntries | ) | [protected, pure virtual] |
RetrieveS the number of meta data entries in the clip.
7.0s
TInt & aNumberOfEntries | The controller plugin must set this to the number of meta data entries in the clip. |
IMPORT_C void | HandleRequestL | ( | TMMFMessage & | aMessage | ) | [virtual] |
Handles a message from the client.
Decodes the message and calls one of the private DoXxx methods to unpackaged the parameters.
7.0s
TMMFMessage & aMessage | The message to be handled. |
IMPORT_C TBool | IsSecureDrmModeL | ( | ) | [protected] |
Check the Secure DRM Mode of current controller object
ETrue if the controller is running under Secure DRM mode; otherwise EFalse.
IMPORT_C CMMFObjectContainer & | MMFObjectContainerL | ( | ) | [protected] |
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.
A reference to the MMFObjectContainer.
7.0s
CMMFController * | NewL | ( | TUid | aControllerUid, |
MAsyncEventHandler & | aEventHandler, | |||
TThreadId | aClientTid | |||
) | [static] |
Allocates and constructs a new controller plugin.
Uses ECOM to instantiate a new controller plugin. Can leave with any of the system-wide error codes.
A pointer to the new controller plugin.
7.0s
TUid aControllerUid | The unique ID of the controller to be instantiated from ECOM. |
MAsyncEventHandler & aEventHandler | A reference to an event handling object that can be used by the controller to send events back to the client. |
TThreadId aClientTid | The thread Id of the client thread |
void | PauseL | ( | ) | [protected, pure virtual] |
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.
7.0s
IMPORT_C void | PauseL | ( | TMMFMessage & | aMessage | ) | [protected, virtual] |
TMMFMessage & aMessage |
void | PlayL | ( | ) | [protected, pure virtual] |
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.
7.0s
IMPORT_C void | PlayL | ( | TMMFMessage & | aMessage | ) | [protected, virtual] |
TMMFMessage & aMessage |
TTimeIntervalMicroSeconds | PositionL | ( | ) | const [protected, pure virtual] |
Gets the current position.
The controller plugin should calculate the current position in microseconds.
The current position in microseconds.
7.0s
void | PrimeL | ( | ) | [protected, pure virtual] |
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.
7.0s
IMPORT_C void | PrimeL | ( | TMMFMessage & | aMessage | ) | [protected, virtual] |
TMMFMessage & aMessage |
void | RemoveDataSinkL | ( | MDataSink & | aDataSink | ) | [protected, pure virtual] |
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.
leave
KErrNotSupported The controller plugin may leave during this method. If the controller plugin does not support the removal of data sinks, it should leave with KErrNotSupported. If the controller plugin leaves, the data sink will not be destroyed by the controller framework. If it does not leave, the data sink will be destroyed.
7.0s
MDataSink & aDataSink | A reference to the data sink to be removed. |
void | RemoveDataSourceL | ( | MDataSource & | aDataSource | ) | [protected, pure virtual] |
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.
leave
KErrNotSupported The controller plugin may leave during this method. If the controller plugin does not support the removal of data sources, it should leave with KErrNotSupported. If the controller plugin leaves, the data source will not be destroyed by the controller framework. If it does not leave, the data source will be destroyed.
7.0s
MDataSource & aDataSource | A reference to the data source to be removed. |
void | ReplaceFileHandleInInitDataL | ( | RFile * | aFile, |
TDes8 & | aInitData | |||
) | [private] |
void | ResetL | ( | ) | [protected, pure virtual] |
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.
leave
KErrNotSupported If the controller plugin does not support being reset, it should leave with KErrNotSupported.
7.0s
void | SetPositionL | ( | const TTimeIntervalMicroSeconds & | aPosition | ) | [protected, pure virtual] |
Sets the current position.
The controller plugin should reposition itself to the position provided.
7.0s
const TTimeIntervalMicroSeconds & aPosition | The desired position in microseconds. |
void | SetPrioritySettings | ( | const TMMFPrioritySettings & | aPrioritySettings | ) | [protected, pure virtual] |
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).
7.0s
const TMMFPrioritySettings & aPrioritySettings | The new priority settings |
void | StopL | ( | ) | [protected, pure virtual] |
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.
7.0s
IMPORT_C void | StopL | ( | TMMFMessage & | aMessage | ) | [protected, virtual] |
TMMFMessage & aMessage |
MAsyncEventHandler * | iAsyncEventHandler | [private] |
The event handler for the controller plugin.
CMMFCustomCommandParserManager * | iCustomCommandParserManager | [private] |
The custom command parser manager.
CMMFObjectContainer * | iMMFObjectContainer | [private] |
The MMF object container.
CBufFlat * | iMetaDataBuffer | [private] |
Buffer to assist copy of meta data over the thread boundary.